catkin
catkin copied to clipboard
Running catkin's tests shouldn't require writing to the source tree
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?
That would indeed be good. A pull request for this would be very welcome.
Preference for build tree vs. mkdtemp?
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.
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.
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?
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.