text stringlengths 0 88 |
|---|
``MYVAR``. |
- ``path_list_append``: Appends singular ``VALUE`` to the current value of |
``MYVAR`` using the host platform's path list separator (``;`` on Windows |
and ``:`` elsewhere). |
- ``path_list_prepend``: Prepends singular ``VALUE`` to the current value of |
``MYVAR`` using the host platform's path list separator (``;`` on Windows |
and ``:`` elsewhere). |
- ``cmake_list_append``: Appends singular ``VALUE`` to the current value of |
``MYVAR`` using ``;`` as the separator. |
- ``cmake_list_prepend``: Prepends singular ``VALUE`` to the current value of |
``MYVAR`` using ``;`` as the separator. |
Unrecognized ``OP`` values will result in the test failing before it is |
executed. This is so that future operations may be added without changing |
valid behavior of existing tests. |
The environment changes from this property do not affect other tests. |
FAIL_REGULAR_EXPRESSION |
----------------------- |
If the output matches this regular expression the test will fail, |
regardless of the process exit code. |
If set, if the output matches one of specified regular expressions, |
the test will fail. Example: |
.. code-block:: cmake |
set_tests_properties(mytest PROPERTIES |
FAIL_REGULAR_EXPRESSION "[^a-z]Error;ERROR;Failed" |
) |
``FAIL_REGULAR_EXPRESSION`` expects a list of regular expressions. |
See also the :prop_test:`PASS_REGULAR_EXPRESSION` and |
:prop_test:`SKIP_REGULAR_EXPRESSION` test properties. |
FIXTURES_CLEANUP |
---------------- |
.. versionadded:: 3.7 |
Specifies a list of fixtures for which the test is to be treated as a cleanup |
test. These fixture names are distinct from test case names and are not |
required to have any similarity to the names of tests associated with them. |
Fixture cleanup tests are ordinary tests with all of the usual test |
functionality. Setting the ``FIXTURES_CLEANUP`` property for a test has two |
primary effects: |
- CTest will ensure the test executes after all other tests which list any of |
the fixtures in its :prop_test:`FIXTURES_REQUIRED` property. |
- If CTest is asked to run only a subset of tests (e.g. using regular |
expressions or the ``--rerun-failed`` option) and the cleanup test is not in |
the set of tests to run, it will automatically be added if any tests in the |
set require any fixture listed in ``FIXTURES_CLEANUP``. |
A cleanup test can have multiple fixtures listed in its ``FIXTURES_CLEANUP`` |
property. It will execute only once for the whole CTest run, not once for each |
fixture. A fixture can also have more than one cleanup test defined. If there |
are multiple cleanup tests for a fixture, projects can control their order with |
the usual :prop_test:`DEPENDS` test property if necessary. |
A cleanup test is allowed to require other fixtures, but not any fixture listed |
in its ``FIXTURES_CLEANUP`` property. For example: |
.. code-block:: cmake |
# Ok: Dependent fixture is different to cleanup |
set_tests_properties(cleanupFoo PROPERTIES |
FIXTURES_CLEANUP Foo |
FIXTURES_REQUIRED Bar |
) |
# Error: cannot require same fixture as cleanup |
set_tests_properties(cleanupFoo PROPERTIES |
FIXTURES_CLEANUP Foo |
FIXTURES_REQUIRED Foo |
) |
Cleanup tests will execute even if setup or regular tests for that fixture fail |
or are skipped. |
See :prop_test:`FIXTURES_REQUIRED` for a more complete discussion of how to use |
test fixtures. |
FIXTURES_REQUIRED |
----------------- |
.. versionadded:: 3.7 |
Specifies a list of fixtures the test requires. Fixture names are case |
sensitive and they are not required to have any similarity to test names. |
Fixtures are a way to attach setup and cleanup tasks to a set of tests. If a |
test requires a given fixture, then all tests marked as setup tasks for that |
fixture will be executed first (once for the whole set of tests, not once per |
test requiring the fixture). After all tests requiring a particular fixture |
have completed, CTest will ensure all tests marked as cleanup tasks for that |
fixture are then executed. Tests are marked as setup tasks with the |
:prop_test:`FIXTURES_SETUP` property and as cleanup tasks with the |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.