0
$\begingroup$

I'm running some C++ unit tests in CI with

catkin run_tests my_pkg

I wanted to collect the unit tests' output (INFO or higher), similar to when we run

rostest my_pkg my_test.test --text

I've tried looking into XML files, but they don't have console output:

[ROSTEST]Running test [test_battery_exchange]
[1mROS_MASTER_URI=http://annie:37713/[0m
[1msetting /run_id to 8b27aca8-e077-11ee-b501-dc214839b96c[0m
[ROSTEST]running test test_battery_exchange
[1mprocess[test_battery_exchange-1]: started with pid [288742][0m
[1m[test_battery_exchange-1] process has finished cleanly
log file: /home/rr/.ros/log/8b27aca8-e077-11ee-b501-dc214839b96c/test_battery_exchange-1*.log[0m
[ROSTEST]test [test_battery_exchange] finished

That log file, though, /home/rr/.ros/log/8b27aca8-e077-11ee-b501-dc214839b96c/test_battery_exchange-1-stdout.log, does contain what I want:

[ INFO] [1710251488.686978957] [/test_battery_exchange ros.oks_alica.queryForBEC vector<oks_alica::Location> oks_alica::BatteryHandler::queryForBEC 91]: Discovered BEC at x: 1 y: 1 floor: 2
[ INFO] [1710251488.686988677] [/test_battery_exchange ros.oks_alica QueryForBEC::run 32]: Found Battery Exchange location at x: 5 y: 5 floor: 2

I'm not sure how I'd use catkin_test_results to capture these, it just shows me a summary of the test. I have also tried directly outputting to console, but no luck there either.

$\endgroup$

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Browse other questions tagged or ask your own question.