diff options
| author | Jason Conroy <jconroy@tscripta.net> | 2025-09-26 18:43:19 +0000 |
|---|---|---|
| committer | Julien Lepiller <julien@lepiller.eu> | 2025-10-04 20:33:00 +0200 |
| commit | b2881fc187e56366dd75540b7871748080d28dcd (patch) | |
| tree | d8ce69f7084b6efa2b8f0f3aa83a0175f59f15e2 | |
| parent | fae7b633dd02d863b3e7447ccb90a7ffc7ba87a8 (diff) | |
gnu: ocaml: make test suite run faster with less flakiness.
* gnu/packages/ocaml.scm (ocaml-5.0):
[arguments]:
<#:parallel-tests?>: disable.
<#:phases>{enable-parallel-tests}: patch `tests` build target to enable
parallelism via GNU Parallel.
[native-inputs]: add `parallel`.
* gnu/packages/ocaml.scm: (ocaml-5.3): inherits the changes above via `ocaml-5.0`.
Change-Id: I0d25350a04b89585f5526cedbf7420d51d40ab34
Signed-off-by: Julien Lepiller <julien@lepiller.eu>
| -rw-r--r-- | gnu/packages/ocaml.scm | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/gnu/packages/ocaml.scm b/gnu/packages/ocaml.scm index 50f912e62d5..205dddc5759 100644 --- a/gnu/packages/ocaml.scm +++ b/gnu/packages/ocaml.scm @@ -75,6 +75,7 @@ #:use-module (gnu packages multiprecision) #:use-module (gnu packages ncurses) #:use-module (gnu packages node) + #:use-module (gnu packages parallel) #:use-module (gnu packages pcre) #:use-module (gnu packages perl) #:use-module (gnu packages pkg-config) @@ -216,16 +217,25 @@ This package produces a native @command{ocamlc} and a bytecode @command{ocamllex (files (list "lib/ocaml/site-lib/stubslibs" "lib/ocaml/site-lib/stublibs"))))) (native-inputs - (list perl pkg-config)) + (list parallel perl pkg-config)) (inputs (list libx11 libiberty ;needed for objdump support zlib)) ;also needed for objdump support (arguments `(#:configure-flags '("--enable-ocamltest") #:test-target "tests" + ;; This doesn't have the desired effect and makes test runs less + ;; stable. See https://codeberg.org/guix/guix/pulls/2933. + #:parallel-tests? #f #:make-flags '("defaultentry") #:phases (modify-phases %standard-phases + (add-after 'unpack 'enable-parallel-tests + (lambda _ + ;; Patch the `tests` build target to enable a special parallel + ;; execution mode based on GNU Parallel. + (substitute* "Makefile" + (("-C testsuite all") "-C testsuite parallel")))) (add-after 'unpack 'patch-/bin/sh-references (lambda* (#:key inputs #:allow-other-keys) (let* ((sh (search-input-file inputs "/bin/sh")) |
