0
$\begingroup$

Rosanswers logo

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

add_rostest(launch/my_test_4_cob.test)

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)


Originally posted by ct2034 on ROS Answers with karma: 862 on 2014-06-24

Post score: 1


Original comments

Comment by ct2034 on 2014-06-24:
This might has been my fault, because i messed up my multiple workspaces. But I'll check it

$\endgroup$

1 Answer 1

0
$\begingroup$

Rosanswers logo

Use catkin_make run_tests, rather than just test.

See the how-to run tests documentation.


Originally posted by joq with karma: 25443 on 2014-06-24

This answer was ACCEPTED on the original site

Post score: 1


Original comments

Comment by ct2034 on 2014-06-24:
Thank you. This helps a lot as I can see the test output

Comment by William on 2014-06-24:
You can also call catkin_test_results to get a summary of tests.

Comment by ct2034 on 2014-06-24:
Do you mind checking out my follow up question, too: http://answers.ros.org/question/174807/rostest-arguments-in-cmakelists/

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.