diff mbox series

[bug#54088,v2,04/19] build: julia-build-system: Fix corner-case for parallel tests.

Message ID 20220223134722.354636-4-zimon.toutoune@gmail.com
State Accepted
Headers show
Series [bug#54088,v2,01/19] gnu: julia-xyz: Adjust style using G-expressions. | expand

Checks

Context Check Description
cbaines/comparison success View comparision
cbaines/git branch success View Git branch
cbaines/applying patch success View Laminar job
cbaines/issue success View issue

Commit Message

Simon Tournier Feb. 23, 2022, 1:47 p.m. UTC
* guix/build/julia-build-system.scm (check): Do not run parallel tests when
'--cores=1'.
---
 guix/build/julia-build-system.scm | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)
diff mbox series

Patch

diff --git a/guix/build/julia-build-system.scm b/guix/build/julia-build-system.scm
index c5ad65d029..b0dac154e9 100644
--- a/guix/build/julia-build-system.scm
+++ b/guix/build/julia-build-system.scm
@@ -112,9 +112,9 @@  (define* (check #:key tests? source inputs outputs julia-package-name
            (job-count (if parallel-tests?
                           (parallel-job-count)
                           1))
-           ;; The --proc argument of Julia *adds* extra processors rather than
-           ;; specify the exact count to use, so zero must be specified to
-           ;; disable parallel processing...
+           ;; The --procs argument of Julia *adds* extra processors rather
+           ;; than specify the exact count to use, so zero must be specified
+           ;; to disable parallel processing...
            (additional-procs (max 0 (1- job-count))))
       ;; With a patch, SOURCE_DATE_EPOCH is honored
       (setenv "SOURCE_DATE_EPOCH" "1")
@@ -127,7 +127,7 @@  (define* (check #:key tests? source inputs outputs julia-package-name
       (setenv "HOME" "/tmp")
       (apply invoke "julia"
              `("--depwarn=yes"
-               ,@(if parallel-tests?
+               ,@(if (and parallel-tests? (< 0 additional-procs))
                      ;; XXX: ... but '--procs' doesn't accept 0 as a valid
                      ;; value, so just omit the argument entirely.
                      (list (string-append  "--procs="