From 8377512e0c36146f55bde044e2f9b004c7482236 Mon Sep 17 00:00:00 2001 From: Hartmut Goebel Date: Wed, 22 Jan 2020 13:29:34 +0100 Subject: 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. --- guix/build/qt-build-system.scm | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) (limited to 'guix') 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 ;;; Copyright © 2014, 2015 Ludovic Courtès ;;; Copyright © 2018 Mark H Weaver -;;; Copyright © 2019 Hartmut Goebel +;;; Copyright © 2019, 2020 Hartmut Goebel ;;; ;;; 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) -- cgit v1.2.3