How do I migrate rosbuild_add_rostest_labelled to catkin?
The catkin migrating from rosbuild page provides no answer.
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
Please start posting anonymously - your entry will be published after you log in or create a new account.
Asked: 2013-02-16 10:40:23 -0600
Seen: 111 times
Last updated: Apr 23 '13
Test a node that subscribes and publishes to other nodes
Proper workflow to install tests targets with catkin
Difference between add_rostest_gtest and catkin_add_gtest
ResourceNotFound error with rostest absolute path to launch file
Why are my rostests giving me a std::bad_alloc error?
where is the rosbuild_add_roslaunch_check script?
Linker errors on "make test" on Fuerte [closed]