Skip to content

Test Updates, master branch (2018.03.13.)

This MR is meant to replace !250 (closed), and address issues brought up in ATLINFR-2296 and in https://gitlab.cern.ch/atlas/athena/merge_requests/9258.

In the end I decided to do something much simpler than what @fwinkl was suggesting. First off, I didn't want to change the default behaviour of atlas_add_test(...), that it runs all of its tests in the same directory. Because I do know that a few tests in atlas/athena depend on this behaviour, and I didn't want to update all of them.

Frank was bringing up a reasonable point, that since add_test has a WORKING_DIRECTORY argument, it could've made sense to add a WORKING_DIRECTORY argument to atlas_add_test as well. I contemplated this for a while. But in the end decided that setting the working directory through the general PROPERTIES argument is just as good.

I was trying for a while to teach atlas_add_test(...) how to create the run directory at build time based on the "final" WORKING_DIRECTORY property that was set on the test. But could just not find a way to do this. (There's no generator expression available that would allow us to get test properties.) So the users will have to take care of creating the run directory themselves if they intend to use a non-standard one. Like:

https://gitlab.cern.ch/akraszna/AtlasAddTestTests/blob/master/TestPackage/CMakeLists.txt#L9-13

With all this said, the only thing I changed in this code was to fix the issue with relative paths that Frank brought up in !250 (closed).

Merge request reports

Loading