Avoid test_depend in rosdep install

asked 2021-02-03 08:12:38 -0500

130s gravatar image

updated 2021-02-03 09:40:43 -0500


I'm seeing rosdep install returns error when it can't find a package (say PKG_A) defined in test_depend in package.xml as a dependency, where PKG_A can't exist in the env I'm running.


Is there a way to continue having PKG_A as a test_depend, but let rosdep install pass w/o returning error?


  • In my work, build and test happen on different environment. Some pkgs are only for test and they cannot be present in the build environment.
  • My understanding is that the dependency defined in test_depend is not an exception when rosdep install tries to resolve dependency defined in package.xml. #q115526, where the author of test_depend concept and REP-0140 discusses its purpose, reads as below and this supports my understanding:

    Unfortunately, it currently does not resolve build or configuration dependencies needed by those tests. Use a <build_depend> for that instead. : Once REP-0140 is approved and implemented <test_depend> will work for build and configuration dependencies, as well as for execution dependencies. That is a definite improvement, but the packaging restrictions will remain.

edit retag flag offensive close merge delete



This would have a positive answer if ros-infrastructure/rosdep#789 ever gets merged.

gvdhoorn gravatar image gvdhoorn  ( 2021-02-03 09:10:15 -0500 )edit