Subject: [bug#50905] [PATCH 24/38] gnu: at-spi2-core: Respect #:tests?.

From: Maxime Devos <[email-masked]>
Date: Thu, 30 Sep 2021 00:19:24 +0200

* gnu/packages/gtk.scm (at-spi2-core)[arguments]<#:phases>{check}:
  Don't run tests if the value of #:tests? if false.
---
 gnu/packages/gtk.scm | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/gnu/packages/gtk.scm b/gnu/packages/gtk.scm
index adb4d847a4..d829218305 100644
--- a/gnu/packages/gtk.scm
+++ b/gnu/packages/gtk.scm
@@ -768,14 +768,15 @@ scaled, composited, modified, saved, or rendered.")
                         (string-append out "/share/gtk-doc")))
                      #t))))
          (add-after 'install 'check
-           (lambda _
+           (lambda* (#:key tests? #:allow-other-keys)
              (setenv "HOME" (getenv "TMPDIR")) ; xfconfd requires a writable HOME
              ;; Run test-suite under a dbus session.
              (setenv "XDG_DATA_DIRS" ; for finding org.xfce.Xfconf.service
                      (string-append %output "/share"))
              ;; Don't fail on missing  '/etc/machine-id'.
              (setenv "DBUS_FATAL_WARNINGS" "0") ;
-             (invoke "dbus-launch" "ninja" "test")))
+             (when tests?
+               (invoke "dbus-launch" "ninja" "test"))))
          (delete 'check))))
     (inputs
      `(("bash-minimal" ,bash-minimal)))
-- 
2.33.0