Cannot run rostests Sequentially, only Simultaneously
Hi,
I'm using rostest to perform integration testing on my code. I've created a single test, to which I pass in a single argument (yaml file with parameters). Here's the relevant portion of my CMakeLists.txt file.
if(CATKIN_ENABLE_TESTING)
catkin_add_gtest(pftest test/path_follower_unit_tests.cpp)
target_link_libraries(pftest ${catkin_LIBRARIES} pfc)
find_package(rostest REQUIRED)
add_executable(path_follower_ros_tester test/path_follower_ros_tests.cpp)
#add_rostest_gtest(path_follower_ros_tester test/path_follower_verification.test test/path_follower_ros_tests.cpp)
target_link_libraries(path_follower_ros_tester ${catkin_LIBRARIES} pfc gtest)
add_rostest(test/path_follower_verification.test DEPENDENCIES path_follower_ros_tester ARGS case:=case1)
add_rostest(test/path_follower_verification.test DEPENDENCIES path_follower_ros_tester ARGS case:=case2)
add_rostest(test/path_follower_verification.test DEPENDENCIES path_follower_ros_tester ARGS case:=case3)
endif()
When I run catkin_make run_tests
the three tests run simultaneously. In other words, three different instances of roscore, and all of the nodes under test spool up at the same time. My concern is that this approach will not scale and eventually I will run out of compute resources. I currently have three different yaml files I pass into my test, but its not hard to imagine testing dozens of different test cases, each with a different set of parameters (inside a yaml file).
How can I force the tests to run sequentially rather than simultaneously?