How do I migrate rosbuild_add_rostest_labelled to catkin?
The catkin migrating from rosbuild page provides no answer.
ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange |
The catkin migrating from rosbuild page provides no answer.
No one answered this, so I'll post my own solution. Suppose you have a device driver with unit tests that only work on a machine with that device attached. It will fail, if run as a regression test by the build farm.
So, in the catkin CMakeLists.txt, wrap add_rostest()
inside a CMake if ()
block, like this:
if (${DEVICE_TEST})
add_rostest(tests/camera_node_hz.test)
add_rostest(tests/camera_nodelet_hz.test)
endif (${DEVICE_TEST})
Those tests will only run when explicitly configured via CMake:
$ cd build
$ cmake ../src -DDEVICE_TEST=true
$ make run_tests
Asked: 2013-02-16 10:40:23 -0500
Seen: 178 times
Last updated: Apr 23 '13
How to watch to topic while testing?
Enforce consecutive execution order for gtest and rostest.
rostest not finding the actual test
Rostest: Test if nodes are running
Getting python coverage for rostests
rostest error: Test Fixture Nodes failed to launch
Catkin migration dynamic reconfigure
Capture rostest result status in detail
Process dies for test.py with "option --gtest_output not recognized" error