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 CDYzGxLidmCjtgAAgWs5BA (envelope-from ) for ; Wed, 14 Apr 2021 14:37:38 +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 yDcTFRLidmC8NQAA1q6Kng (envelope-from ) for ; Wed, 14 Apr 2021 12:37:38 +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 2AD24271D6 for ; Wed, 14 Apr 2021 14:37:38 +0200 (CEST) Received: from localhost ([::1]:60836 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lWem0-0003XI-Sz for larch@yhetil.org; Wed, 14 Apr 2021 08:37:36 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:49210) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lWe6o-0008KB-UV for guix-patches@gnu.org; Wed, 14 Apr 2021 07:55:02 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:50480) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lWe6o-0003CT-LY for guix-patches@gnu.org; Wed, 14 Apr 2021 07:55:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1lWe6o-0005En-L1 for guix-patches@gnu.org; Wed, 14 Apr 2021 07:55:02 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#47770] [PATCH core-updates 4/4] 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:55:02 +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.161840125020022 (code B ref 47770); Wed, 14 Apr 2021 11:55:02 +0000 Received: (at 47770) by debbugs.gnu.org; 14 Apr 2021 11:54:10 +0000 Received: from localhost ([127.0.0.1]:33782 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lWe5x-0005Cm-IN for submit@debbugs.gnu.org; Wed, 14 Apr 2021 07:54:09 -0400 Received: from out2.migadu.com ([188.165.223.204]:56961) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lWe5v-0005CC-E8 for 47770@debbugs.gnu.org; Wed, 14 Apr 2021 07:54:08 -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=1618401246; 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=g4yfA1unVrC7ygXd77N82ZUBllbt7ir6ykROqwqwkYC4Io/yQtk+z2+3CmtDw9gPdxs6JA TT4e2dUyk3r30tC6NsD/fRAXanXMc/FLwqg0ffQCSCODuShzJYXBRMHub1xYJfkGo4mq+k x+h4XO2+xn1lvMk9yeet9Unmd+ceRSe/vqnyjKMsPgQcXRh+Pfnf5019P8VPluMkp/kDpn aoNk0J0i6z70iDuyO6dUVTodko7kT4ySO+q0xkmiLtOpQeqGUfe9kHE/jaJSNYDzLxVlgd w4LUtexmdQWpxUKDeL4k6YFkcbKkWBzU+K+dSe87XPWUnGczbra8WpN7jAHmkg== Date: Wed, 14 Apr 2021 07:53:49 -0400 Message-Id: <20210414115349.14040-4-rg@raghavgururajan.name> In-Reply-To: <20210414115349.14040-1-rg@raghavgururajan.name> References: <20210414115349.14040-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: 2AD24271D6 X-Spam-Score: -4.00 X-Migadu-Scanner: scn0.migadu.com X-TUID: yhJH7JnBx+q7 * 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