ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question

Why seems add_rostest not to work?

asked 2014-06-24 05:19:58 -0600

ct2034 gravatar image

I am migrating a packet to catkin. It contains a test. The test runs successfully like this:

rostest my_navigation_test my_test_4_cob.test

but when i add


to the equivalent CMakeLists.txt and call catkin_make test I get:

catkin_make test
Base path: /home/aub-ch/ros/hydro_mynavigationtest
Source space: /home/aub-ch/ros/hydro_mynavigationtest/src
Build space: /home/aub-ch/ros/hydro_mynavigationtest/build
Devel space: /home/aub-ch/ros/hydro_mynavigationtest/devel
Install space: /home/aub-ch/ros/hydro_mynavigationtest/install
#### Running command: "make cmake_check_build_system" in "/home/aub-ch/ros/hydro_mynavigationtest/build"
#### Running command: "make test -j8 -l8" in "/home/aub-ch/ros/hydro_mynavigationtest/build"
Running tests...
Test project /home/aub-ch/ros/hydro_mynavigationtest/build
    Start 1: _ctest_my_navigation_test_rostest_launch_my_test_4_cob.test
1/1 Test #1: _ctest_my_navigation_test_rostest_launch_my_test_4_cob.test ...***Failed    5.64 sec

0% tests passed, 1 tests failed out of 1

Total Test time (real) =   5.66 sec

The following tests FAILED:
      1 - _ctest_my_navigation_test_rostest_launch_my_test_4_cob.test (Failed)
Errors while running CTest
make: *** [test] Error 8
Invoking "make" failed

It is a bit hard to debug as it gives no feedback about what is really happening at all.
Any ideas?

Can you explain to me what the line '_ctest_my_navigation_test_rostest_launch_my_test_4_cob.test' means? Does it expect the launchfile to be called like this? (which it isn't)

edit retag flag offensive close merge delete


This might has been my fault, because i messed up my multiple workspaces. But I'll check it

ct2034 gravatar image ct2034  ( 2014-06-24 08:39:26 -0600 )edit

1 Answer

Sort by ยป oldest newest most voted

answered 2014-06-24 10:01:57 -0600

joq gravatar image

Use catkin_make run_tests, rather than just test.

See the how-to run tests documentation.

edit flag offensive delete link more


Thank you. This helps a lot as I can see the test output

ct2034 gravatar image ct2034  ( 2014-06-24 11:24:07 -0600 )edit

You can also call `catkin_test_results` to get a summary of tests.

William gravatar image William  ( 2014-06-24 12:08:01 -0600 )edit

Do you mind checking out my follow up question, too:

ct2034 gravatar image ct2034  ( 2014-06-24 12:40:36 -0600 )edit

Question Tools

1 follower


Asked: 2014-06-24 05:19:58 -0600

Seen: 241 times

Last updated: Jun 24 '14