summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGreg Hogan <code@greghogan.com>2025-08-08 15:34:24 +0000
committerGreg Hogan <code@greghogan.com>2025-11-28 11:36:53 +0000
commitdffaaf19c2c767598251f32c2f54512340ca5525 (patch)
tree23229d79b09ba10d8d676a04abafd37db930be70
parente62a6b6c6ec1333001921d4a17aa177a273c4166 (diff)
gnu: cmake-build: Prevent stalls initiating tests.
* guix/build/cmake-build-system.scm (check): Set minimum bound for test-load so that system tasks do not prevent low-core machines from starting execution of the test suite. Change-Id: I8751bb5b42c2a66f160117729fcb5648a635341c
-rw-r--r--guix/build/cmake-build-system.scm6
1 files changed, 5 insertions, 1 deletions
diff --git a/guix/build/cmake-build-system.scm b/guix/build/cmake-build-system.scm
index 6d62b870edf..3d7512f0f25 100644
--- a/guix/build/cmake-build-system.scm
+++ b/guix/build/cmake-build-system.scm
@@ -127,8 +127,12 @@
`("--exclude-regex" ,test-exclude))
,@(if parallel-tests?
`("-j" ,(number->string (parallel-job-count))
+ ;; ctest waits to start tests when the CPU load is
+ ;; above this threshold. Set a lower bound for low-core
+ ;; machines to prevent stalling as may occur due to
+ ;; system tasks even when no builds are running.
"--test-load"
- ,(number->string (total-processor-count)))
+ ,(number->string (max 4 (total-processor-count))))
;; When unset CMake defers to the build system.
'("-j" "1"))
,@(if test-repeat-until-pass?