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 doubt that test is actually run, as tf2_sensor_msgs has everything related to testing commented out in its CMakeLists.txt (here):

# TODO enable tests
#if(BUILD_TESTING)
#  catkin_add_nosetests(test/test_tf2_sensor_msgs.py)

#find_package(catkin REQUIRED COMPONENTS
#  sensor_msgs
#  rostest
#  tf2_ros
#  tf2
#)
#include_directories(${EIGEN_INCLUDE_DIRS})
#add_executable(test_tf2_sensor_msgs_cpp EXCLUDE_FROM_ALL test/test_tf2_sensor_msgs.cpp)
#target_link_libraries(test_tf2_sensor_msgs_cpp ${catkin_LIBRARIES} ${GTEST_LIBRARIES})
#if(TARGET tests)
#  add_dependencies(tests test_tf2_sensor_msgs_cpp)
#endif()
#add_rostest(${CMAKE_CURRENT_SOURCE_DIR}/test/test.launch)
#endif()

I doubt that test is actually run, as tf2_sensor_msgs has everything related to testing commented out in its CMakeLists.txt (here):

# TODO enable tests
#if(BUILD_TESTING)
#  catkin_add_nosetests(test/test_tf2_sensor_msgs.py)

#find_package(catkin REQUIRED COMPONENTS
#  sensor_msgs
#  rostest
#  tf2_ros
#  tf2
#)
#include_directories(${EIGEN_INCLUDE_DIRS})
#add_executable(test_tf2_sensor_msgs_cpp EXCLUDE_FROM_ALL test/test_tf2_sensor_msgs.cpp)
#target_link_libraries(test_tf2_sensor_msgs_cpp ${catkin_LIBRARIES} ${GTEST_LIBRARIES})
#if(TARGET tests)
#  add_dependencies(tests test_tf2_sensor_msgs_cpp)
#endif()
#add_rostest(${CMAKE_CURRENT_SOURCE_DIR}/test/test.launch)
#endif()

tf2_geometry_msgs does have testing enabled, and its binary can be found in build/tf2_geometry_msgs/test_tf2_geometry_msgs.

I suppose this program can be built and executed by colcon test. It works from my docker machine:

As far as I know, colcon test only runs tests, it does not build them.

That would be colcon build's job.

I doubt that test is actually run, as tf2_sensor_msgs has everything related to testing commented out in its CMakeLists.txt (here):

# TODO enable tests
#if(BUILD_TESTING)
#  catkin_add_nosetests(test/test_tf2_sensor_msgs.py)

#find_package(catkin REQUIRED COMPONENTS
#  sensor_msgs
#  rostest
#  tf2_ros
#  tf2
#)
#include_directories(${EIGEN_INCLUDE_DIRS})
#add_executable(test_tf2_sensor_msgs_cpp EXCLUDE_FROM_ALL test/test_tf2_sensor_msgs.cpp)
#target_link_libraries(test_tf2_sensor_msgs_cpp ${catkin_LIBRARIES} ${GTEST_LIBRARIES})
#if(TARGET tests)
#  add_dependencies(tests test_tf2_sensor_msgs_cpp)
#endif()
#add_rostest(${CMAKE_CURRENT_SOURCE_DIR}/test/test.launch)
#endif()

tf2_geometry_msgs does have testing enabled, and its binary can be found in build/tf2_geometry_msgs/test_tf2_geometry_msgs. (find /path/to/colcon_ws/build -executable -type f | grep test).

I suppose this program can be built and executed by colcon test. It works from my docker machine:

As far as I know, colcon test only runs tests, it does not build them.

That would be colcon build's job.