Skip to content

Commit

Permalink
Change nodelet test to rostest to provide it a rosmaster.
Browse files Browse the repository at this point in the history
  • Loading branch information
peci1 committed Apr 29, 2022
1 parent a67cbce commit 343d901
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 2 deletions.
3 changes: 2 additions & 1 deletion nodelet/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,8 @@ if(CATKIN_ENABLE_TESTING)
# find pthread and provide it as Threads::Threads imported target
set(THREADS_PREFER_PTHREAD_FLAG ON)
find_package(Threads REQUIRED)
find_package(rostest REQUIRED)

catkin_add_gtest(test_nodelet test/test_nodelet.cpp)
add_rostest_gtest(test_nodelet test/test_nodelet.test test/test_nodelet.cpp)
target_link_libraries(test_nodelet nodeletlib ${BOOST_LIBRARIES} ${catkin_LIBRARIES} Threads::Threads)
endif()
2 changes: 1 addition & 1 deletion nodelet/package.xml
Original file line number Diff line number Diff line change
Expand Up @@ -37,5 +37,5 @@
<exec_depend>message_runtime</exec_depend>
<exec_depend>rospy</exec_depend>

<test_depend>rosunit</test_depend>
<test_depend>rostest</test_depend>
</package>
3 changes: 3 additions & 0 deletions nodelet/test/test_nodelet.test
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
<launch>
<test test-name="test_stateful_nodelet" pkg="nodelet" type="test_nodelet"/>
</launch>

0 comments on commit 343d901

Please sign in to comment.