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

How can I integrate Python rosunit unit tests into the cmake build?

asked 2017-10-16 02:46:41 -0600

thinwybk gravatar image

updated 2017-10-17 01:11:52 -0600

I would like to run rosunit Python unit tests as part of make test in the CI environment. In the wiki and in the catkin docs it is recommended to use cmake_add_nodetest() for that. Is cmake_add_nosetest() specific to nosetest or can it used with the plain unittest test runner as well/instead? (I know that rosunit depends on unittest. I didn't recognize a dependency from nosetest.) If it's possible: Could you guide me to an integration example in the ROS code base?

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
0

answered 2017-10-16 17:23:47 -0600

tfoote gravatar image

nosetest is a test runner. It will collect and run detected unittest test cases found in the test files. See: https://nose.readthedocs.io/en/latest...

edit flag offensive delete link more

Comments

Sorry, my question is not precise enough. I was interested in if I can use only nosetest 's test runner or any other as well (e.g. the one of unittest).

thinwybk gravatar image thinwybk  ( 2017-10-17 01:11:12 -0600 )edit

It's likely you could add integration for it but it's not currently supported.

tfoote gravatar image tfoote  ( 2017-10-18 18:17:33 -0600 )edit

Ok. If I would like to add integration where in the sources I should dive into first?

thinwybk gravatar image thinwybk  ( 2017-10-19 02:37:51 -0600 )edit
1

I would look inside catkin and make a parallel function like catkin_add_nosetests: https://github.com/ros/catkin/blob/ki...

tfoote gravatar image tfoote  ( 2017-10-19 17:43:11 -0600 )edit

Question Tools

2 followers

Stats

Asked: 2017-10-16 02:46:41 -0600

Seen: 549 times

Last updated: Oct 17 '17