[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
87/122: gnu: ibus: Enable tests.
From: |
guix-commits |
Subject: |
87/122: gnu: ibus: Enable tests. |
Date: |
Fri, 11 Jun 2021 12:12:16 -0400 (EDT) |
raghavgururajan pushed a commit to branch wip-gnome
in repository guix.
commit 164960d5522d3505d2f9174d15f76ccd029ce19b
Author: Raghav Gururajan <rg@raghavgururajan.name>
AuthorDate: Wed Apr 7 16:42:25 2021 -0400
gnu: ibus: Enable tests.
* gnu/packages/ibus.scm (ibus)[arguments](tests): Remove argument.
[patches](disable-failing-tests): New phase.
(pre-check): New phase.
[native-inputs]: Add xorg-server-for-tests.
---
gnu/packages/ibus.scm | 31 +++++++++++++++++++++++++++----
1 file changed, 27 insertions(+), 4 deletions(-)
diff --git a/gnu/packages/ibus.scm b/gnu/packages/ibus.scm
index fc52aa1..768f9d7 100644
--- a/gnu/packages/ibus.scm
+++ b/gnu/packages/ibus.scm
@@ -76,8 +76,7 @@
(build-system glib-or-gtk-build-system)
(outputs '("out" "doc"))
(arguments
- `(#:tests? #f ; tests fail because there's no connection to dbus
- #:parallel-build? #f ; race condition discovered with emoji support
+ `(#:parallel-build? #f ; race condition discovered with emoji support
#:configure-flags (list "--enable-python-library"
"--enable-gtk-doc"
"--enable-memconf"
@@ -95,6 +94,14 @@
"--enable-wayland")
#:phases
(modify-phases %standard-phases
+ (add-after 'unpack 'disable-failing-tests
+ (lambda _
+ ;; These tests require /etc/machine-id.
+ (with-directory-excursion "src/tests"
+ (substitute* '("ibus-share.c" "ibus-compose.c"
+ "ibus-keypress.c")
+ (("[ \t]*return g_test_run \\(\\);") "")))
+ #t))
(add-after 'unpack 'patch-docbook-xml
(lambda* (#:key inputs #:allow-other-keys)
(with-directory-excursion "docs/reference/ibus"
@@ -102,7 +109,7 @@
(("http://www.oasis-open.org/docbook/xml/4.1.2/")
(string-append (assoc-ref inputs "docbook-xml")
"/xml/dtd/docbook/"))))
- #t))
+ #t))
(add-after 'unpack 'patch-python-target-directories
(lambda* (#:key outputs #:allow-other-keys)
(let ((root (string-append (assoc-ref outputs "out")
@@ -139,6 +146,20 @@
(("\"(setxkbmap|xmodmap)\"" _ prog)
(string-append "\"" (assoc-ref inputs prog) "/bin/" prog
"\"")))
#t))
+ (add-before 'check 'pre-check
+ (lambda _
+ ;; Tests write to $HOME.
+ (setenv "HOME" (getcwd))
+ ;; Tests look for $XDG_RUNTIME_DIR.
+ (setenv "XDG_RUNTIME_DIR" (getcwd))
+ ;; For missing '/etc/machine-id'.
+ (setenv "DBUS_FATAL_WARNINGS" "0")
+ ;; Tests require a running X server.
+ (system "Xvfb :1 +extension GLX &")
+ (setenv "DISPLAY" ":1")
+ ;; Tests require running iBus daemon.
+ (system "./bus/ibus-daemon --daemonize")
+ #t))
(add-after 'install 'move-doc
(lambda* (#:key outputs #:allow-other-keys)
(let* ((out (assoc-ref outputs "out"))
@@ -186,12 +207,14 @@
("gettext" ,gettext-minimal)
("gnome-common" ,gnome-common)
("gobject-introspection" ,gobject-introspection) ; for g-ir-compiler
+ ("gtk+:bin" ,gtk+ "bin")
("gtk-doc" ,gtk-doc)
("perl" ,perl)
("pkg-config" ,pkg-config)
("python-wrapper" ,python-wrapper)
("vala" ,vala)
- ("which" ,which)))
+ ("which" ,which)
+ ("xorg-server" ,xorg-server-for-tests)))
(native-search-paths
(list (search-path-specification
(variable "IBUS_COMPONENT_PATH")
- 71/122: gnu: wayland: Fix and move documentation., (continued)
- 71/122: gnu: wayland: Fix and move documentation., guix-commits, 2021/06/11
- 78/122: gnu: gtk+: Enable tests., guix-commits, 2021/06/11
- 79/122: gnu: gtk+: Add missing inputs., guix-commits, 2021/06/11
- 30/122: gnu: pango: Update to 1.48.3., guix-commits, 2021/06/11
- 59/122: gnu: atkmm: Enable documentation., guix-commits, 2021/06/11
- 66/122: gnu: at-spi2-atk: Update home-page and license., guix-commits, 2021/06/11
- 80/122: gnu: gtk+: Enable cloud-providers support., guix-commits, 2021/06/11
- 81/122: gnu: gtk+: Update to 3.24.27., guix-commits, 2021/06/11
- 82/122: gnu: gtkmm: Update to 3.24.4., guix-commits, 2021/06/11
- 85/122: gnu: ibus: Enable documentation., guix-commits, 2021/06/11
- 87/122: gnu: ibus: Enable tests.,
guix-commits <=
- 88/122: gnu: ibus: Remove trailing #t in phases., guix-commits, 2021/06/11
- 91/122: gnu: zbar: Update to 0.23.90., guix-commits, 2021/06/11
- 93/122: gnu: gst-plugins-base: Update to 1.18.4., guix-commits, 2021/06/11
- 94/122: gnu: gst-plugins-base: Enable more features., guix-commits, 2021/06/11
- 96/122: gnu: gst-plugins-ugly: Update to 1.18.4., guix-commits, 2021/06/11
- 104/122: gnu: docbook-xsl: Update to 1.79.2., guix-commits, 2021/06/11
- 109/122: gnu: gnutls: Enable PKCS#11 support., guix-commits, 2021/06/11
- 114/122: gnu: gtkmm@2: Override inheritance of certain changes from gtkmm., guix-commits, 2021/06/11
- 113/122: gnu: gtkmm: Change build-system and adjust arguments accordingly., guix-commits, 2021/06/11
- 106/122: gnu: glib-networking: Update to 2.68.0., guix-commits, 2021/06/11