gnu: json-modern-cxx: Run tests in parallel.

* gnu/packages/cpp.scm (json-modern-cxx)[arguments]: Respect PARALLEL-TESTS?
in check phase.
This commit is contained in:
Marius Bakke 2022-01-30 17:22:32 +01:00
parent 36cde8fa8e
commit 2b4aeda755
No known key found for this signature in database
GPG Key ID: A2A06DF2A33A54FA

View File

@ -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)