gnu: subversion: Support running the tests in parallel.
authorChristopher Baines <mail@cbaines.net>
Thu, 6 Feb 2020 08:36:12 +0000 (08:36 +0000)
committerChristopher Baines <mail@cbaines.net>
Tue, 11 Feb 2020 08:40:32 +0000 (08:40 +0000)
This drops the time to build the package on my machine from ~14 minutes to ~5
minutes.

* gnu/packages/version-control.scm (subversion)[arguments]: Add set-PARALLEL
phase to set the PARALLEL environment variable.

gnu/packages/version-control.scm

index 2ca64e4..6935869 100644 (file)
@@ -1448,6 +1448,10 @@ following features:
              (substitute* "subversion/tests/libsvn_repos/repos-test.c"
                (("#!/bin/sh") (string-append "#!" (which "sh"))))
              #t))
+         (add-before 'check 'set-PARALLEL
+           (lambda _
+             (setenv "PARALLEL" (number->string (parallel-job-count)))
+             #t))
          (add-after 'install 'install-perl-bindings
            (lambda* (#:key outputs #:allow-other-keys)
              ;; Follow the instructions from 'subversion/bindings/swig/INSTALL'.