gnu: libtool: Use 'parallel-job-count' to get the argument for '-j'.
* gnu/packages/autotools.scm (libtool)[arguments] <check>: Use (parallel-job-count) instead of hand-written code.
This commit is contained in:
parent
fa1e2f3d0d
commit
5d65ad80b5
|
@ -266,17 +266,10 @@ Makefile, simplifying the entire process for the developer.")
|
||||||
'check 'pre-check
|
'check 'pre-check
|
||||||
(lambda* (#:key inputs #:allow-other-keys)
|
(lambda* (#:key inputs #:allow-other-keys)
|
||||||
;; Run the test suite in parallel, if possible.
|
;; Run the test suite in parallel, if possible.
|
||||||
(let ((ncores
|
|
||||||
(cond
|
|
||||||
((getenv "NIX_BUILD_CORES")
|
|
||||||
=>
|
|
||||||
(lambda (n)
|
|
||||||
(if (zero? (string->number n))
|
|
||||||
(number->string (current-processor-count))
|
|
||||||
n)))
|
|
||||||
(else "1"))))
|
|
||||||
(setenv "TESTSUITEFLAGS"
|
(setenv "TESTSUITEFLAGS"
|
||||||
(string-append "-j" ncores)))
|
(string-append
|
||||||
|
"-j"
|
||||||
|
(number->string (parallel-job-count))))
|
||||||
|
|
||||||
;; Path references to /bin/sh.
|
;; Path references to /bin/sh.
|
||||||
(let ((bash (assoc-ref inputs "bash")))
|
(let ((bash (assoc-ref inputs "bash")))
|
||||||
|
|
Loading…
Reference in New Issue