Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

make rostest in CMakeLists optional (ros/rosdistro#3010) #29

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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