From patchwork Fri Apr 10 16:21:57 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Christopher Baines X-Patchwork-Id: 21183 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 404C327BBE4; Fri, 10 Apr 2020 17:23:20 +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.9 required=5.0 tests=BAYES_00,MAILING_LIST_MULTI, UNPARSEABLE_RELAY,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 ESMTP id 0A7CC27BBE1 for ; Fri, 10 Apr 2020 17:23:20 +0100 (BST) Received: from localhost ([::1]:36674 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jMwR5-0004M7-Jo for patchwork@mira.cbaines.net; Fri, 10 Apr 2020 12:23:19 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:36214) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jMwQq-0004C7-KR for guix-patches@gnu.org; Fri, 10 Apr 2020 12:23:05 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1jMwQp-0004Dt-Ge for guix-patches@gnu.org; Fri, 10 Apr 2020 12:23:04 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:44386) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1jMwQp-0004Dk-DP for guix-patches@gnu.org; Fri, 10 Apr 2020 12:23:03 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1jMwQp-0004pO-9f for guix-patches@gnu.org; Fri, 10 Apr 2020 12:23:03 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#40543] [PATCH 4/4] gnu: virt-manager: Work towards enabling some tests. Resent-From: Christopher Baines Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Fri, 10 Apr 2020 16:23:03 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 40543 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 40543@debbugs.gnu.org Received: via spool by 40543-submit@debbugs.gnu.org id=B40543.158653572418461 (code B ref 40543); Fri, 10 Apr 2020 16:23:03 +0000 Received: (at 40543) by debbugs.gnu.org; 10 Apr 2020 16:22:04 +0000 Received: from localhost ([127.0.0.1]:55930 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jMwPs-0004nU-8H for submit@debbugs.gnu.org; Fri, 10 Apr 2020 12:22:04 -0400 Received: from mira.cbaines.net ([212.71.252.8]:47210) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jMwPo-0004m3-I1 for 40543@debbugs.gnu.org; Fri, 10 Apr 2020 12:22:02 -0400 Received: from localhost (unknown [46.237.163.111]) by mira.cbaines.net (Postfix) with ESMTPSA id D91F327BBEB for <40543@debbugs.gnu.org>; Fri, 10 Apr 2020 17:21:59 +0100 (BST) Received: from localhost (localhost [local]) by localhost (OpenSMTPD) with ESMTPA id a6b3508b for <40543@debbugs.gnu.org>; Fri, 10 Apr 2020 16:21:57 +0000 (UTC) From: Christopher Baines Date: Fri, 10 Apr 2020 17:21:57 +0100 Message-Id: <20200410162157.21065-4-mail@cbaines.net> X-Mailer: git-send-email 2.26.0 In-Reply-To: <20200410162157.21065-1-mail@cbaines.net> References: <87wo6n726x.fsf@cbaines.net> <20200410162157.21065-1-mail@cbaines.net> MIME-Version: 1.0 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 209.51.188.43 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" X-getmail-retrieved-from-mailbox: Patches * gnu/packages/virtualization.scm (virt-manager)[arguments]: Set #:test-target to "test_ui", replace the 'check phase. [native-inputs]: Add some inputs required for running tests. --- gnu/packages/virtualization.scm | 22 +++++++++++++++++++--- 1 file changed, 19 insertions(+), 3 deletions(-) diff --git a/gnu/packages/virtualization.scm b/gnu/packages/virtualization.scm index 5bee79cbb4..292c4d41f4 100644 --- a/gnu/packages/virtualization.scm +++ b/gnu/packages/virtualization.scm @@ -596,9 +596,10 @@ virtualization library.") (build-system python-build-system) (arguments `(#:use-setuptools? #f ; uses custom distutils 'install' command - ;; Some of the tests seem to require network access to install virtual - ;; machines. - #:tests? #f + #:test-target "test_ui" + #:tests? #f ; TODO The tests currently fail + ; RuntimeError: Loop condition wasn't + ; met #:imported-modules ((guix build glib-or-gtk-build-system) ,@%python-build-system-modules) #:modules ((ice-9 match) @@ -645,6 +646,16 @@ virtualization library.") ,(filter identity paths)))) bin-files)) #t)) + (replace 'check + (lambda* (#:key tests? #:allow-other-keys) + (when tests? + (setenv "HOME" "/tmp") + (system "Xvfb :1 &") + (setenv "DISPLAY" ":1") + ;; Dogtail requires that Assistive Technology support be enabled + (setenv "GTK_MODULES" "gail:atk-bridge") + (invoke "dbus-run-session" "--" "python" "setup.py" "test_ui")) + #t)) (add-after 'install 'glib-or-gtk-compile-schemas (assoc-ref glib-or-gtk:%standard-phases 'glib-or-gtk-compile-schemas)) (add-after 'install 'glib-or-gtk-wrap @@ -673,6 +684,11 @@ virtualization library.") ("gobject-introspection" ,gobject-introspection) ("gtk+" ,gtk+ "bin") ; gtk-update-icon-cache ("perl" ,perl) ; pod2man + ("python-dogtail" ,python-dogtail) + ("xvfb" ,xorg-server) + ("dbus" ,dbus) + ("at-spi2-core" ,at-spi2-core) + ("gsettings-desktop-schemas" ,gsettings-desktop-schemas) ("intltool" ,intltool))) (home-page "https://virt-manager.org/") (synopsis "Manage virtual machines")