ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question
3

How do I migrate rosbuild_add_rostest_labelled to catkin?

asked 2013-02-16 10:40:23 -0500

joq gravatar image

The catkin migrating from rosbuild page provides no answer.

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
3

answered 2013-04-22 16:46:05 -0500

joq gravatar image

updated 2013-04-23 04:32:39 -0500

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
edit flag offensive delete link more

Question Tools

2 followers

Stats

Asked: 2013-02-16 10:40:23 -0500

Seen: 178 times

Last updated: Apr 23 '13