summaryrefslogtreecommitdiffstats
path: root/Help/manual/ctest.1.rst
diff options
context:
space:
mode:
authorKyle Edwards <kyle.edwards@kitware.com>2019-11-22 19:33:11 (GMT)
committerBrad King <brad.king@kitware.com>2019-11-26 14:10:22 (GMT)
commita033bafbe01fcb4654f075955e0b3de7be81b0f7 (patch)
treeef5e4300b0cc3ae806cfa6a597f12825d43ec84c /Help/manual/ctest.1.rst
parenta64ba0235fbacfe58751c222997bdd74cf973359 (diff)
downloadCMake-a033bafbe01fcb4654f075955e0b3de7be81b0f7.zip
CMake-a033bafbe01fcb4654f075955e0b3de7be81b0f7.tar.gz
CMake-a033bafbe01fcb4654f075955e0b3de7be81b0f7.tar.bz2
Help: Clarify how tests are run if no resource spec file is specified
Fixes: #19985
Diffstat (limited to 'Help/manual/ctest.1.rst')
-rw-r--r--Help/manual/ctest.1.rst17
1 files changed, 17 insertions, 0 deletions
diff --git a/Help/manual/ctest.1.rst b/Help/manual/ctest.1.rst
index 6af795e..e29ebca 100644
--- a/Help/manual/ctest.1.rst
+++ b/Help/manual/ctest.1.rst
@@ -1331,6 +1331,23 @@ the :ref:`environment variables <ctest-resource-environment-variables>` to
determine which resources have been allocated to each group. For example,
each group may correspond to a process the test will spawn when executed.
+Note that even if a test specifies a ``RESOURCE_GROUPS`` property, it is still
+possible for that to test to run without any resource allocation (and without
+the corresponding
+:ref:`environment variables <ctest-resource-environment-variables>`)
+if the user does not pass a resource specification file. Passing this file,
+either through the ``--resource-spec-file`` command-line argument or the
+``RESOURCE_SPEC_FILE`` argument to :command:`ctest_test`, is what activates the
+resource allocation feature. Tests should check the
+``CTEST_RESOURCE_GROUP_COUNT`` environment variable to find out whether or not
+resource allocation is activated. This variable will always (and only) be
+defined if resource allocation is activated. If resource allocation is not
+activated, then the ``CTEST_RESOURCE_GROUP_COUNT`` variable will not exist,
+even if it exists for the parent ``ctest`` process. If a test absolutely must
+have resource allocation, then it can return a failing exit code or use the
+:prop_test:`SKIP_RETURN_CODE` or :prop_test:`SKIP_REGULAR_EXPRESSION`
+properties to indicate a skipped test.
+
.. _`ctest-resource-specification-file`:
Resource Specification File