Merge topic 'ctest-tests-from-file'

701029726f ctest_test: add options INCLUDE_FROM_FILE and EXCLUDE_FROM_FILE
dbacc1d5a8 ctest: add command line option to exclude tests listed in a given file
022f20f663 ctest: add command line option to run the tests listed in a given file

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Alex <leha-bot@yandex.ru>
Merge-request: !9128
This commit is contained in:
Brad King
2024-01-26 15:14:49 +00:00
committed by Kitware Robot
17 changed files with 207 additions and 0 deletions

View File

@@ -13,6 +13,8 @@ Perform the :ref:`CTest Test Step` as a :ref:`Dashboard Client`.
[INCLUDE <include-regex>]
[EXCLUDE_LABEL <label-exclude-regex>]
[INCLUDE_LABEL <label-include-regex>]
[EXCLUDE_FROM_FILE <filename>]
[INCLUDE_FROM_FILE <filename>]
[EXCLUDE_FIXTURE <regex>]
[EXCLUDE_FIXTURE_SETUP <regex>]
[EXCLUDE_FIXTURE_CLEANUP <regex>]
@@ -72,6 +74,16 @@ The options are:
Specify a regular expression matching test labels to include.
Tests not matching this expression are excluded.
``EXCLUDE_FROM_FILE <filename>``
.. versionadded:: 3.29
Do NOT run tests listed with their exact name in the given file.
``INCLUDE_FROM_FILE <filename>``
.. versionadded:: 3.29
Only run the tests listed with their exact name in the given file.
``EXCLUDE_FIXTURE <regex>``
.. versionadded:: 3.7

View File

@@ -234,6 +234,30 @@ Run Tests
of the test's labels (i.e. the multiple ``-LE`` labels form an ``AND``
relationship). See `Label Matching`_.
.. option:: --tests-from-file <filename>
.. versionadded:: 3.29
Run tests listed in the given file.
This option tells CTest to run the tests which are listed in the given
file. The file must contain one exact test name per line.
Lines can be commented out using a ``#``.
This option can be combined with the other options like
``-R``, ``-E``, ``-L`` or ``-LE``.
.. option:: --exclude-from-file <filename>
.. versionadded:: 3.29
Exclude tests listed in the given file.
This option tells CTest to NOT run the tests which are listed in the given
file. The file must contain one exact test name per line.
Lines can be commented out using a ``#``.
This option can be combined with the other options like
``-R``, ``-E``, ``-L`` or ``-LE``.
.. option:: -FA <regex>, --fixture-exclude-any <regex>
Exclude fixtures matching ``<regex>`` from automatically adding any tests to

View File

@@ -0,0 +1,10 @@
ctest-tests-from-file
---------------------
* :manual:`ctest(1)` gained the :option:`--tests-from-file <ctest
--tests-from-file>` and :option:`--exclude-from-file <ctest
--exclude-from-file>` options to run or exclude tests named in a file.
* The :command:`ctest_test` command gained options
``INCLUDE_FROM_FILE`` and ``EXCLUDE_FROM_FILE`` to run or exclude
tests named in a file.