ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange |
1 | initial version |
For those curious, I was able to do it by invoking colcon
as follows.
colcon build --symlink-install --cmake-args -DCMAKE_BUILD_TYPE=Debug -DCMAKE_CXX_FLAGS="--coverage" -DCMAKE_CXX_OUTPUT_EXTENSION_REPLACE=ON
Then I ran the tests.
colcon test
Finally, I ran lcov
.
lcov --capture --directory build/ --output-file my_fantastic_coverage_report.info
And generated fancy HTML with this.
genhtml my_fantastic_coverage_report.info --output-directory fancy_html_coverage_report
Then just sensible-browser fancy_html_coverage_report/index.html
.