gnu: kwindowsystem: Enable test-suite.
* gnu/package/kde-frameworks.scm(kwindowsystem) [inputs]: Add openbox. [arguments] <#:tests?> Remove. <#:phases> 'blacklist-failing-tests: New phase. <#:phases> 'check: Start openbox, don't set QT_PLUGIN_PATH, use invkove, simplify and cleanup code. No longer move 'check behind install.
This commit is contained in:
parent
e11553f742
commit
2615ee9520
|
@ -1,7 +1,7 @@
|
||||||
;;; GNU Guix --- Functional package management for GNU
|
;;; GNU Guix --- Functional package management for GNU
|
||||||
;;; Copyright © 2015 Andreas Enge <andreas@enge.fr>
|
;;; Copyright © 2015 Andreas Enge <andreas@enge.fr>
|
||||||
;;; Copyright © 2016 Efraim Flashner <efraim@flashner.co.il>
|
;;; Copyright © 2016 Efraim Flashner <efraim@flashner.co.il>
|
||||||
;;; Copyright © 2016,2017,2018 Hartmut Goebel <h.goebel@crazy-compilers.com>
|
;;; Copyright © 2016-2019 Hartmut Goebel <h.goebel@crazy-compilers.com>
|
||||||
;;; Copyright © 2016 David Craven <david@craven.ch>
|
;;; Copyright © 2016 David Craven <david@craven.ch>
|
||||||
;;; Copyright © 2017 Thomas Danckaert <post@thomasdanckaert.be>
|
;;; Copyright © 2017 Thomas Danckaert <post@thomasdanckaert.be>
|
||||||
;;; Copyright © 2018 Tobias Geerinckx-Rice <me@tobias.gr>
|
;;; Copyright © 2018 Tobias Geerinckx-Rice <me@tobias.gr>
|
||||||
|
@ -56,6 +56,7 @@
|
||||||
#:use-module (gnu packages libreoffice)
|
#:use-module (gnu packages libreoffice)
|
||||||
#:use-module (gnu packages linux)
|
#:use-module (gnu packages linux)
|
||||||
#:use-module (gnu packages mp3)
|
#:use-module (gnu packages mp3)
|
||||||
|
#:use-module (gnu packages openbox)
|
||||||
#:use-module (gnu packages pdf)
|
#:use-module (gnu packages pdf)
|
||||||
#:use-module (gnu packages pcre)
|
#:use-module (gnu packages pcre)
|
||||||
#:use-module (gnu packages perl)
|
#:use-module (gnu packages perl)
|
||||||
|
@ -1094,6 +1095,7 @@ configuration pages, message boxes, and password requests.")
|
||||||
`(("extra-cmake-modules" ,extra-cmake-modules)
|
`(("extra-cmake-modules" ,extra-cmake-modules)
|
||||||
("pkg-config" ,pkg-config)
|
("pkg-config" ,pkg-config)
|
||||||
("dbus" ,dbus) ; for the tests
|
("dbus" ,dbus) ; for the tests
|
||||||
|
("openbox" ,openbox) ; for the tests
|
||||||
("qttools" ,qttools)
|
("qttools" ,qttools)
|
||||||
("xorg-server" ,xorg-server))) ; for the tests
|
("xorg-server" ,xorg-server))) ; for the tests
|
||||||
(inputs
|
(inputs
|
||||||
|
@ -1102,31 +1104,26 @@ configuration pages, message boxes, and password requests.")
|
||||||
("qtx11extras" ,qtx11extras)
|
("qtx11extras" ,qtx11extras)
|
||||||
("xcb-utils-keysyms" ,xcb-util-keysyms)))
|
("xcb-utils-keysyms" ,xcb-util-keysyms)))
|
||||||
(arguments
|
(arguments
|
||||||
`(#:tests? #f ; FIXME: 3/12 tests fail.
|
`(#:phases
|
||||||
#:phases
|
|
||||||
(modify-phases %standard-phases
|
(modify-phases %standard-phases
|
||||||
(delete 'check)
|
(add-before 'check 'blacklist-failing-tests
|
||||||
(add-after 'install 'check
|
(lambda _
|
||||||
(lambda* (#:key inputs outputs tests? #:allow-other-keys)
|
;; Blacklist a failing test-functions. FIXME: Make it pass.
|
||||||
;; TODO: Simplify and use "common" phases when test-suite passes
|
(with-output-to-file "autotests/BLACKLIST"
|
||||||
(if tests?
|
(lambda _
|
||||||
(begin
|
(display "[testState]\n*\n")
|
||||||
(let ((out (assoc-ref outputs "out")))
|
(display "[testSupported]\n*\n")))
|
||||||
(setenv "QT_PLUGIN_PATH"
|
#t))
|
||||||
(string-append out "/lib/qt5/plugins:"
|
(replace 'check
|
||||||
(getenv "QT_PLUGIN_PATH"))))
|
(lambda _
|
||||||
;; The test suite requires a running X server, setting
|
;; The test suite requires a running window anager
|
||||||
;; QT_QPA_PLATFORM=offscreen does not suffice and even make
|
(system "Xvfb :1 -ac -screen 0 640x480x24 &")
|
||||||
;; some tests fail.
|
(setenv "DISPLAY" ":1")
|
||||||
(system (string-append (assoc-ref inputs "xorg-server")
|
(sleep 5) ;; Give Xvfb a few moments to get on it's feet
|
||||||
"/bin/Xvfb :1 -screen 0 640x480x24 &"))
|
(system "openbox &")
|
||||||
(setenv "DISPLAY" ":1")
|
(setenv "CTEST_OUTPUT_ON_FAILURE" "1")
|
||||||
(setenv "CTEST_OUTPUT_ON_FAILURE" "1")
|
(setenv "DBUS_FATAL_WARNINGS" "0")
|
||||||
(setenv "DBUS_FATAL_WARNINGS" "0")
|
(invoke "dbus-launch" "ctest" "."))))))
|
||||||
(zero? (system* "dbus-launch" "ctest" ".")))
|
|
||||||
(begin
|
|
||||||
(format #t "test suite not run~%")
|
|
||||||
#t)))))))
|
|
||||||
(home-page "https://community.kde.org/Frameworks")
|
(home-page "https://community.kde.org/Frameworks")
|
||||||
(synopsis "KDE access to the windowing system")
|
(synopsis "KDE access to the windowing system")
|
||||||
(description "KWindowSystem provides information about and allows
|
(description "KWindowSystem provides information about and allows
|
||||||
|
|
Loading…
Reference in New Issue