upgraded ctest mechanisms, using FIXTURES
upgraded ctest mechanisms, using FIXTURES
The ctest mechanism is largely changed.
-
the verification step is now ON by default. To disable verification, add the flag
ctest -LE verify. This makes it simpler to maintain, and no env-var dependency. -
Changed
EXTRA_FILEStoFILES_SETUPto adhere to theFIXTURE_SETUPconcept. -
Allowed tests to have
FIXTURE_CLEANUPruns. -
All tests now ensure a
FIXTURE_SETUPexists with that tests name. In this way one can impose subsequent orderings using other fixtures. -
The folder + files create for a test is now created at test time, rather than at configure time. This makes tests easily rerunned by merely deleting the folders. The downside is that the number of tests just doubled. However, ctest just doesn't handle these things elegantly. It also means that tests likely won't run after changing the fdf files, since the fdf files are copied just before running.
The only way to bypass this is to disable individual tests (the test that copies the fdf file, e.g.)
-
stripped lots of
list(JOINcommands. Now rely onCOMMAND_EXPAND_LISTSin theadd_testcommand. -
The verification step is now a fixture, it will only run if the parent test succeeded.
-
When creating a test, one can now request the folder where it was runned. In this case it makes it simple to create complicated workflows for copying data from other tests. See e.g. in 16.TranSiesta. It might be necessary to add cleanup of files for big files in some cases.
The variable to control this is:
-
FILES_CLEANUP(to mirrorFILES_SETUP).
-
-
there is now not any 2nd folder (work/) It was never needed. The fdf file still lies in the top-folder (i.e. not in the folder where the test is runned).
Signed-off-by: Nick Papior nickpapior@gmail.com
Details
Please detail what this MR introduces
-
Describe in details what this MR does? (link to the issue by writing #479 (closed) and #480 here) -
create a new file in ./Changes/<MR-Number>.<TYPE>.mdwith content, see e.g../Changes/README.mdfor details. -
if this breaks compatibility, add mentions to the Docs/compatibility.tex