catkin icon indicating copy to clipboard operation
catkin copied to clipboard

Running catkin's tests shouldn't require writing to the source tree

Open mikepurvis opened this issue 8 years ago • 6 comments

Mentioned here: https://github.com/ros/catkin/tree/kinetic-devel/test#tmp

Implemented here: https://github.com/ros/catkin/blob/fd229014461c5d494c721f8dbc51857bdeb51e41/test/utils.py#L24-L26

Any objection to moving this to use mkdtemp, or at the very least a location in the build tree?

mikepurvis avatar Aug 22 '16 18:08 mikepurvis

That would indeed be good. A pull request for this would be very welcome.

dirk-thomas avatar Aug 22 '16 18:08 dirk-thomas

Preference for build tree vs. mkdtemp?

mikepurvis avatar Aug 22 '16 18:08 mikepurvis

You will lose the persistence if you use the mkdtemp which is noted to be valuable for repeated runs so I'd say build space.

tfoote avatar Aug 22 '16 18:08 tfoote

Some of these tests are not run from CMake but only when manually being involved via nosetests. So while build space makes more sense it might not be feasible in that case.

dirk-thomas avatar Aug 22 '16 19:08 dirk-thomas

Oh I see— the issue being that we don't know where the build space is in this context, and it might not even exist, since you could run the nosetests directly in a source checkout without ever building.

Does catkin_add_nosetests pass us anything helpful here? Maybe the test could use an envvar or something if available, and fall back on a location in the source dir?

mikepurvis avatar Aug 23 '16 02:08 mikepurvis

catkin_add_nosetests doesn't provide any special context at the moment so the information about the build space is currently not available to the test.

dirk-thomas avatar Aug 23 '16 03:08 dirk-thomas