Message ID | 20200410162157.21065-4-mail@cbaines.net |
---|---|
State | Accepted |
Headers | show |
Series | Work towards enabling virt-manager tests | expand |
Context | Check | Description |
---|---|---|
cbaines/comparison | success | View comparision |
cbaines/git branch | success | View Git branch |
cbaines/applying patch | success | View Laminar job |
Christopher Baines <mail@cbaines.net> 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. [...] > @@ -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) Please leave a comment along the lines of ;; The following are required for running the tests. ...to leave a clue for the next packager who wonders whether these inputs are misplaced. Apart from these comments, the series LGTM.
Marius Bakke <mbakke@fastmail.com> writes: > Christopher Baines <mail@cbaines.net> 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. > > [...] > >> @@ -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) > > Please leave a comment along the lines of > > ;; The following are required for running the tests. > > ...to leave a clue for the next packager who wonders whether these > inputs are misplaced. > > Apart from these comments, the series LGTM. Sure, I've sent some new patches now with this change.
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")