Skip to content

Commit

Permalink
make rostest in CMakeLists optional (ros/rosdistro#3010)
Browse files Browse the repository at this point in the history
  • Loading branch information
bulwahn committed Jul 30, 2014
1 parent 2c73af5 commit 34a3660
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 5 deletions.
3 changes: 2 additions & 1 deletion diagnostic_aggregator/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ cmake_minimum_required(VERSION 2.8.3)
project(diagnostic_aggregator)

# Load catkin and all dependencies required for this package
find_package(catkin REQUIRED diagnostic_msgs pluginlib roscpp rospy rostest xmlrpcpp)
find_package(catkin REQUIRED diagnostic_msgs pluginlib roscpp rospy xmlrpcpp)

catkin_package(DEPENDS diagnostic_msgs pluginlib roscpp rospy xmlrpcpp
INCLUDE_DIRS include
Expand Down Expand Up @@ -38,6 +38,7 @@ add_executable(analyzer_loader test/analyzer_loader.cpp
target_link_libraries(analyzer_loader diagnostic_aggregator)

if(CATKIN_ENABLE_TESTING)
find_package(rostest)
add_rostest(test/launch/test_agg.launch)

# Test Analyzer loader
Expand Down
2 changes: 1 addition & 1 deletion diagnostic_analysis/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ cmake_minimum_required(VERSION 2.8.3)
project(diagnostic_analysis)

# Load catkin and all dependencies required for this package
find_package(catkin REQUIRED diagnostic_msgs rosbag roslib rostest)
find_package(catkin REQUIRED diagnostic_msgs rosbag roslib)

catkin_package(DEPENDS diagnostic_msgs rosbag roslib)

Expand Down
3 changes: 2 additions & 1 deletion diagnostic_updater/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ cmake_minimum_required(VERSION 2.8.3)
project(diagnostic_updater)

# Load catkin and all dependencies required for this package
find_package(catkin REQUIRED diagnostic_msgs roscpp rostest std_msgs)
find_package(catkin REQUIRED diagnostic_msgs roscpp std_msgs)

catkin_python_setup()

Expand All @@ -15,6 +15,7 @@ add_executable(example src/example.cpp)
target_link_libraries(example ${catkin_LIBRARIES})

if(CATKIN_ENABLE_TESTING)
find_package(rostest)
add_rostest_gtest(diagnostic_updater_test test/diagnostic_updater_test.xml test/diagnostic_updater_test.cpp)
add_rostest(test/diagnostic_updater_fast_test.xml)
target_link_libraries(diagnostic_updater_test ${catkin_LIBRARIES})
Expand Down
3 changes: 2 additions & 1 deletion self_test/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ cmake_minimum_required(VERSION 2.8.3)
project(self_test)

# Load catkin and all dependencies required for this package
find_package(catkin REQUIRED diagnostic_msgs diagnostic_updater roscpp rostest)
find_package(catkin REQUIRED diagnostic_msgs diagnostic_updater roscpp)

catkin_package(DEPENDS diagnostic_msgs diagnostic_updater roscpp
INCLUDE_DIRS include
Expand Down Expand Up @@ -34,6 +34,7 @@ target_link_libraries(selftest_rostest ${Boost_LIBRARIES}
)

if(CATKIN_ENABLE_TESTING)
find_package(rostest)
add_subdirectory(test)

add_rostest(test/launch/nominal_test.launch)
Expand Down
4 changes: 3 additions & 1 deletion test_diagnostic_aggregator/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ cmake_minimum_required(VERSION 2.8.3)
project(test_diagnostic_aggregator)

# Load catkin and all dependencies required for this package
find_package(catkin REQUIRED diagnostic_aggregator diagnostic_msgs pluginlib roscpp rospy rostest)
find_package(catkin REQUIRED diagnostic_aggregator diagnostic_msgs pluginlib roscpp rospy)

catkin_package(DEPENDS diagnostic_aggregator diagnostic_msgs pluginlib roscpp rospy
INCLUDE_DIRS include
Expand All @@ -19,6 +19,8 @@ add_dependencies(test_diagnostic_aggregator diagnostic_msgs_gencpp)
target_link_libraries(test_diagnostic_aggregator ${catkin_LIBRARIES})

if(CATKIN_ENABLE_TESTING)
find_package(rostest)

add_rostest(test/launch/test_match_no_analyze_analyzer_load.launch)

# Tests that an item can be matched, not analyzed, and reported in "Other"
Expand Down

0 comments on commit 34a3660

Please sign in to comment.