Measuring code coverage in ROS
Hello,
I am looking for a solution to measure code coverage in ROS. For example, in the ROS turtlesim
package, I would like to measure how many functions / branches / program-blocks the tutorial program draw_square.cpp
reaches during its execution. Such coverage can be helpful, for example, in determining the thoroughness of a test program.
The ROS Continuous Integration page ( http://wiki.ros.org/CIs ) provides hints on some existing solutions of measuring coverage, but the page does not seem to give details.
For your information, I sometimes used GCOV for measuring C program coverage. I am looking for a solution that can deal with both C++ and Python programs in ROS.
Thank you.
Perhaps mikeferguson/code_coverage can help here, or at least the C++ side. For Python I wouldn't know anything integrated/nice/ROS wrapped.
Edit: according to this the
sr-build-tools
project can provide code coverage for both C++ and Python. Haven't used it myself though.