guix-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

01/05: gnu: libtool: Use 'parallel-job-count' to get the argument for '-


From: Ludovic Courtès
Subject: 01/05: gnu: libtool: Use 'parallel-job-count' to get the argument for '-j'.
Date: Wed, 07 Jan 2015 15:53:06 +0000

civodul pushed a commit to branch core-updates
in repository guix.

commit 5d65ad80b542e223c540250c27645e05239a0f33
Author: Ludovic Courtès <address@hidden>
Date:   Tue Jan 6 22:58:26 2015 +0100

    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.
---
 gnu/packages/autotools.scm |   15 ++++-----------
 1 files changed, 4 insertions(+), 11 deletions(-)

diff --git a/gnu/packages/autotools.scm b/gnu/packages/autotools.scm
index 427c6e3..4723d27 100644
--- a/gnu/packages/autotools.scm
+++ b/gnu/packages/autotools.scm
@@ -266,17 +266,10 @@ Makefile, simplifying the entire process for the 
developer.")
                      'check 'pre-check
                      (lambda* (#:key inputs #:allow-other-keys)
                        ;; 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"
-                                 (string-append "-j" ncores)))
+                       (setenv "TESTSUITEFLAGS"
+                               (string-append
+                                "-j"
+                                (number->string (parallel-job-count))))
 
                        ;; Path references to /bin/sh.
                        (let ((bash (assoc-ref inputs "bash")))



reply via email to

[Prev in Thread] Current Thread [Next in Thread]