unofficial mirror of guix-patches@gnu.org 
 help / color / mirror / code / Atom feed
From: Hartmut Goebel <h.goebel@crazy-compilers.com>
To: 33955@debbugs.gnu.org
Subject: [bug#33955] [PATCH 6/6] gnu: kwindowsystem: Enable test-suite.
Date: Wed,  2 Jan 2019 19:46:50 +0100	[thread overview]
Message-ID: <20190102184650.8075-6-h.goebel@crazy-compilers.com> (raw)
In-Reply-To: <20190102184650.8075-1-h.goebel@crazy-compilers.com>

* 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.
---
 gnu/packages/kde-frameworks.scm | 47 +++++++++++++++++++----------------------
 1 file changed, 22 insertions(+), 25 deletions(-)

diff --git a/gnu/packages/kde-frameworks.scm b/gnu/packages/kde-frameworks.scm
index 45580cb5f..72fd8f20f 100644
--- a/gnu/packages/kde-frameworks.scm
+++ b/gnu/packages/kde-frameworks.scm
@@ -1,7 +1,7 @@
 ;;; GNU Guix --- Functional package management for GNU
 ;;; Copyright © 2015 Andreas Enge <andreas@enge.fr>
 ;;; 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 © 2017 Thomas Danckaert <post@thomasdanckaert.be>
 ;;; Copyright © 2018 Tobias Geerinckx-Rice <me@tobias.gr>
@@ -56,6 +56,7 @@
   #:use-module (gnu packages libreoffice)
   #:use-module (gnu packages linux)
   #:use-module (gnu packages mp3)
+  #:use-module (gnu packages openbox)
   #:use-module (gnu packages pdf)
   #:use-module (gnu packages pcre)
   #:use-module (gnu packages perl)
@@ -1093,6 +1094,7 @@ configuration pages, message boxes, and password requests.")
      `(("extra-cmake-modules" ,extra-cmake-modules)
        ("pkg-config" ,pkg-config)
        ("dbus" ,dbus) ; for the tests
+       ("openbox" ,openbox) ; for the tests
        ("qttools" ,qttools)
        ("xorg-server" ,xorg-server))) ; for the tests
     (inputs
@@ -1101,31 +1103,26 @@ configuration pages, message boxes, and password requests.")
        ("qtx11extras" ,qtx11extras)
        ("xcb-utils-keysyms" ,xcb-util-keysyms)))
     (arguments
-     `(#:tests? #f ; FIXME: 3/12 tests fail.
-       #:phases
+     `(#:phases
        (modify-phases %standard-phases
-         (delete 'check)
-         (add-after 'install 'check
-           (lambda* (#:key inputs outputs tests? #:allow-other-keys)
-             ;; TODO: Simplify and use "common" phases when test-suite passes
-             (if tests?
-                 (begin
-                   (let ((out (assoc-ref outputs "out")))
-                     (setenv "QT_PLUGIN_PATH"
-                             (string-append out "/lib/qt5/plugins:"
-                                            (getenv "QT_PLUGIN_PATH"))))
-                   ;; The test suite requires a running X server, setting
-                   ;; QT_QPA_PLATFORM=offscreen does not suffice and even make
-                   ;; some tests fail.
-                   (system (string-append (assoc-ref inputs "xorg-server")
-                                          "/bin/Xvfb :1 -screen 0 640x480x24 &"))
-                   (setenv "DISPLAY" ":1")
-                   (setenv "CTEST_OUTPUT_ON_FAILURE" "1")
-                   (setenv "DBUS_FATAL_WARNINGS" "0")
-                   (zero? (system* "dbus-launch" "ctest" ".")))
-                 (begin
-                   (format #t "test suite not run~%")
-                   #t)))))))
+         (add-before 'check 'blacklist-failing-tests
+           (lambda _
+             ;; Blacklist a failing test-functions. FIXME: Make it pass.
+             (with-output-to-file "autotests/BLACKLIST"
+               (lambda _
+                 (display "[testState]\n*\n")
+                 (display "[testSupported]\n*\n")))
+             #t))
+         (replace 'check
+           (lambda _
+             ;; The test suite requires a running window anager
+             (system "Xvfb :1 -ac -screen 0 640x480x24 &")
+             (setenv "DISPLAY" ":1")
+             (sleep 5) ;; Give Xvfb a few moments to get on it's feet
+             (system "openbox &")
+             (setenv "CTEST_OUTPUT_ON_FAILURE" "1")
+             (setenv "DBUS_FATAL_WARNINGS" "0")
+             (invoke "dbus-launch" "ctest" "."))))))
     (home-page "https://community.kde.org/Frameworks")
     (synopsis "KDE access to the windowing system")
     (description "KWindowSystem provides information about and allows
-- 
2.13.7

  parent reply	other threads:[~2019-01-02 18:48 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-01-02 18:45 [bug#33955] [PATCH 0/6] KDE: Enable more tests Hartmut Goebel
2019-01-02 18:46 ` [bug#33955] [PATCH 1/6] gnu: kcoreaddons: Enable test-suite Hartmut Goebel
2019-01-02 18:46   ` [bug#33955] [PATCH 2/6] gnu: kirigami: " Hartmut Goebel
2019-01-02 18:46   ` [bug#33955] [PATCH 3/6] gnu: kpackage: " Hartmut Goebel
2019-01-02 18:46   ` [bug#33955] [PATCH 4/6] gnu: kemoticons: " Hartmut Goebel
2019-01-02 18:46   ` [bug#33955] [PATCH 5/6] gnu: knewstuff: " Hartmut Goebel
2019-01-02 18:46   ` Hartmut Goebel [this message]
2019-01-03  1:59 ` [bug#33955] [PATCH 0/6] KDE: Enable more tests Meiyo Peng
2019-01-03 19:40   ` [bug#33951] " Hartmut Goebel
2019-01-04  1:16     ` Meiyo Peng
2019-01-04  9:27       ` bug#33951: " Hartmut Goebel
2019-01-14 21:50 ` Ludovic Courtès
2019-01-16 23:20   ` bug#33955: " Hartmut Goebel

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://guix.gnu.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20190102184650.8075-6-h.goebel@crazy-compilers.com \
    --to=h.goebel@crazy-compilers.com \
    --cc=33955@debbugs.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).