From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp0 ([2001:41d0:2:bcc0::]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id iCaeNXTLdmAQWAAAgWs5BA (envelope-from ) for ; Wed, 14 Apr 2021 13:01:08 +0200 Received: from aspmx1.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp0 with LMTPS id gAq5L3TLdmCVcwAA1q6Kng (envelope-from ) for ; Wed, 14 Apr 2021 11:01:08 +0000 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id 9956925706 for ; Wed, 14 Apr 2021 13:01:08 +0200 (CEST) Received: from localhost ([::1]:43600 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lWdGd-0003Ez-3I for larch@yhetil.org; Wed, 14 Apr 2021 07:01:07 -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 Content-Transfer-Encoding: 8bit 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+larch=yhetil.org@gnu.org Sender: "Guix-patches" Reply-to: Raghav Gururajan X-ACL-Warn: , Raghav Gururajan via Guix-patches From: Raghav Gururajan via Guix-patches via X-Migadu-Flow: FLOW_IN X-Migadu-Spam-Score: -4.00 Authentication-Results: aspmx1.migadu.com; none X-Migadu-Queue-Id: 9956925706 X-Spam-Score: -4.00 X-Migadu-Scanner: scn0.migadu.com X-TUID: rIuqVzV6W5s4 * 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") -- 2.31.1