Archived
1
0
Fork 0

gnu: glib: Adhere to '--without-tests' option.

* gnu/packages/glib.scm (glib)[arguments]<#:phases>[configure]:
Only run tests if 'tests?' is true.
This commit is contained in:
Florian Pelz 2020-10-03 00:29:56 +02:00
parent c9cfcd5159
commit 0585a0d0d1
No known key found for this signature in database
GPG key ID: 300888CB39C63817

View file

@ -13,6 +13,7 @@
;;; Copyright © 2019 Giacomo Leidi <goodoldpaul@autistici.org> ;;; Copyright © 2019 Giacomo Leidi <goodoldpaul@autistici.org>
;;; Copyright © 2019, 2020 Marius Bakke <mbakke@fastmail.com> ;;; Copyright © 2019, 2020 Marius Bakke <mbakke@fastmail.com>
;;; Copyright © 2020 Nicolò Balzarotti <nicolo@nixo.xyz> ;;; Copyright © 2020 Nicolò Balzarotti <nicolo@nixo.xyz>
;;; Copyright © 2020 Florian Pelz <pelzflorian@pelzflorian.de>
;;; ;;;
;;; This file is part of GNU Guix. ;;; This file is part of GNU Guix.
;;; ;;;
@ -325,11 +326,14 @@ shared NFS home directories.")
(for-each (lambda (x) (apply disable x)) failing-tests) (for-each (lambda (x) (apply disable x)) failing-tests)
#t))) #t)))
(replace 'check (replace 'check
(lambda _ (lambda* (#:key tests? #:allow-other-keys)
(setenv "MESON_TESTTHREADS" (if tests?
(number->string (parallel-job-count))) (begin
;; Do not run tests marked as "flaky". (setenv "MESON_TESTTHREADS"
(invoke "meson" "test" "--no-suite" "flaky"))) (number->string (parallel-job-count)))
;; Do not run tests marked as "flaky".
(invoke "meson" "test" "--no-suite" "flaky"))
#t)))
;; TODO: meson does not permit the bindir to be outside of prefix. ;; TODO: meson does not permit the bindir to be outside of prefix.
;; See https://github.com/mesonbuild/meson/issues/2561 ;; See https://github.com/mesonbuild/meson/issues/2561
;; We can remove this once meson is patched. ;; We can remove this once meson is patched.