diff options
author | Maxim Cournoyer <maxim.cournoyer@gmail.com> | 2021-11-03 12:07:22 -0400 |
---|---|---|
committer | Maxim Cournoyer <maxim.cournoyer@gmail.com> | 2021-11-11 12:18:32 -0500 |
commit | dfcc96d8f48716ae5aefb383c58b153d5bcb407c (patch) | |
tree | bd78a84d83ef6be838bac8d2910087f6cef8ff8a /guix/build | |
parent | 3e026fc2b1bd65ead774733fbc5852794d96bf43 (diff) |
build: meson: Replace the 'test-target' argument by 'test-options'.
This change is motivated by the need to disable the default 30 seconds timeout
that Meson uses (see: https://gitlab.gnome.org/GNOME/glib/-/issues/2522), and
also by desire to specify extra options to run the check phase without having
to override it.
* guix/build-system/meson.scm (meson-build) <test-target>: Replace argument
with...
<test-options>: ... this one.
* guix/build/meson-build-system.scm (check): Invoke 'meson test' instead of
'ninja test-target', as the former is configurable via options.
* doc/guix.texi (Build Systems) <meson-build-system>: Update doc.
Diffstat (limited to 'guix/build')
-rw-r--r-- | guix/build/meson-build-system.scm | 18 |
1 files changed, 10 insertions, 8 deletions
diff --git a/guix/build/meson-build-system.scm b/guix/build/meson-build-system.scm index cc2ba83889..61ce45367d 100644 --- a/guix/build/meson-build-system.scm +++ b/guix/build/meson-build-system.scm @@ -2,6 +2,7 @@ ;;; Copyright © 2017 Peter Mikkelsen <petermikkelsen10@gmail.com> ;;; Copyright © 2018 Ricardo Wurmus <rekado@elephly.net> ;;; Copyright © 2018 Marius Bakke <mbakke@fastmail.com> +;;; Copyright © 2021 Maxim Cournoyer <maxim.cournoyer@gmail.com> ;;; ;;; This file is part of GNU Guix. ;;; @@ -63,16 +64,17 @@ (number->string (parallel-job-count)) "1"))) -(define* (check #:key test-target parallel-tests? tests? +(define* (check #:key tests? test-options parallel-tests? #:allow-other-keys) - (setenv "MESON_TESTTHREADS" - (if parallel-tests? - (number->string (parallel-job-count)) - "1")) (if tests? - (invoke "ninja" test-target) - (format #t "test suite not run~%")) - #t) + (begin + (setenv "MESON_TESTTHREADS" + (if parallel-tests? + (number->string (parallel-job-count)) + "1")) + ;; Always provide "-t 0" to disable the 30 s default timeout. + (apply invoke "meson" "test" "--print-errorlogs" "-t" "0" test-options)) + (format #t "test suite not run~%"))) (define* (install #:rest args) (invoke "ninja" "install")) |