Proper workflow to install tests targets with catkin

asked 2018-11-04 16:39:52 -0500

Thordreck gravatar image

Hi, what's the correct way to install tests targets using cmake install command? It seems targets generated with catkin_add_gtest or add_rostest do not depend on the ALL target themselves, so trying to include them in the install list results in the following warning:

Target "XXXX" has EXCLUDE_FROM_ALL set and will not be built by default but an install rule has been provided for it.. CMake does not define behavior for this case.

I couldn't find any mention on this in the rostest documentation. Any ideas? Thanks in advance!

edit retag flag offensive close merge delete

Comments

Packages don't normally install tests. They're usually just run during development and continuous integration to make sure there aren't bugs.

ahendrix gravatar image ahendrix  ( 2018-11-04 19:44:37 -0500 )edit

I see. What I was trying to achieve is to have some sort of "test program" that does not check for errors in the code, but rather issues with the hardware itself (e.g. check that peripheral devices are correctly found etc). I guess my best bet in this case is to add it as a normal executable?

Thordreck gravatar image Thordreck  ( 2018-11-05 06:22:14 -0500 )edit

Yeah, the programs that I've seen for doing online checks are usually built and installed as normal executables.

ahendrix gravatar image ahendrix  ( 2018-11-05 12:54:47 -0500 )edit

Ok, I'll go with that. Thank you for your help!

Thordreck gravatar image Thordreck  ( 2018-11-05 13:28:58 -0500 )edit