Specifies a list of fixtures for which the test is to be treated as a setup test.
Fixture setup tests are ordinary tests with all of the usual test functionality. Setting the FIXTURES_SETUP property for a test has two primary effects:
A setup test can have multiple fixtures listed in its FIXTURES_SETUP property. It will execute only once for the whole CTest run, not once for each fixture. A fixture can also have more than one setup test defined. If there are multiple setup tests for a fixture, projects can control their order with the usual DEPENDS test property if necessary.
A setup test is allowed to require other fixtures, but not any fixture listed in its FIXTURES_SETUP property. For example:
# Ok: dependent fixture is different to setup
set_tests_properties(setupFoo PROPERTIES
FIXTURES_SETUP Foo
FIXTURES_REQUIRED Bar
)
# Error: cannot require same fixture as setup
set_tests_properties(setupFoo PROPERTIES
FIXTURES_SETUP Foo
FIXTURES_REQUIRED Foo
)
If any of a fixture’s setup tests fail, none of the tests listing that fixture in its FIXTURES_REQUIRED property will be run. Cleanup tests will, however, still be executed.
See FIXTURES_REQUIRED for a more complete discussion of how to use test fixtures.