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

I think you need to modify your CMakeLists.txt to find_package rostest so the linker can link the test executable to all required libraries.

if (CATKIN_ENABLE_TESTING) find_package(rostest REQUIRED) add_rostest_gtest(utest test/utest.cpp) target_link_libraries(utest ${catkin_LIBRARIES}) endif()

Also make sure that in the package.xml file you add a test dependency to rostest : <test_depend>rostest</test_depend>

More information can be found here: Configuring rostest — catkin 0.6.18 documentation

I think you need to modify your CMakeLists.txt to find_package rostest so the linker can link the test executable to all required libraries.

if (CATKIN_ENABLE_TESTING)
  find_package(rostest REQUIRED)
  add_rostest_gtest(utest test/utest.cpp)
  target_link_libraries(utest ${catkin_LIBRARIES})
endif()

Also make sure that in the package.xml file you add a test dependency to rostest : <test_depend>rostest</test_depend>

More information can be found here: Configuring rostest — catkin 0.6.18 documentation