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_FILES to FILES_SETUP to adhere to the FIXTURE_SETUP concept.

  • Allowed tests to have FIXTURE_CLEANUP runs.

  • All tests now ensure a FIXTURE_SETUP exists 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(JOIN commands. Now rely on COMMAND_EXPAND_LISTS in the add_test command.

  • 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 mirror FILES_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>.md with content, see e.g. ./Changes/README.md for details.
  • if this breaks compatibility, add mentions to the Docs/compatibility.tex

Why is it needed

Authors

Edited by Nick R. Papior

Merge request reports

Loading