summaryrefslogtreecommitdiffstats
path: root/Help
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2019-11-04 21:11:11 (GMT)
committerBrad King <brad.king@kitware.com>2019-11-05 17:08:01 (GMT)
commitaf9ed543b0f9d032158f91cdce7ad6908ff9365b (patch)
tree35440e92b200965f0be878b37226ca0663bdf0a2 /Help
parentc1d5d5eb11e0260ffadda0851ac844ab46b6b179 (diff)
downloadCMake-af9ed543b0f9d032158f91cdce7ad6908ff9365b.zip
CMake-af9ed543b0f9d032158f91cdce7ad6908ff9365b.tar.gz
CMake-af9ed543b0f9d032158f91cdce7ad6908ff9365b.tar.bz2
CTest: Rename PROCESSES test property to RESOURCE_GROUPS
The `PROCESSES` test property name added for CMake 3.16 is too close to the existing `PROCESSORS` test property. Furthermore, the property in principle specifies groups of resources organized in a way that is meaningful to a particular test. The groups may often correspond to processes but they could have other meanings. Since the property name `PROCESSES` has not been in a final 3.16 release yet, simply rename it to `RESOURCE_GROUPS`. Fixes: #19914
Diffstat (limited to 'Help')
-rw-r--r--Help/manual/cmake-properties.7.rst2
-rw-r--r--Help/manual/ctest.1.rst76
-rw-r--r--Help/prop_test/PROCESSES.rst54
-rw-r--r--Help/prop_test/RESOURCE_GROUPS.rst54
-rw-r--r--Help/prop_test/RESOURCE_LOCK.rst14
5 files changed, 101 insertions, 99 deletions
diff --git a/Help/manual/cmake-properties.7.rst b/Help/manual/cmake-properties.7.rst
index 1369aa3..a59dd6b 100644
--- a/Help/manual/cmake-properties.7.rst
+++ b/Help/manual/cmake-properties.7.rst
@@ -414,10 +414,10 @@ Properties on Tests
/prop_test/LABELS
/prop_test/MEASUREMENT
/prop_test/PASS_REGULAR_EXPRESSION
- /prop_test/PROCESSES
/prop_test/PROCESSOR_AFFINITY
/prop_test/PROCESSORS
/prop_test/REQUIRED_FILES
+ /prop_test/RESOURCE_GROUPS
/prop_test/RESOURCE_LOCK
/prop_test/RUN_SERIAL
/prop_test/SKIP_REGULAR_EXPRESSION
diff --git a/Help/manual/ctest.1.rst b/Help/manual/ctest.1.rst
index a18d43f..569f0f7 100644
--- a/Help/manual/ctest.1.rst
+++ b/Help/manual/ctest.1.rst
@@ -1317,8 +1317,8 @@ The CTest hardware allocation feature consists of two inputs:
* The :ref:`hardware specification file <ctest-hardware-specification-file>`,
described below, which describes the hardware resources available on the
system, and
-* The :prop_test:`PROCESSES` property of tests, which describes the resources
- required by the test
+* The :prop_test:`RESOURCE_GROUPS` property of tests, which describes the
+ resources required by the test
When CTest runs a test, the hardware allocated to that test is passed in the
form of a set of
@@ -1326,11 +1326,11 @@ form of a set of
described below. Using this information to decide which resource to connect to
is left to the test writer.
-Please note that these processes are not spawned by CTest. The ``PROCESSES``
-property merely tells CTest what processes the test expects to launch. It is up
-to the test itself to do this process spawning, and read the :ref:`environment
-variables <ctest-hardware-environment-variables>` to determine which resources
-each process has been allocated.
+The ``RESOURCE_GROUPS`` property tells CTest what resources a test expects
+to use grouped in a way meaningful to the test. The test itself must read
+the :ref:`environment variables <ctest-hardware-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.
.. _`ctest-hardware-specification-file`:
@@ -1423,10 +1423,10 @@ In the example file above, there are four GPUs with ID's 0 through 3. GPU 0 has
2 slots, GPU 1 has 4, GPU 2 has 2, and GPU 3 has a default of 1 slot. There is
also one cryptography chip with 4 slots.
-``PROCESSES`` Property
-----------------------
+``RESOURCE_GROUPS`` Property
+----------------------------
-See :prop_test:`PROCESSES` for a description of this property.
+See :prop_test:`RESOURCE_GROUPS` for a description of this property.
.. _`ctest-hardware-environment-variables`:
@@ -1436,65 +1436,67 @@ Environment Variables
Once CTest has decided which resources to allocate to a test, it passes this
information to the test executable as a series of environment variables. For
each example below, we will assume that the test in question has a
-:prop_test:`PROCESSES` property of ``2,gpus:2;gpus:4,gpus:1,crypto_chips:2``.
+:prop_test:`RESOURCE_GROUPS` property of
+``2,gpus:2;gpus:4,gpus:1,crypto_chips:2``.
The following variables are passed to the test process:
-.. envvar:: CTEST_PROCESS_COUNT
+.. envvar:: CTEST_RESOURCE_GROUP_COUNT
- The total number of processes specified by the :prop_test:`PROCESSES`
+ The total number of groups specified by the :prop_test:`RESOURCE_GROUPS`
property. For example:
- * ``CTEST_PROCESS_COUNT=3``
+ * ``CTEST_RESOURCE_GROUP_COUNT=3``
This variable will only be defined if :manual:`ctest(1)` has been given a
``--hardware-spec-file``, or if :command:`ctest_test` has been given a
``HARDWARE_SPEC_FILE``. If no hardware specification file has been given,
this variable will not be defined.
-.. envvar:: CTEST_PROCESS_<num>
+.. envvar:: CTEST_RESOURCE_GROUP_<num>
- The list of resource types allocated to each process, with each item
+ The list of resource types allocated to each group, with each item
separated by a comma. ``<num>`` is a number from zero to
- ``CTEST_PROCESS_COUNT`` minus one. ``CTEST_PROCESS_<num>`` is defined for
- each ``<num>`` in this range. For example:
+ ``CTEST_RESOURCE_GROUP_COUNT`` minus one. ``CTEST_RESOURCE_GROUP_<num>``
+ is defined for each ``<num>`` in this range. For example:
- * ``CTEST_PROCESS_0=gpus``
- * ``CTEST_PROCESS_1=gpus``
- * ``CTEST_PROCESS_2=crypto_chips,gpus``
+ * ``CTEST_RESOURCE_GROUP_0=gpus``
+ * ``CTEST_RESOURCE_GROUP_1=gpus``
+ * ``CTEST_RESOURCE_GROUP_2=crypto_chips,gpus``
-.. envvar:: CTEST_PROCESS_<num>_<resource-type>
+.. envvar:: CTEST_RESOURCE_GROUP_<num>_<resource-type>
The list of resource IDs and number of slots from each ID allocated to each
- process for a given resource type. This variable consists of a series of
+ group for a given resource type. This variable consists of a series of
pairs, each pair separated by a semicolon, and with the two items in the pair
separated by a comma. The first item in each pair is ``id:`` followed by the
ID of a resource of type ``<resource-type>``, and the second item is
``slots:`` followed by the number of slots from that resource allocated to
- the given process. For example:
+ the given group. For example:
- * ``CTEST_PROCESS_0_GPUS=id:0,slots:2``
- * ``CTEST_PROCESS_1_GPUS=id:2,slots:2``
- * ``CTEST_PROCESS_2_GPUS=id:1,slots:4;id:3,slots:1``
- * ``CTEST_PROCESS_2_CRYPTO_CHIPS=id:card0,slots:2``
+ * ``CTEST_RESOURCE_GROUP_0_GPUS=id:0,slots:2``
+ * ``CTEST_RESOURCE_GROUP_1_GPUS=id:2,slots:2``
+ * ``CTEST_RESOURCE_GROUP_2_GPUS=id:1,slots:4;id:3,slots:1``
+ * ``CTEST_RESOURCE_GROUP_2_CRYPTO_CHIPS=id:card0,slots:2``
- In this example, process 0 gets 2 slots from GPU ``0``, process 1 gets 2 slots
- from GPU ``2``, and process 2 gets 4 slots from GPU ``1`` and 2 slots from
+ In this example, group 0 gets 2 slots from GPU ``0``, group 1 gets 2 slots
+ from GPU ``2``, and group 2 gets 4 slots from GPU ``1`` and 2 slots from
cryptography chip ``card0``.
- ``<num>`` is a number from zero to ``CTEST_PROCESS_COUNT`` minus one.
+ ``<num>`` is a number from zero to ``CTEST_RESOURCE_GROUP_COUNT`` minus one.
``<resource-type>`` is the name of a resource type, converted to uppercase.
- ``CTEST_PROCESS_<num>_<resource-type>`` is defined for the product of each
- ``<num>`` in the range listed above and each resource type listed in
- ``CTEST_PROCESS_<num>``.
+ ``CTEST_RESOURCE_GROUP_<num>_<resource-type>`` is defined for the product
+ of each ``<num>`` in the range listed above and each resource type listed in
+ ``CTEST_RESOURCE_GROUP_<num>``.
Because some platforms have case-insensitive names for environment variables,
the names of resource types may not clash in a case-insensitive environment.
Because of this, for the sake of simplicity, all resource types must be
listed in all lowercase in the
- :ref:`hardware specification file <ctest-hardware-specification-file>` and in
- the :prop_test:`PROCESSES` property, and they are converted to all uppercase
- in the ``CTEST_PROCESS_<num>_<resource-type>`` environment variable.
+ :ref:`hardware specification file <ctest-hardware-specification-file>` and
+ in the :prop_test:`RESOURCE_GROUPS` property, and they are converted to all
+ uppercase in the ``CTEST_RESOURCE_GROUP_<num>_<resource-type>`` environment
+ variable.
See Also
========
diff --git a/Help/prop_test/PROCESSES.rst b/Help/prop_test/PROCESSES.rst
deleted file mode 100644
index d09c6d1..0000000
--- a/Help/prop_test/PROCESSES.rst
+++ /dev/null
@@ -1,54 +0,0 @@
-PROCESSES
-----------
-
-Set to specify the number of processes spawned by a test, and the resources
-that they require. See :ref:`hardware allocation <ctest-hardware-allocation>`
-for more information on how this property integrates into the CTest hardware
-allocation feature.
-
-The ``PROCESSES`` property is a :ref:`semicolon-separated list <CMake Language
-Lists>` of process descriptions. Each process description consists of an
-optional number of processes for the description followed by a series of
-resource requirements for those processes. These requirements (and the number
-of processes) are separated by commas. The resource requirements consist of the
-name of a resource type, followed by a colon, followed by an unsigned integer
-specifying the number of slots required on one resource of the given type.
-
-Please note that these processes are not spawned by CTest. The ``PROCESSES``
-property merely tells CTest what processes the test expects to launch. It is up
-to the test itself to do this process spawning, and read the :ref:`environment
-variables <ctest-hardware-environment-variables>` to determine which resources
-each process has been allocated.
-
-Consider the following example:
-
-.. code-block:: cmake
-
- add_test(NAME MyTest COMMAND MyExe)
- set_property(TEST MyTest PROPERTY PROCESSES
- "2,gpus:2"
- "gpus:4,crypto_chips:2")
-
-In this example, there are two process descriptions (implicitly separated by a
-semicolon.) The content of the first description is ``2,gpus:2``. This
-description spawns 2 processes, each of which requires 2 slots from a single
-GPU. The content of the second description is ``gpus:4,crypto_chips:2``. This
-description does not specify a process count, so a default of 1 is assumed.
-This single process requires 4 slots from a single GPU and 2 slots from a
-single cryptography chip. In total, 3 processes are spawned from this test,
-each with their own unique requirements.
-
-When CTest sets the :ref:`environment variables
-<ctest-hardware-environment-variables>` for a test, it assigns a process number
-based on the process description, starting at 0 on the left and the number of
-processes minus 1 on the right. For example, in the example above, the two
-processes in the first description would have IDs of 0 and 1, and the single
-process in the second description would have an ID of 2.
-
-Both the ``PROCESSES`` and :prop_test:`RESOURCE_LOCK` properties serve similar
-purposes, but they are distinct and orthogonal. Resources specified by
-``PROCESSES`` do not affect :prop_test:`RESOURCE_LOCK`, and vice versa. Whereas
-:prop_test:`RESOURCE_LOCK` is a simpler property that is used for locking one
-global resource, ``PROCESSES`` is a more advanced property that allows multiple
-tests to simultaneously use multiple resources of the same type, specifying
-their requirements in a fine-grained manner.
diff --git a/Help/prop_test/RESOURCE_GROUPS.rst b/Help/prop_test/RESOURCE_GROUPS.rst
new file mode 100644
index 0000000..6fdbd03
--- /dev/null
+++ b/Help/prop_test/RESOURCE_GROUPS.rst
@@ -0,0 +1,54 @@
+RESOURCE_GROUPS
+---------------
+
+Specify resources required by a test, grouped in a way that is meaningful to
+the test. See :ref:`hardware allocation <ctest-hardware-allocation>`
+for more information on how this property integrates into the CTest hardware
+allocation feature.
+
+The ``RESOURCE_GROUPS`` property is a :ref:`semicolon-separated list <CMake
+Language Lists>` of group descriptions. Each entry consists of an optional
+number of groups using the description followed by a series of resource
+requirements for those groups. These requirements (and the number of groups)
+are separated by commas. The resource requirements consist of the name of a
+resource type, followed by a colon, followed by an unsigned integer
+specifying the number of slots required on one resource of the given type.
+
+The ``RESOURCE_GROUPS`` property tells CTest what resources a test expects
+to use grouped in a way meaningful to the test. The test itself must read
+the :ref:`environment variables <ctest-hardware-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.
+
+Consider the following example:
+
+.. code-block:: cmake
+
+ add_test(NAME MyTest COMMAND MyExe)
+ set_property(TEST MyTest PROPERTY RESOURCE_GROUPS
+ "2,gpus:2"
+ "gpus:4,crypto_chips:2")
+
+In this example, there are two group descriptions (implicitly separated by a
+semicolon.) The content of the first description is ``2,gpus:2``. This
+description specifies 2 groups, each of which requires 2 slots from a single
+GPU. The content of the second description is ``gpus:4,crypto_chips:2``. This
+description does not specify a group count, so a default of 1 is assumed.
+This single group requires 4 slots from a single GPU and 2 slots from a
+single cryptography chip. In total, 3 resource groups are specified for this
+test, each with its own unique requirements.
+
+When CTest sets the :ref:`environment variables
+<ctest-hardware-environment-variables>` for a test, it assigns a group number
+based on the group description, starting at 0 on the left and the number of
+groups minus 1 on the right. For example, in the example above, the two
+groups in the first description would have IDs of 0 and 1, and the single
+group in the second description would have an ID of 2.
+
+Both the ``RESOURCE_GROUPS`` and :prop_test:`RESOURCE_LOCK` properties serve
+similar purposes, but they are distinct and orthogonal. Resources specified by
+``RESOURCE_GROUPS`` do not affect :prop_test:`RESOURCE_LOCK`, and vice versa.
+Whereas :prop_test:`RESOURCE_LOCK` is a simpler property that is used for
+locking one global resource, ``RESOURCE_GROUPS`` is a more advanced property
+that allows multiple tests to simultaneously use multiple resources of the
+same type, specifying their requirements in a fine-grained manner.
diff --git a/Help/prop_test/RESOURCE_LOCK.rst b/Help/prop_test/RESOURCE_LOCK.rst
index 7d61f77..8b13a01 100644
--- a/Help/prop_test/RESOURCE_LOCK.rst
+++ b/Help/prop_test/RESOURCE_LOCK.rst
@@ -9,10 +9,10 @@ not to run concurrently.
See also :prop_test:`FIXTURES_REQUIRED` if the resource requires any setup or
cleanup steps.
-Both the :prop_test:`PROCESSES` and ``RESOURCE_LOCK`` properties serve similar
-purposes, but they are distinct and orthogonal. Resources specified by
-:prop_test:`PROCESSES` do not affect ``RESOURCE_LOCK``, and vice versa. Whereas
-``RESOURCE_LOCK`` is a simpler property that is used for locking one global
-resource, :prop_test:`PROCESSES` is a more advanced property that allows
-multiple tests to simultaneously use multiple resources of the same type,
-specifying their requirements in a fine-grained manner.
+Both the :prop_test:`RESOURCE_GROUPS` and ``RESOURCE_LOCK`` properties serve
+similar purposes, but they are distinct and orthogonal. Resources specified by
+:prop_test:`RESOURCE_GROUPS` do not affect ``RESOURCE_LOCK``, and vice versa.
+Whereas ``RESOURCE_LOCK`` is a simpler property that is used for locking one
+global resource, :prop_test:`RESOURCE_GROUPS` is a more advanced property
+that allows multiple tests to simultaneously use multiple resources of the
+same type, specifying their requirements in a fine-grained manner.