summaryrefslogtreecommitdiff
path: root/Help
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2023-01-17 14:17:52 +0000
committerKitware Robot <kwrobot@kitware.com>2023-01-17 09:18:04 -0500
commitdd18be5ebf6486486a272f47df3318d1db3a03cc (patch)
treeabb3a3469eba5704c5a458c30f1485731f91028d /Help
parent99c6e032d65b74281ca80079f71c28e171579e01 (diff)
parent0661de58d845f537d070979f9b49dd05800a141e (diff)
downloadcmake-dd18be5ebf6486486a272f47df3318d1db3a03cc.tar.gz
Merge topic 'ctest-no-tests-action-env-var'
0661de58d8 ctest(1): Add CTEST_NO_TESTS_ACTION env var Acked-by: Kitware Robot <kwrobot@kitware.com> Acked-by: buildbot <buildbot@kitware.com> Merge-request: !8044
Diffstat (limited to 'Help')
-rw-r--r--Help/envvar/CTEST_NO_TESTS_ACTION.rst14
-rw-r--r--Help/manual/cmake-env-variables.7.rst1
-rw-r--r--Help/manual/ctest.1.rst5
-rw-r--r--Help/release/dev/ctest-no-tests-action-env-var.rst7
4 files changed, 27 insertions, 0 deletions
diff --git a/Help/envvar/CTEST_NO_TESTS_ACTION.rst b/Help/envvar/CTEST_NO_TESTS_ACTION.rst
new file mode 100644
index 0000000000..2bc86dc6cd
--- /dev/null
+++ b/Help/envvar/CTEST_NO_TESTS_ACTION.rst
@@ -0,0 +1,14 @@
+CTEST_NO_TESTS_ACTION
+---------------------
+
+.. versionadded:: 3.26
+
+.. include:: ENV_VAR.txt
+
+Environment variable that controls how :manual:`ctest <ctest(1)>` handles
+cases when there are no tests to run. Possible values are: ``error``,
+``ignore``, empty or unset.
+
+The :option:`--no-tests=\<action\> <ctest --no-tests>` option to
+:manual:`ctest <ctest(1)>` overrides this environment variable if both
+are given.
diff --git a/Help/manual/cmake-env-variables.7.rst b/Help/manual/cmake-env-variables.7.rst
index 50fcf756cb..4c29b80f13 100644
--- a/Help/manual/cmake-env-variables.7.rst
+++ b/Help/manual/cmake-env-variables.7.rst
@@ -92,6 +92,7 @@ Environment Variables for CTest
/envvar/CMAKE_CONFIG_TYPE
/envvar/CTEST_INTERACTIVE_DEBUG_MODE
+ /envvar/CTEST_NO_TESTS_ACTION
/envvar/CTEST_OUTPUT_ON_FAILURE
/envvar/CTEST_PARALLEL_LEVEL
/envvar/CTEST_PROGRESS_OUTPUT
diff --git a/Help/manual/ctest.1.rst b/Help/manual/ctest.1.rst
index 30a9eae012..5e82faae0d 100644
--- a/Help/manual/ctest.1.rst
+++ b/Help/manual/ctest.1.rst
@@ -435,6 +435,11 @@ Run Tests
unifies the behavior of CTest by either returning an error code if no tests
were found or by ignoring it.
+ .. versionadded:: 3.26
+
+ This option can also be set by setting the :envvar:`CTEST_NO_TESTS_ACTION`
+ environment variable.
+
View Help
=========
diff --git a/Help/release/dev/ctest-no-tests-action-env-var.rst b/Help/release/dev/ctest-no-tests-action-env-var.rst
new file mode 100644
index 0000000000..8679977f83
--- /dev/null
+++ b/Help/release/dev/ctest-no-tests-action-env-var.rst
@@ -0,0 +1,7 @@
+ctest-no-tests-action-env-var
+-----------------------------
+
+* The :envvar:`CTEST_NO_TESTS_ACTION` environment variable was added to
+ provide a default value for the
+ :option:`--no-tests=\<action\> <ctest --no-tests>` command line
+ argument of :manual:`ctest(1)`.