Setup and cleanup fixtures should be interleaved with each repetition of a test when using --repeat-until-fail
Currently ctest --repeat-until-fail 3
will do
- fixture_setup
- fixture_setup
- fixture_setup
- test
- test
- test
- fixture_cleanup
- fixture_cleanup
- fixture_cleanup
But what should happen is:
- fixture_setup
- test
- fixture_cleanup
- fixture_setup
- test
- fixture_cleanup
- fixture_setup
- test
- fixture_cleanup
That was the whole point of specifying the FIXTURES_REQUIRED
relationship between test
and fixture_setup
/fixture_cleanup
after all.
Here is a mailing list thread on this issue that reaches no conclusion: https://cmake.org/pipermail/cmake/2019-April/069346.html