summaryrefslogtreecommitdiff
path: root/guix
diff options
context:
space:
mode:
authorHartmut Goebel <h.goebel@crazy-compilers.com>2020-01-22 13:29:34 +0100
committerHartmut Goebel <h.goebel@crazy-compilers.com>2020-01-28 13:03:08 +0100
commit8377512e0c36146f55bde044e2f9b004c7482236 (patch)
tree930961480a74acf69f4b83de4d555013353471ea /guix
parent1d7051f82b3235bc62c02ee9df56974803f7e20e (diff)
guix: qt-build-system: Add phase `check-setup`.
* guix/build/qt-build-system.scm (check-setup): New function. (%standard-phases): Add as new phase `check-setup before `check. * doc/guix.texi (Build System)[qt-build-system]: Describe the new phase.
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)