From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:470:142:3::10]:45530) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jOztS-00083Z-0I for guix-patches@gnu.org; Thu, 16 Apr 2020 04:29:07 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1jOztQ-0005vm-Rw for guix-patches@gnu.org; Thu, 16 Apr 2020 04:29:05 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:54161) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1jOztQ-0005vF-C6 for guix-patches@gnu.org; Thu, 16 Apr 2020 04:29:04 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1jOztQ-0000en-9A for guix-patches@gnu.org; Thu, 16 Apr 2020 04:29:04 -0400 Subject: [bug#40543] [PATCH v3 5/5] gnu: virt-manager: Work towards enabling some tests. Resent-Message-ID: From: Christopher Baines Date: Thu, 16 Apr 2020 09:28:52 +0100 Message-Id: <20200416082852.4319-5-mail@cbaines.net> In-Reply-To: <20200416082852.4319-1-mail@cbaines.net> References: <20200415174952.9368-1-mail@cbaines.net> <20200416082852.4319-1-mail@cbaines.net> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+kyle=kyleam.com@gnu.org Sender: "Guix-patches" To: 40543@debbugs.gnu.org * 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 | 26 ++++++++++++++++++++++---- 1 file changed, 22 insertions(+), 4 deletions(-) diff --git a/gnu/packages/virtualization.scm b/gnu/packages/virtualization.scm index be17ec15f0..d56202d4b7 100644 --- a/gnu/packages/virtualization.scm +++ b/gnu/packages/virtualization.scm @@ -602,9 +602,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) @@ -651,6 +652,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 @@ -679,7 +690,14 @@ virtualization library.") ("gobject-introspection" ,gobject-introspection) ("gtk+" ,gtk+ "bin") ; gtk-update-icon-cache ("perl" ,perl) ; pod2man - ("intltool" ,intltool))) + ("intltool" ,intltool) + ;; The following are required for running the tests + ;; ("python-dogtail" ,python-dogtail) + ;; ("xvfb" ,xorg-server-for-tests) + ;; ("dbus" ,dbus) + ;; ("at-spi2-core" ,at-spi2-core) + ;; ("gsettings-desktop-schemas" ,gsettings-desktop-schemas) + )) (home-page "https://virt-manager.org/") (synopsis "Manage virtual machines") (description -- 2.26.0