A colcon wrapper that makes building and testing single packages more convenient during development.
While working on package, one typically performs the following steps:
- Build all the dependent packages
- Make some changes
- Rebuild the package
- Run the tests
This usually requires multiple colcon invocations. With this tool, it is enough to run:
colb test -r my_package
To get an overview over the available options:
colb help
colb help <verb>
Rebuilding just the current package:
colb build -s my_package
Building and running only a single unit test (only works after the package has been built once):
colb test my_package --test my_unit_test
To minimize the steps involved in getting a test output, this will directly invoke ninja
and ctest
.
If the current directory is already somewhere inside a package, the package name may be omitted from the command line:
cd my_ws/src/my_repo/my_package/src
colb build
The invoced commands make use of the colcon-common-extensions
and colcon mixins by default, so they should be installed.
By default, the ccache
, ninja
and mold
mixins are enabled, so the associated programs should be installed.
cargo install --path .
It is possible to customize the options used for the dependency build and for the active package.
The default settings can be written to a .colb.toml
file using the colb init
command.
Further invocations will then load the options from this file, which also doubles as a workspace root marker.