This repository provides a tool to run unit tests for built custom colcon packages.
The colcon_tools.sh
provides the colcon_test
function, which runs the unit tests.
To run all tests, execute
colcon_test
To run all tests for a colcon package <package-name>
, run
colcon_test <package-name>
Note that autocompletion is available.
To run tests for a given package, run
colcon_test <package-name> <test-name-1> <test-name-2> <...>
where <package-name>
is the colcon package name and <test-name>
is the test name for the given package.
The function can take arbitrarily multiple test arguments.
Note that autocompletion is available for both package names and test names.
Note that auto-completion is provided for packages with executable tests. That is, if a package doesn't have an executable test, or the package is not built yet, then it will not be autocompleted.
- Install script by running
./install.sh
Note, this may require elevated permissions (i.e., sudo
)
To uninstall, remove /usr/local/bin/colcon_tools.sh
and clear the source /usr/local/bin/colcon_tools.sh
from ~/.bashrc
.