From patchwork Wed Apr 7 20:42:25 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Raghav Gururajan X-Patchwork-Id: 28368 Return-Path: X-Original-To: patchwork@mira.cbaines.net Delivered-To: patchwork@mira.cbaines.net Received: by mira.cbaines.net (Postfix, from userid 113) id 29A8F27BC6E; Wed, 7 Apr 2021 21:45:03 +0100 (BST) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-2.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, MAILING_LIST_MULTI,RCVD_IN_MSPIKE_H4,RCVD_IN_MSPIKE_WL,SPF_HELO_PASS, T_DKIM_INVALID,URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.2 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTPS id 7B43C27BC68 for ; Wed, 7 Apr 2021 21:45:02 +0100 (BST) Received: from localhost ([::1]:53176 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lUF2r-0003Hh-J1 for patchwork@mira.cbaines.net; Wed, 07 Apr 2021 16:45:01 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:35342) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lUF1y-0002Dn-5g for guix-patches@gnu.org; Wed, 07 Apr 2021 16:44:06 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:33903) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lUF1x-0000Ju-R3 for guix-patches@gnu.org; Wed, 07 Apr 2021 16:44:05 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1lUF1x-0005iY-P8 for guix-patches@gnu.org; Wed, 07 Apr 2021 16:44:05 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#47643] [PATCH 10/22] gnu: ibus: Enable tests. Resent-From: Raghav Gururajan Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Wed, 07 Apr 2021 20:44:05 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 47643 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: To: 47643@debbugs.gnu.org Cc: Raghav Gururajan Received: via spool by 47643-submit@debbugs.gnu.org id=B47643.161782819721734 (code B ref 47643); Wed, 07 Apr 2021 20:44:05 +0000 Received: (at 47643) by debbugs.gnu.org; 7 Apr 2021 20:43:17 +0000 Received: from localhost ([127.0.0.1]:45404 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lUF1B-0005eM-9O for submit@debbugs.gnu.org; Wed, 07 Apr 2021 16:43:17 -0400 Received: from out0.migadu.com ([94.23.1.103]:62156) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lUF15-0005cg-Ou for 47643@debbugs.gnu.org; Wed, 07 Apr 2021 16:43:12 -0400 X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=raghavgururajan.name; s=key1; t=1617828191; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=6HGT6NsZjX+SqBeAo7csBsp/i8WYOW/jfI2Q6PXpCZU=; b=szYznbCNkYUgYld8VNJzrvCn+7rOpJFxLSsTOXp3NJcn0tjjM0N0ZFoZVacp/RiL4LTb+f f6KjE+eAmuE1toilmD5BdVfenubh/5mh1uM5gB92Nfsqgi9oFX7I1/ZWoKRRFtp/8BI+7o CTCVpDJMlxTNAANw+SJ4uRyd40oXLSCetPALdmKJrjgQ2SANUvuwsOqNJq1Ecfve8i5RWU 3wq1hPCRGoqeS46QL7LFcYaJU+RQbWdEZ+HsJsRbT4pvWYyyC42wfars5MOy3n8JgQIMeG v+FmW3TH1D/QiNlBTPq+YlpPDdk5N+dZneOrKW2IhaWVZ4GDxdQArLwS+ZjC4g== Date: Wed, 7 Apr 2021 16:42:25 -0400 Message-Id: <20210407204237.3875-10-rg@raghavgururajan.name> In-Reply-To: <20210407204237.3875-1-rg@raghavgururajan.name> References: <20210407204237.3875-1-rg@raghavgururajan.name> MIME-Version: 1.0 X-Migadu-Flow: FLOW_OUT X-Migadu-Auth-User: rg@raghavgururajan.name X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org Sender: "Guix-patches" Reply-to: Raghav Gururajan X-ACL-Warn: , Raghav Gururajan via Guix-patches X-Patchwork-Original-From: Raghav Gururajan via Guix-patches via From: Raghav Gururajan X-getmail-retrieved-from-mailbox: Patches * 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 | 30 +++++++++++++++++++++++++++--- 1 file changed, 27 insertions(+), 3 deletions(-) diff --git a/gnu/packages/ibus.scm b/gnu/packages/ibus.scm index 3f151d9cd7..7e7d6c64d1 100644 --- a/gnu/packages/ibus.scm +++ b/gnu/packages/ibus.scm @@ -76,7 +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-tests? #f #:parallel-build? #f ; race condition discovered with emoji support #:configure-flags (list "--enable-python-library" "--enable-gtk-doc" @@ -95,6 +95,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 +110,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 +147,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 +208,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")