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

Specify nosetests working directory

asked 2015-06-01 04:56:12 -0500

luator gravatar image

According to this documentation, it is possible to specify a working directory for the nosetests. I want the nosetests to run in the build directory, so I tried the following:

catkin_add_nosetests(test WORKING_DIRECTORY ${PROJECT_BINARY_DIR})

This is not working, however. When I print the current directory in a nosetest using

print "working directory: ", os.path.abspath(os.path.curdir)

the result is still the source directory where the tests are defined.

I am still using groovy, so maybe this parameter is not yet implemented in groovy? Or am I using the working_directory parameter wrongly?

In any case, is there a way to fix this?

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
1

answered 2015-06-01 14:02:11 -0500

Dirk Thomas gravatar image

The WORKING_DIRECTORY option does not work when you specify a directory as the first argument. Then that directory is implicitly used by nosetests as the cwd. If you want to specify a different cwd you need to specify the test files explicitly.

I have updated the docblock to mention this: https://github.com/ros/catkin/commit/...

edit flag offensive delete link more

Question Tools

2 followers

Stats

Asked: 2015-06-01 04:56:12 -0500

Seen: 859 times

Last updated: Jun 01 '15