[buildfarm] Missing package dependencies: %PKG_NAME%/package.xml
Pull request test on ROS buildfarm for this and this pull requests, both are in the same repo, errored with the following or similar:
http://build.ros.org/job/Lpr__ar_trac...
10:55:45 Scanning dependencies of target _run_tests_ar_track_alvar_roslaunch-check__tmp_catkin_workspace_src_ar_track_alvar_ar_track_alvar_test_marker_param_config-full.test
10:55:45 -- run_tests.py: execute commands
10:55:45 /usr/bin/cmake -E make_directory /tmp/catkin_workspace/test_results/ar_track_alvar
10:55:45 /opt/ros/lunar/share/roslaunch/cmake/../scripts/roslaunch-check -o /tmp/catkin_workspace/test_results/ar_track_alvar/roslaunch-check__tmp_catkin_workspace_src_ar_track_alvar_ar_track_alvar_test_marker_param_config-full.test.xml /tmp/catkin_workspace/src/ar_track_alvar/ar_track_alvar/test/marker_param_config-full.test
10:55:45 checking /tmp/catkin_workspace/src/ar_track_alvar/ar_track_alvar/test/marker_param_config-full.test
10:55:45 the rosdep view is empty: call 'sudo rosdep init' and 'rosdep update'
10:55:45 Missing package dependencies: ar_track_alvar/package.xml: rostest, rosbag
10:55:45 ...writing test results to /tmp/catkin_workspace/test_results/ar_track_alvar/roslaunch-check__tmp_catkin_workspace_src_ar_track_alvar_ar_track_alvar_test_marker_param_config-full.test.xml
10:55:45 FAILURE:
Both rostest, rosbag
are defined as test_depend
in package.xml.
FYI the same pull request passes on Travis CI.
UPDATE1: To the answer to Dirk,
The error message indicates that it is failing because the rosdep database has not been fetched.
Where is rosdep
called during 14.3. run tests
section?
And what would you suggest to let the tests pass? Since I only see an invocation of catkin_make_isolated
before the error occurs, I can only suspect CMakeLists.txt
where rostest is find_package
d, although this doesn't yet explain why rosbag
is tried to be installed...so I am at a loss.
I even tried the following to run tests locally to mimic 14.3. run tests section, which passed without an issue.
rm -fr ~/.ros/rosdep/sources.cache/
catkin_make_isolated --pkg ar_track_alvar --force-cmake --cmake-args -DCATKIN_ENABLE_TESTING=1 -DCATKIN_SKIP_TESTING=0 -DCATKIN_TEST_RESULTS_DIR=/tmp/catkin_workspace/test_results --catkin-make-args -j1 run_tests
UPDATE2: I see, now I can replicate the error locally (I had to remove ALL rosdep
dbs like below, not just one in my previous update):
rm -fr ~/.ros/rosdep/sources.cache/
sudo rm -fr /etc/ros/rosdep
I am not sure what you are using that for in your package though.
I need rostest
for add_rostest
macro I think, which is also documented in Catkin's manual so I think legitimate thing to do.
Also my test needs rosbag
to play a bag file, which I assumed legitimate as well since the Catkin's doc above shows a way to download a .bag file during test.
The buildfarm does not setup the rosdep database for you since it doesn't need it. Therefore you can't rely on it being present. :
rosbag
is being installed since as you mentioned is listed as a test dependency in your referenced package.xml file.
Hmmm...sorry but I'm still confused. Now I understand that the buildfarm does not have rosdep
db, but then I don't know how rosbag
get installed.
Anyways, all I want is to run tests that require packages defined in test_depend
.