Colcon Skip Building Tests with test_depend Tag

asked 2022-02-28 13:44:12 -0500

canderson gravatar image

updated 2022-03-12 10:11:00 -0500

I've looked at https://answers.ros.org/question/1155... but my question is different.

We have a package A which depends on package B only during testing. When I use "test_depends" tag around package B in my package.xml for package A, it is always built. I cannot find a way to enforce that colcon does not build tests. Note here that -DBUILD_TESTING=OFF does not work as this is only enforcing things at the individual package level, not at the colcon level. How do I get colcon to not build package B when package B is specified in package A with a "test_depends" tag?

edit retag flag offensive close merge delete