From: Raghav Gururajan via Guix-patches via <guix-patches@gnu.org>
To: 47770@debbugs.gnu.org
Cc: Raghav Gururajan <rg@raghavgururajan.name>
Subject: [bug#47770] [PATCH core-updates v2 4/5] gnu: ibus: Enable tests.
Date: Thu, 15 Apr 2021 08:29:01 -0400 [thread overview]
Message-ID: <20210415122902.2608-4-rg@raghavgururajan.name> (raw)
In-Reply-To: <20210415122902.2608-1-rg@raghavgururajan.name>
* gnu/packages/ibus.scm (ibus)[arguments](tests): Remove argument.
(parallel-tests): New 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 3f151d9cd7..fa12499bb9 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")
--
2.31.1
next prev parent reply other threads:[~2021-04-15 12:37 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-04-14 11:42 [bug#47770] [PATCH core-updates 0/4] Update ibus Raghav Gururajan via Guix-patches via
2021-04-14 11:53 ` [bug#47770] [PATCH core-updates 1/4] gnu: ibus: Update to 1.5.24 Raghav Gururajan via Guix-patches via
2021-04-14 11:53 ` [bug#47770] [PATCH core-updates 2/4] gnu: ibus: Enable documentation Raghav Gururajan via Guix-patches via
2021-04-14 21:21 ` Maxime Devos
2021-04-15 12:31 ` Raghav Gururajan via Guix-patches via
2021-04-14 11:53 ` [bug#47770] [PATCH core-updates 3/4] gnu: ibus: Enable memconf Raghav Gururajan via Guix-patches via
2021-04-14 11:53 ` [bug#47770] [PATCH core-updates 4/4] gnu: ibus: Enable tests Raghav Gururajan via Guix-patches via
2021-04-14 21:24 ` Maxime Devos
2021-04-15 12:33 ` Raghav Gururajan via Guix-patches via
2021-04-15 12:28 ` [bug#47770] [PATCH core-updates v2 1/5] gnu: ibus: Update to 1.5.24 Raghav Gururajan via Guix-patches via
2021-04-15 12:28 ` [bug#47770] [PATCH core-updates v2 2/5] gnu: ibus: Enable documentation Raghav Gururajan via Guix-patches via
2021-04-15 12:29 ` [bug#47770] [PATCH core-updates v2 3/5] gnu: ibus: Enable memconf Raghav Gururajan via Guix-patches via
2021-04-15 12:29 ` Raghav Gururajan via Guix-patches via [this message]
2021-04-15 12:29 ` [bug#47770] [PATCH core-updates v2 5/5] gnu: ibus: Remove trailing #t in phases Raghav Gururajan via Guix-patches via
2021-04-16 15:42 ` bug#47770: (no subject) Raghav Gururajan via Guix-patches via
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=20210415122902.2608-4-rg@raghavgururajan.name \
--to=guix-patches@gnu.org \
--cc=47770@debbugs.gnu.org \
--cc=rg@raghavgururajan.name \
/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).