summaryrefslogtreecommitdiff
path: root/gnu/packages/cmake.scm
diff options
context:
space:
mode:
authorMarius Bakke <mbakke@fastmail.com>2017-02-21 04:29:38 +0100
committerMarius Bakke <mbakke@fastmail.com>2017-02-21 14:50:51 +0100
commitd270c606b31ef5574ee1f67e2449b5e5f2b00e2c (patch)
treeee4f79f7cc4cbb65c6190fde56ddb95ad79eff1b /gnu/packages/cmake.scm
parentdb909bf23c5aae817c7d9011b66d02ee564651e7 (diff)
downloadpatches-d270c606b31ef5574ee1f67e2449b5e5f2b00e2c.tar
patches-d270c606b31ef5574ee1f67e2449b5e5f2b00e2c.tar.gz
gnu: cmake: Run tests in parallel.
* gnu/packages/cmake.scm (cmake)[arguments]: Add 'set-test-environment' phase.
Diffstat (limited to 'gnu/packages/cmake.scm')
-rw-r--r--gnu/packages/cmake.scm12
1 files changed, 9 insertions, 3 deletions
diff --git a/gnu/packages/cmake.scm b/gnu/packages/cmake.scm
index da7a9bdb6b..a4e2d38e36 100644
--- a/gnu/packages/cmake.scm
+++ b/gnu/packages/cmake.scm
@@ -97,8 +97,6 @@
(begin
(setenv "CMAKE_LIBRARY_PATH" (getenv "LIBRARY_PATH"))
(setenv "CMAKE_INCLUDE_PATH" (getenv "C_INCLUDE_PATH"))
- ;; Get verbose output from failed tests
- (setenv "CTEST_OUTPUT_ON_FAILURE" "TRUE")
#t)))
(replace 'configure
(lambda* (#:key outputs #:allow-other-keys)
@@ -117,7 +115,15 @@
"--mandir=share/man"
,(string-append
"--docdir=share/doc/cmake-"
- (version-major+minor version))))))))))
+ (version-major+minor version)))))))
+ (add-before 'check 'set-test-environment
+ (lambda _
+ ;; Get verbose output from failed tests.
+ (setenv "CTEST_OUTPUT_ON_FAILURE" "TRUE")
+ ;; Run tests in parallel.
+ (setenv "CTEST_PARALLEL_LEVEL"
+ (number->string (parallel-job-count)))
+ #t)))))
(inputs
`(("file" ,file)
("curl" ,curl)