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

Rostest and C++: Test node does not exist or is not executable

asked 2020-03-17 10:14:40 -0600

gerhmi gravatar image

Hi!

I'm trying to integrate my workspace with GitLab CI and have been encountering this issue in the CI shell:

FAILURE: Test node [husky_test/common_spawn_test] does not exist or is not executable

However, locally, everything works fine and the test yields a success. Here's the testing section of my CMakeLists.txt file:

#############
## Testing ##
#############

if(CATKIN_ENABLE_TESTING)
  add_rostest_gtest(common_test test/common.test src/common.cpp)
  target_link_libraries(common_test ${catkin_LIBRARIES})
endif()

And the gitlab-ci.yaml file contains the following lines for running the tests:

- catkin build --summarize --no-status --force-color
- catkin run_tests --no-status --force-color

Maybe I have to add the file as an executable in the CMakeLists, but I'm not sure. Thank you in advance!

edit retag flag offensive close merge delete

Comments

Any luck with this?

Link gravatar image Link  ( 2020-03-18 10:37:53 -0600 )edit

What was wrong?

Link gravatar image Link  ( 2020-03-18 10:44:12 -0600 )edit

2 Answers

Sort by ยป oldest newest most voted
-1

answered 2020-03-18 10:40:20 -0600

gerhmi gravatar image

Turns out the answer was just a simple mistake. I'll mark this as solved. Thanks for the help!

edit flag offensive delete link more

Comments

please detail what the simple mistake was. If you made it then others may.

PeterMilani gravatar image PeterMilani  ( 2021-01-05 20:52:54 -0600 )edit
0

answered 2020-03-17 15:30:57 -0600

Link gravatar image

Hey it looks like you forgot to run catkin tests which builds all of the test executables by setting the cmake CATKIN_ENABLE_TESTING flag. I would expect your sequence to look like the following:

catkin build --summarize --no-status --force-color
catkin tests --summarize --no-status --force-color
catkin run_tests --no-status --force-color

Please note that I use catkin_make myself so this usually looks like the following for me (ignoring flags for now):

catkin_make
catkin_make tests
catkin_make run_tests
edit flag offensive delete link more

Question Tools

2 followers

Stats

Asked: 2020-03-17 10:14:40 -0600

Seen: 800 times

Last updated: Mar 18 '20