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

Revision history [back]

click to hide/show revision 1
initial version

Looks like you can pass the message target dependencies to the add_rostest(...) call using the DEPENDENCIES target:

http://docs.ros.org/api/catkin/html/howto/format2/rostest_configuration.html

So your code would look like:

if(CATKIN_ENABLE_TESTING)
    find_package(rostest REQUIRED)
    find_package(my_msgs REQUIRED)

    add_rostest(tests/my_test.test DEPENDENCIES ${my_msgs_EXPORTED_TARGETS})
endif()

I think that should work, but I haven't tried it myself.