mirror of
https://git.savannah.gnu.org/git/guix.git
synced 2026-04-06 21:20:33 +02:00
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>
This commit is contained in:
committed by
Julien Lepiller
parent
fae7b633dd
commit
b2881fc187
@@ -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"))
|
||||
|
||||
Reference in New Issue
Block a user