diff options
author | Brad King <brad.king@kitware.com> | 2023-12-04 14:47:05 (GMT) |
---|---|---|
committer | Kitware Robot <kwrobot@kitware.com> | 2023-12-04 14:47:25 (GMT) |
commit | ef89ad6c5562cca1911146834b6241e7c4c54653 (patch) | |
tree | de32c80c2b477f4d54e4dd84b32d9532073115a9 /Help | |
parent | 9cb1471ff60fe2bbd1fac4f09281aebe572b4d2f (diff) | |
parent | 80fe56c481a5e69cd5ee4fbbbd77266579f96d98 (diff) | |
download | CMake-ef89ad6c5562cca1911146834b6241e7c4c54653.zip CMake-ef89ad6c5562cca1911146834b6241e7c4c54653.tar.gz CMake-ef89ad6c5562cca1911146834b6241e7c4c54653.tar.bz2 |
Merge topic 'ctest-jobserver-client'
80fe56c481 ctest: Add support for running under a make job server on POSIX systems
5396f4a9a3 cmUVJobServerClient: Add libuv-based job server integration client
Acked-by: Kitware Robot <kwrobot@kitware.com>
Tested-by: buildbot <buildbot@kitware.com>
Merge-request: !9021
Diffstat (limited to 'Help')
-rw-r--r-- | Help/manual/CTEST_EXAMPLE_MAKEFILE_JOB_SERVER.make | 2 | ||||
-rw-r--r-- | Help/manual/ctest.1.rst | 25 | ||||
-rw-r--r-- | Help/release/dev/ctest-jobserver-client.rst | 5 |
3 files changed, 32 insertions, 0 deletions
diff --git a/Help/manual/CTEST_EXAMPLE_MAKEFILE_JOB_SERVER.make b/Help/manual/CTEST_EXAMPLE_MAKEFILE_JOB_SERVER.make new file mode 100644 index 0000000..a17673a --- /dev/null +++ b/Help/manual/CTEST_EXAMPLE_MAKEFILE_JOB_SERVER.make @@ -0,0 +1,2 @@ +test: + +ctest -j 8 diff --git a/Help/manual/ctest.1.rst b/Help/manual/ctest.1.rst index 9f7c72e..b519ccf 100644 --- a/Help/manual/ctest.1.rst +++ b/Help/manual/ctest.1.rst @@ -1841,6 +1841,31 @@ fixture in their :prop_test:`FIXTURES_REQUIRED`, and a resource spec file may not be specified with the ``--resource-spec-file`` argument or the :variable:`CTEST_RESOURCE_SPEC_FILE` variable. +.. _`ctest-job-server-integration`: + +Job Server Integration +====================== + +.. versionadded:: 3.29 + +On POSIX systems, when running under the context of a `Job Server`_, +CTest shares its job slots. This is independent of the :prop_test:`PROCESSORS` +test property, which still counts against CTest's :option:`-j <ctest -j>` +parallel level. CTest acquires exactly one token from the job server before +running each test, and returns it when the test finishes. + +For example, consider the ``Makefile``: + +.. literalinclude:: CTEST_EXAMPLE_MAKEFILE_JOB_SERVER.make + :language: make + +When invoked via ``make -j 2 test``, ``ctest`` connects to the job server, +acquires a token for each test, and runs at most 2 tests concurrently. + +On Windows systems, job server integration is not yet implemented. + +.. _`Job Server`: https://www.gnu.org/software/make/manual/html_node/Job-Slots.html + See Also ======== diff --git a/Help/release/dev/ctest-jobserver-client.rst b/Help/release/dev/ctest-jobserver-client.rst new file mode 100644 index 0000000..37e22c0 --- /dev/null +++ b/Help/release/dev/ctest-jobserver-client.rst @@ -0,0 +1,5 @@ +ctest-jobserver-client +---------------------- + +* :manual:`ctest(1)` now supports :ref:`job server integration + <ctest-job-server-integration>` on POSIX systems. |