From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp2 ([2001:41d0:2:bcc0::]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id SMcOHpAzeGBpawAAgWs5BA (envelope-from ) for ; Thu, 15 Apr 2021 14:37:36 +0200 Received: from aspmx1.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp2 with LMTPS id MPLtF5AzeGAmJAAAB5/wlQ (envelope-from ) for ; Thu, 15 Apr 2021 12:37:36 +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 36E45208FF for ; Thu, 15 Apr 2021 14:37:36 +0200 (CEST) Received: from localhost ([::1]:50190 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lX1FX-0004LR-Cy for larch@yhetil.org; Thu, 15 Apr 2021 08:37:35 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:47016) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lX18G-0005vc-QO for guix-patches@gnu.org; Thu, 15 Apr 2021 08:30:07 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:53364) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lX18F-0007cK-VU for guix-patches@gnu.org; Thu, 15 Apr 2021 08:30:04 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1lX18F-0007XK-N1 for guix-patches@gnu.org; Thu, 15 Apr 2021 08:30:03 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#47770] [PATCH core-updates v2 4/5] gnu: ibus: Enable tests. Resent-From: Raghav Gururajan Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Thu, 15 Apr 2021 12:30:03 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 47770 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 47770@debbugs.gnu.org Cc: Raghav Gururajan Received: via spool by 47770-submit@debbugs.gnu.org id=B47770.161848977828864 (code B ref 47770); Thu, 15 Apr 2021 12:30:03 +0000 Received: (at 47770) by debbugs.gnu.org; 15 Apr 2021 12:29:38 +0000 Received: from localhost ([127.0.0.1]:36667 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lX17q-0007VT-3E for submit@debbugs.gnu.org; Thu, 15 Apr 2021 08:29:38 -0400 Received: from out2.migadu.com ([188.165.223.204]:51874) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lX17l-0007Uh-PI for 47770@debbugs.gnu.org; Thu, 15 Apr 2021 08:29:34 -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=1618489771; 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=9TKFt6ftgyOef43Evh2nKfB61HZ4e0Nvma1F7EFVBWI=; b=CJ57sbM/fUbk+jbJuV9v4AfB59hacEs3t1TKmiP8ogmz0YeJyWfQvUKs/ub2l06KqxKw35 ZE1EbHYm+ZOF/xRC3KWaWaHKLVcIGRIjf5DaQ0nZhpmZTuBn2W9TIBIfnOcosDw1YG5Pcp 1utScXwS1FqktdH1/k53lonU6iV05740kYhoiKCP1R2tAWbQytvDygniSw8VvWY0x/B5Il QXO0klFMz41ljCQUtYKZHkZkQR9dfqoQtZFE3jqgHtBO57xZPosS9sv1he6kO9GOst2iQ5 8hEMQ1FLZmXvWO9CZ4mOvEsgoSvlpMHFScbsT4TfKD0N+Sn3JbMdT/hd0ZcD4Q== Date: Thu, 15 Apr 2021 08:29:01 -0400 Message-Id: <20210415122902.2608-4-rg@raghavgururajan.name> In-Reply-To: <20210415122902.2608-1-rg@raghavgururajan.name> References: <20210415122902.2608-1-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: 36E45208FF X-Spam-Score: -4.00 X-Migadu-Scanner: scn0.migadu.com X-TUID: RdrY/oS9IWVd * 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