From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:470:142:3::10]:53186) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jOn3v-0007Kh-Aa for guix-patches@gnu.org; Wed, 15 Apr 2020 14:47:04 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1jOn3u-0004kX-6L for guix-patches@gnu.org; Wed, 15 Apr 2020 14:47:03 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:53835) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1jOn3t-0004kI-SQ for guix-patches@gnu.org; Wed, 15 Apr 2020 14:47:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1jOn3t-0002wa-QB for guix-patches@gnu.org; Wed, 15 Apr 2020 14:47:01 -0400 Subject: [bug#40543] [PATCH v2 5/5] gnu: virt-manager: Work towards enabling some tests. Resent-Message-ID: From: Marius Bakke In-Reply-To: <20200415174952.9368-5-mail@cbaines.net> References: <87wo6n726x.fsf@cbaines.net> <20200415174952.9368-1-mail@cbaines.net> <20200415174952.9368-5-mail@cbaines.net> Date: Wed, 15 Apr 2020 20:46:17 +0200 Message-ID: <873694io3q.fsf@devup.no> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha512; protocol="application/pgp-signature" 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: Christopher Baines , 40543@debbugs.gnu.org --=-=-= Content-Type: text/plain Christopher Baines writes: > * 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 | 25 +++++++++++++++++++++---- > 1 file changed, 21 insertions(+), 4 deletions(-) > > diff --git a/gnu/packages/virtualization.scm b/gnu/packages/virtualization.scm > index be17ec15f0..c8840f345a 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,13 @@ 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) > + ("dbus" ,dbus) > + ("at-spi2-core" ,at-spi2-core) > + ("gsettings-desktop-schemas" ,gsettings-desktop-schemas))) Perhaps we should comment these inputs for now so that they won't needlessly rebuild this package? Also, this should use 'xorg-server-for-tests'. Otherwise LGTM. --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQEzBAEBCgAdFiEEu7At3yzq9qgNHeZDoqBt8qM6VPoFAl6XVnkACgkQoqBt8qM6 VPqDEgf/Q4GXtVpl7Hw7nZWO/lg0uB4LujCV7Gbhz68fhpW/l2XgJRy+OE/lzHSl HuyUUHQAArZubeW7jCFdqMqJsrpqokE/dXjgpMYeQ9I2Fq4StYfp/4SC7zijO8Ws H1g/2OK2R7s6vEnsh2VWwZ/XEw7gZ4o9nlxRyFCqUR/3RkPt5LMT7xLJhyFF5atY TIXgmy775dVkqJpcIFRR5I2Acx9Alq6gLNaLg7n2m1+UabizqpOd69dF6rdG8UD2 Olegga2Y1P3ONpjr4WUJqJcB3wOXVd8k9ifZNQNi7DjOMtXTYBzh0XJqDOJU96uf Dw/av7vEYHzlyg20mm+WRcLQZ0+a2g== =zm6A -----END PGP SIGNATURE----- --=-=-=--