guix-commits
[Top][All Lists]
Advanced

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

02/10: gnu: json-modern-cxx: Run tests in parallel.


From: guix-commits
Subject: 02/10: gnu: json-modern-cxx: Run tests in parallel.
Date: Tue, 1 Feb 2022 17:50:11 -0500 (EST)

mbakke pushed a commit to branch master
in repository guix.

commit 2b4aeda7559b458d8308151f2b2935831d18826b
Author: Marius Bakke <marius@gnu.org>
AuthorDate: Sun Jan 30 17:22:32 2022 +0100

    gnu: json-modern-cxx: Run tests in parallel.
    
    * gnu/packages/cpp.scm (json-modern-cxx)[arguments]: Respect PARALLEL-TESTS?
    in check phase.
---
 gnu/packages/cpp.scm | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/gnu/packages/cpp.scm b/gnu/packages/cpp.scm
index 6ee412c0c1..a1596314dc 100644
--- a/gnu/packages/cpp.scm
+++ b/gnu/packages/cpp.scm
@@ -534,10 +534,13 @@ as ordering relation.")
                             (assoc-ref %build-inputs "json_test_data")))
        #:phases (modify-phases %standard-phases
                   (replace 'check
-                    (lambda* (#:key tests? #:allow-other-keys)
+                    (lambda* (#:key tests? parallel-tests? #:allow-other-keys)
                       (if tests?
                           ;; Some tests need git and a full checkout, skip 
those.
-                          (invoke "ctest" "-LE" "git_required")
+                          (invoke "ctest" "-LE" "git_required"
+                                  "-j" (if parallel-tests?
+                                           (number->string 
(parallel-job-count))
+                                           "1"))
                           (format #t "test suite not run~%")))))))
     (native-inputs
      `(("amalgamate" ,amalgamate)



reply via email to

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