From 505cfd0fa3411a21c8794ab84473dc1dd2b8754c Mon Sep 17 00:00:00 2001 From: Florian Pelz Date: Sat, 3 Oct 2020 00:29:56 +0200 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Subject: [PATCH] gnu: glib: Adhere to '--without-tests' option. * gnu/packages/glib.scm (glib)[arguments]<#:phases>[configure]: Only run tests if 'tests?' is true. --- gnu/packages/glib.scm | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/gnu/packages/glib.scm b/gnu/packages/glib.scm index ca037d3b24..c703894155 100644 --- a/gnu/packages/glib.scm +++ b/gnu/packages/glib.scm @@ -13,6 +13,7 @@ ;;; Copyright © 2019 Giacomo Leidi ;;; Copyright © 2019, 2020 Marius Bakke ;;; Copyright © 2020 Nicoḷ Balzarotti +;;; Copyright © 2020 Florian Pelz ;;; ;;; This file is part of GNU Guix. ;;; @@ -325,11 +326,14 @@ shared NFS home directories.") (for-each (lambda (x) (apply disable x)) failing-tests) #t))) (replace 'check - (lambda _ - (setenv "MESON_TESTTHREADS" - (number->string (parallel-job-count))) - ;; Do not run tests marked as "flaky". - (invoke "meson" "test" "--no-suite" "flaky"))) + (lambda* (#:key tests? #:allow-other-keys) + (if tests? + (begin + (setenv "MESON_TESTTHREADS" + (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. ;; See https://github.com/mesonbuild/meson/issues/2561 ;; We can remove this once meson is patched. -- 2.28.0