From 22b3a1abd93742f551f99f655f57fcba81db0999 Mon Sep 17 00:00:00 2001 From: Brad King Date: Thu, 1 Oct 2020 11:22:31 -0400 Subject: ci: support a max parallelism for test-ext jobs Machines may have more cores than testing actually supports. Apply the change from commit e80362252f (ci: support a max parallelism for tests, 2020-09-28) to tests in the test-ext stage too. --- .gitlab/ci/ctest_test_external.cmake | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/.gitlab/ci/ctest_test_external.cmake b/.gitlab/ci/ctest_test_external.cmake index d92b936..4ea060d 100644 --- a/.gitlab/ci/ctest_test_external.cmake +++ b/.gitlab/ci/ctest_test_external.cmake @@ -33,6 +33,11 @@ endif () 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 () if (CTEST_CMAKE_GENERATOR STREQUAL "Unix Makefiles") set(CTEST_BUILD_FLAGS "-j${nproc}") -- cgit v0.12