summary refs log tree commit diff
path: root/gnu
diff options
context:
space:
mode:
authorMarius Bakke <marius@gnu.org>2022-01-30 17:22:32 +0100
committerMarius Bakke <marius@gnu.org>2022-02-01 23:46:04 +0100
commit2b4aeda7559b458d8308151f2b2935831d18826b (patch)
treebd5a5986b7503d4240e03249e05b854a3e7a398e /gnu
parent36cde8fa8e895ee0e96319a9ac7ab1b8616aa14e (diff)
downloadguix-2b4aeda7559b458d8308151f2b2935831d18826b.tar.gz
gnu: json-modern-cxx: Run tests in parallel.
* gnu/packages/cpp.scm (json-modern-cxx)[arguments]: Respect PARALLEL-TESTS?
in check phase.
Diffstat (limited to 'gnu')
-rw-r--r--gnu/packages/cpp.scm7
1 files 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)