GNU bug report logs -
#39269
[PATCH 1/2] guix: qt-build-system: Add phase `check-setup`.
Previous Next
To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 39269 in the body.
You can then email your comments to 39269 AT debbugs.gnu.org in the normal way.
Toggle the display of automated, internal messages from the tracker.
Report forwarded
to
guix-patches <at> gnu.org
:
bug#39269
; Package
guix-patches
.
(Fri, 24 Jan 2020 16:24:02 GMT)
Full text and
rfc822 format available.
Acknowledgement sent
to
Hartmut Goebel <h.goebel <at> crazy-compilers.com>
:
New bug report received and forwarded. Copy sent to
guix-patches <at> gnu.org
.
(Fri, 24 Jan 2020 16:24:02 GMT)
Full text and
rfc822 format available.
Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):
* 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.
---
doc/guix.texi | 25 +++++++++++++++++++++----
guix/build/qt-build-system.scm | 14 +++++++++++++-
2 files changed, 34 insertions(+), 5 deletions(-)
diff --git a/doc/guix.texi b/doc/guix.texi
index d674b9484f..71365c5269 100644
--- a/doc/guix.texi
+++ b/doc/guix.texi
@@ -47,7 +47,7 @@ Copyright @copyright{} 2017 Thomas Danckaert@*
Copyright @copyright{} 2017 humanitiesNerd@*
Copyright @copyright{} 2017 Christopher Allan Webber@*
Copyright @copyright{} 2017, 2018, 2019 Marius Bakke@*
-Copyright @copyright{} 2017, 2019 Hartmut Goebel@*
+Copyright @copyright{} 2017, 2019, 2020 Hartmut Goebel@*
Copyright @copyright{} 2017, 2019 Maxim Cournoyer@*
Copyright @copyright{} 2017, 2018, 2019, 2020 Tobias Geerinckx-Rice@*
Copyright @copyright{} 2017 George Clemmer@*
@@ -6447,10 +6447,24 @@ Which Perl package is used can be specified with @code{#:perl}.
This variable is exported by @code{(guix build-system qt)}. It
is intended for use with applications using Qt or KDE.
-This build system adds the phase @code{qt-wrap} to the ones defined by
-@code{cmake-build-system}, after the @code{install} phase.
+This build system adds the following two phases to the ones defined by
+@code{cmake-build-system}:
-This phase searches for Qt5 plugin paths, QML paths and some XDG in the inputs
+@table @code
+@item check-setup
+The phase @code{check-setup} prepares the environment for running
+the checks as commonly used by Qt test programs.
+For now this only sets some environment variables:
+@code{QT_QPA_PLATFORM=offscreen},
+@code{DBUS_FATAL_WARNINGS=0} and
+@code{CTEST_OUTPUT_ON_FAILURE=1}.
+
+This phase is added before the @code{check} phase.
+It's a separate phase to ease adjusting if necessary.
+
+@item qt-wrap
+The phase @code{qt-wrap}
+searches for Qt5 plugin paths, QML paths and some XDG in the inputs
and output. In case some path is found, all programs in the output's
@file{bin/}, @file{sbin/}, @file{libexec/} and @file{lib/libexec/} directories
are wrapped in scripts defining the necessary environment variables.
@@ -6460,6 +6474,9 @@ by listing their names in the @code{#:qt-wrap-excluded-outputs} parameter.
This is useful when an output is known not to contain any Qt binaries, and
where wrapping would gratuitously add a dependency of that output on Qt, KDE,
or such.
+
+This phase is added after the @code{install} phase.
+@end table
@end defvr
@defvr {Scheme Variable} r-build-system
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 <at> fbengineering.ch>
;;; Copyright © 2014, 2015 Ludovic Courtès <ludo <at> gnu.org>
;;; Copyright © 2018 Mark H Weaver <mhw <at> netris.org>
-;;; Copyright © 2019 Hartmut Goebel <h.goebel <at> crazy-compilers.com>
+;;; Copyright © 2019, 2020 Hartmut Goebel <h.goebel <at> 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)
--
2.21.1
Merged 39268 39269 39270.
Request was from
Hartmut Goebel <h.goebel <at> goebel-consult.de>
to
control <at> debbugs.gnu.org
.
(Fri, 24 Jan 2020 18:10:01 GMT)
Full text and
rfc822 format available.
Information forwarded
to
guix-patches <at> gnu.org
:
bug#39269
; Package
guix-patches
.
(Sat, 25 Jan 2020 11:08:01 GMT)
Full text and
rfc822 format available.
Message #10 received at 39269 <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
LGTM!
[Message part 2 (application/pgp-signature, inline)]
Information forwarded
to
guix-patches <at> gnu.org
:
bug#39269
; Package
guix-patches
.
(Sat, 25 Jan 2020 13:30:02 GMT)
Full text and
rfc822 format available.
Message #13 received at 39269 <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
Am 25.01.20 um 12:07 schrieb Danny Milosavljevic:
> LGTM!
Thanks. I just wonder whether this change shall go into staging?!
$ git grep qt-build-system gnu/packages/*.scm | wc -l
90
Out of which 47 are framework packages wich additional dependencies:
$ git grep qt-build-system gnu/packages/kde*.scm | wc -l
47
--
Regards
Hartmut Goebel
| Hartmut Goebel | h.goebel <at> crazy-compilers.com |
| www.crazy-compilers.com | compilers which you thought are impossible |
[signature.asc (application/pgp-signature, attachment)]
Information forwarded
to
guix-patches <at> gnu.org
:
bug#39269
; Package
guix-patches
.
(Sat, 25 Jan 2020 19:35:02 GMT)
Full text and
rfc822 format available.
Message #16 received at 39269 <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
Hartmut Goebel 写道:
> * guix/build/qt-build-system.scm (check-setup): New function.
> (%standard-phases): Add as new phase `check-setup before
> `check.
LGTM with one tweak: please rename this to ‘set-up-tests’ or
similar.
Guix's phase naming implies that ‘check-setup’ checks something
called setup.
Thanks!
T G-R
[signature.asc (application/pgp-signature, inline)]
Reply sent
to
Hartmut Goebel <h.goebel <at> crazy-compilers.com>
:
You have taken responsibility.
(Tue, 28 Jan 2020 12:06:02 GMT)
Full text and
rfc822 format available.
Notification sent
to
Hartmut Goebel <h.goebel <at> crazy-compilers.com>
:
bug acknowledged by developer.
(Tue, 28 Jan 2020 12:06:02 GMT)
Full text and
rfc822 format available.
Message #21 received at 39269-close <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
I now pushed thi to staging as cd165d105a35da9094b70d0e5d5320a4a6ac8c0d
Thansk for the review
--
Regards
Hartmut Goebel
| Hartmut Goebel | h.goebel <at> crazy-compilers.com |
| www.crazy-compilers.com | compilers which you thought are impossible |
[signature.asc (application/pgp-signature, attachment)]
Reply sent
to
Hartmut Goebel <h.goebel <at> crazy-compilers.com>
:
You have taken responsibility.
(Tue, 28 Jan 2020 12:06:02 GMT)
Full text and
rfc822 format available.
Notification sent
to
Hartmut Goebel <h.goebel <at> crazy-compilers.com>
:
bug acknowledged by developer.
(Tue, 28 Jan 2020 12:06:02 GMT)
Full text and
rfc822 format available.
Reply sent
to
Hartmut Goebel <h.goebel <at> crazy-compilers.com>
:
You have taken responsibility.
(Tue, 28 Jan 2020 12:06:02 GMT)
Full text and
rfc822 format available.
Notification sent
to
Hartmut Goebel <h.goebel <at> crazy-compilers.com>
:
bug acknowledged by developer.
(Tue, 28 Jan 2020 12:06:03 GMT)
Full text and
rfc822 format available.
bug archived.
Request was from
Debbugs Internal Request <help-debbugs <at> gnu.org>
to
internal_control <at> debbugs.gnu.org
.
(Tue, 25 Feb 2020 12:24:08 GMT)
Full text and
rfc822 format available.
This bug report was last modified 4 years and 62 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.