summaryrefslogtreecommitdiff
path: root/guix
diff options
context:
space:
mode:
authorMarius Bakke <mbakke@fastmail.com>2020-02-10 20:11:26 +0100
committerMarius Bakke <mbakke@fastmail.com>2020-02-10 20:11:26 +0100
commit2cbccf7f653d54fc41962425920db095d230de62 (patch)
tree69bc17d94ef3f89fea44589ac5bd46dc9a472bcc /guix
parent4730878b81a84e54408917c17f4b80e354423d61 (diff)
parentf10921c5ade56534633eae0da94da6e81aacc2aa (diff)
Merge branch 'staging'
Diffstat (limited to 'guix')
-rw-r--r--guix/build/qt-build-system.scm14
1 files changed, 13 insertions, 1 deletions
diff --git a/guix/build/qt-build-system.scm b/guix/build/qt-build-system.scm
index be2b808901..005157b0a4 100644
--- a/guix/build/qt-build-system.scm
+++ b/guix/build/qt-build-system.scm
@@ -2,7 +2,7 @@
;;; Copyright © 2014 Federico Beffa <beffa@fbengineering.ch>
;;; Copyright © 2014, 2015 Ludovic Courtès <ludo@gnu.org>
;;; Copyright © 2018 Mark H Weaver <mhw@netris.org>
-;;; Copyright © 2019 Hartmut Goebel <h.goebel@crazy-compilers.com>
+;;; Copyright © 2019, 2020 Hartmut Goebel <h.goebel@crazy-compilers.com>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -36,6 +36,17 @@
;;
;; Code:
+(define* (check-setup #:rest args)
+ ;; Make Qt render "offscreen". In many cases this allows to run tests
+ ;; without starting a X11 server.
+ (setenv "QT_QPA_PLATFORM" "offscreen")
+ ;; Qt/KDE tests often need dbus (`dbus-launch …`) which is not fully
+ ;; set-up the the build container.
+ (setenv "DBUS_FATAL_WARNINGS" "0")
+ ;; Set here to ease overwriting 'check (even if set there, too)
+ (setenv "CTEST_OUTPUT_ON_FAILURE" "1")
+ #t)
+
(define (variables-for-wrapping base-directories)
(define (collect-sub-dirs base-directories subdirectory)
@@ -101,6 +112,7 @@ add a dependency of that output on Qt."
(define %standard-phases
(modify-phases cmake:%standard-phases
+ (add-before 'check 'check-setup check-setup)
(add-after 'install 'qt-wrap wrap-all-programs)))
(define* (qt-build #:key inputs (phases %standard-phases)