Proper workflow to install tests targets with catkin
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 EXCLUDEFROMALL 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!
Asked by Thordreck on 2018-11-04 17:39:52 UTC
Comments
Packages don't normally install tests. They're usually just run during development and continuous integration to make sure there aren't bugs.
Asked by ahendrix on 2018-11-04 20:44:37 UTC
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?
Asked by Thordreck on 2018-11-05 07:22:14 UTC
Yeah, the programs that I've seen for doing online checks are usually built and installed as normal executables.
Asked by ahendrix on 2018-11-05 13:54:47 UTC
Ok, I'll go with that. Thank you for your help!
Asked by Thordreck on 2018-11-05 14:28:58 UTC