Skip to content

Use unique working directories in atlas_add_test

Frank Winklmeier requested to merge fwinkl/atlasexternals:ctest_workdir into master

Execute all tests defined with atlas_add_test in their own working directory matching the test name. This can be overridden using the WORKING_DIRECTORY argument. This ensures that parallel running (athena) ctests no longer overwrite each others output files (ATLINFR-2296).

Using a unique working directory by default seems the most sensible setting. We could of course reverse the logic and force the user to specify a unique directory only for the tests that require it. But this seems unnecessarily error prone.

Note that I had to re-shuffle the logic a bit in order to calculate the relative path based on the working directory. The previous code was actually buggy as it calculated the path relative to test-bin. This only worked because unitTestRun happened to be at the same directory depth.

Merge request reports

Loading