summaryrefslogtreecommitdiffstats
path: root/.gitlab/ci
diff options
context:
space:
mode:
authorBen Boeckel <ben.boeckel@kitware.com>2020-09-28 13:57:24 (GMT)
committerBen Boeckel <ben.boeckel@kitware.com>2020-09-28 13:57:24 (GMT)
commite80362252fbb06b2e71b9e46076ff2342e4ae353 (patch)
tree319a0e2390c8500c504956c1951111a8a8e25bcd /.gitlab/ci
parent93a745683b5c5b67c8eecfaffee45db782e457e1 (diff)
downloadCMake-e80362252fbb06b2e71b9e46076ff2342e4ae353.zip
CMake-e80362252fbb06b2e71b9e46076ff2342e4ae353.tar.gz
CMake-e80362252fbb06b2e71b9e46076ff2342e4ae353.tar.bz2
ci: support a max parallelism for tests
Machines may have more cores than testing actually supports.
Diffstat (limited to '.gitlab/ci')
-rw-r--r--.gitlab/ci/ctest_test.cmake5
1 files changed, 5 insertions, 0 deletions
diff --git a/.gitlab/ci/ctest_test.cmake b/.gitlab/ci/ctest_test.cmake
index 569139d..08ef18f 100644
--- a/.gitlab/ci/ctest_test.cmake
+++ b/.gitlab/ci/ctest_test.cmake
@@ -10,6 +10,11 @@ ctest_start(APPEND)
include(ProcessorCount)
ProcessorCount(nproc)
+if (NOT "$ENV{CTEST_MAX_PARALLELISM}" STREQUAL "")
+ if (nproc GREATER "$ENV{CTEST_MAX_PARALLELISM}")
+ set(nproc "$ENV{CTEST_MAX_PARALLELISM}")
+ endif ()
+endif ()
include("${CMAKE_CURRENT_LIST_DIR}/ctest_exclusions.cmake")
ctest_test(