catkin_add_nosetests warnings?
I'm having trouble figuring out how to invoke a python unittest (non-rostest) from within Catkin without getting warnings. I'm invoking catkin_add_nosetests(test/package_test.py)
from CMakeLists.txt, but even a successful test run with no output still generates summary output at the end:
Ran 1 test in 0.000s
OK
catkin build --catkin-make-args run_tests
seems to interpret this output as a warning:
Starting >>> package
______________________________
Warnings << package:make /home/user/catkin_ws/logs/package/build.make.002.log
.
----------------------------------------------------------------------
Ran 1 test in 0.000s
OK
cd /home/user/catkin_ws/build/package; catkin build --get-env package | catkin env -si /usr/bin/make run_tests --jobserver-auth=3,4; cd -
.......................................................................
Finished <<< package [ 0.9 seconds ]
...
[build] Warnings: 1 packages succeeded with warnings.
If I use rosunit.unitrun
instead of unittest.main
from within the test script, then the script itself no longer generates that summary output. However, catkin's own nosetest infrastructure bypasses my __main__
code and forces it to run with the normal unittest runner anyway.
I'm having trouble figuring out how this is supposed to work. Any pointers on what I'm doing wrong? I'm running ROS Noetic on PopOS/Ubuntu 20.04.
Asked by bmartin427 on 2023-02-23 15:57:57 UTC
Comments