ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question
0

ROSJava & catkin_make run_tests

asked 2017-08-30 15:43:44 -0500

kyle.rush gravatar image

It looks like at present catkin run_tests doesn't run the gradle test command for ROS java projects. Is there any easy way to cause that to happen?

I'd like to be able to use this functionality in the ShadowRobot CI setup on Circle and that invokes catkin run_tests and then handles copying the test reports to where Circle can access them, but this only works for my C++ packages not for my Java ones. Once gradle test is invoked, I can handle putting the results where the ShadowRobot system expects them, but if it's never called there's not much I feel I can do. I'm not fully familiar with Catkin\CMake so I'm curious if I can just add the expected functionality to the CMakeLists.txt in my Java packages somehow without having to modify the whole rosjava Catkin plugin.

Any ideas?

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
1

answered 2017-08-31 15:44:44 -0500

kyle.rush gravatar image

updated 2017-08-31 15:45:11 -0500

In case anyone was curious, I ended up writing a python script to invoke the gradlew test command, modified my build.gradle to aggregate all the test result xmls into a top level folder, then the python script parses those and aggregates the test case output into a summarized test report and finally writes that test summary to the workspace's build/test_results folder.

I hooked this script into the catkin_make run_tests command via the catkin_add_nosetest(...) option in my Java project CMakeLists.txt. As far as Catkin knows, it's running a python test suite. I just happen to proxy my Java testing through there. It's hacky but it works for now.

edit flag offensive delete link more

Comments

I've never tried it in a project of my own, but rosjava_core has some tests in the "test" folder that are actually executed when the workspace is built with catkin_make if I am not mistaken. Perhaps that structure can be replicated in your project too.

jubeira gravatar image jubeira  ( 2017-11-03 11:51:31 -0500 )edit

Question Tools

Stats

Asked: 2017-08-30 15:43:44 -0500

Seen: 119 times

Last updated: Aug 31 '17