From patchwork Wed Apr 14 10:57:46 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Raghav Gururajan X-Patchwork-Id: 28536 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 59B3E27BC76; Wed, 14 Apr 2021 12:01:08 +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 0587927BC75 for ; Wed, 14 Apr 2021 12:01:07 +0100 (BST) Received: from localhost ([::1]:43600 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lWdGc-0003Ez-6I for patchwork@mira.cbaines.net; Wed, 14 Apr 2021 07:01:06 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:33288) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lWdFc-0002ur-17 for guix-patches@gnu.org; Wed, 14 Apr 2021 07:00:04 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:50423) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lWdFb-0006Dw-OY for guix-patches@gnu.org; Wed, 14 Apr 2021 07:00:03 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1lWdFb-0001gJ-NE for guix-patches@gnu.org; Wed, 14 Apr 2021 07:00:03 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#47643] [PATCH v2 09/18] gnu: ibus: Enable tests. Resent-From: Raghav Gururajan Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Wed, 14 Apr 2021 11:00:03 +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.16183979666296 (code B ref 47643); Wed, 14 Apr 2021 11:00:03 +0000 Received: (at 47643) by debbugs.gnu.org; 14 Apr 2021 10:59:26 +0000 Received: from localhost ([127.0.0.1]:33713 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lWdF0-0001dU-2P for submit@debbugs.gnu.org; Wed, 14 Apr 2021 06:59:26 -0400 Received: from out0.migadu.com ([94.23.1.103]:30766) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lWdEz-0001dL-7e for 47643@debbugs.gnu.org; Wed, 14 Apr 2021 06:59:25 -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=1618397964; 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=KPQbGUScIySfHTedtM4OLjXfVkQSu2B6CCIVwq9WrvlVrqLhuEvSfMPY8SLJjQ1W2GWRre Sn9Pd50KrFbPNt7tI+Th7Y8PWdJ5AAEaWgyaEZZNHrBYq0HtwoEreMGo/xRO7W3BU8T4Dd db4WWsTsRZCNkbSbhRfQgfUYxLI5NGf7pOyqHVdXB2kIvTeMcI57dgB1GlOCUfW5PKOR07 EQol3ltghyc8Kpn61EXsHf1dXtJ7S3bOCyoYndNUS4+NyDxUV4n1VAPvyhDu0UPWd5pJwi K6yJQ6WlULvl40MdUqj7EaY3Y+IVoUHGTYqULyfzIL+ZcLxMhtcWcQLZxk2QMA== Date: Wed, 14 Apr 2021 06:57:46 -0400 Message-Id: <20210414105755.12702-9-rg@raghavgururajan.name> In-Reply-To: <20210414105755.12702-6-rg@raghavgururajan.name> References: <20210414105755.12702-6-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")