ros-tooling/action-ros-ci

Source local setup after the build completes

Closed this issue · 4 comments

Description

It seems that this action does not source the install/local_setup.bash after the build step completes.

Related Issues

I have a repository containing two packages. One package contains custom message and service definitions. The other package has tests written in python using those custom message and service definitions. The build step completes successfully but the test step fails because it cannot import my custom messages and services.

I can reproduce this behavior locally by building and then immediately running the tests. If I build, source install/local_setup.bash, then run the tests, the tests all pass.

Is there a reason this action does not source the local setup after the build completes?

May be something related to #822

Indeed, please take a look at that issue. tl;dr this should not be necessary, there must be something missing in the package with the custom message/service definitions (or possibly the other package).

I would recommend asking a question on Robotics Stack Exchange, making sure to include your CMakeLists.txt files and any other relevant file: https://robotics.stackexchange.com/questions/tagged/ros. Feel free to post the link to your question here.

Since I believe that there is nothing to do here for action-ros-ci, I will close this.

Thanks for the info. Posting the solution here for anyone else.

I had the package that implemented the message and service definitions as a dependency in my test package's package.xml file but not as a test_depend. Once I added it to the test dependencies as well I was able to run the tests successfully without sourcing the setup.bash first.

Great, happy to hear you found the issue!