[PATCH 0/4] Work towards enabling virt-manager tests

  • Done
  • quality assurance status badge
Details
2 participants
  • Christopher Baines
  • Marius Bakke
Owner
unassigned
Submitted by
Christopher Baines
Severity
normal

Debbugs page

Christopher Baines wrote 5 years ago
(address . guix-patches@gnu.org)
87wo6n726x.fsf@cbaines.net
Christopher Baines (4):
gnu: Add python2-pyatspi.
gnu: python2-dogtail: Update to 0.9.11.
gnu: python2-dogtail: Switch to Python 3, and add Python 2 variant.
gnu: virt-manager: Work towards enabling some tests.

gnu/packages/gnome.scm | 8 ++++++
gnu/packages/python-xyz.scm | 46 +++++++++++++++++++++++++--------
gnu/packages/virtualization.scm | 22 +++++++++++++---
3 files changed, 62 insertions(+), 14 deletions(-)
-----BEGIN PGP SIGNATURE-----

iQKTBAEBCgB9FiEEPonu50WOcg2XVOCyXiijOwuE9XcFAl6QmiZfFIAAAAAALgAo
aXNzdWVyLWZwckBub3RhdGlvbnMub3BlbnBncC5maWZ0aGhvcnNlbWFuLm5ldDNF
ODlFRUU3NDU4RTcyMEQ5NzU0RTBCMjVFMjhBMzNCMEI4NEY1NzcACgkQXiijOwuE
9XcRGRAAokVg99oGGIGJE4A5hMH+PgJnULOKaAjKjeMd855YKBtxTh/NK8hzc+Am
MlHrxwmt97qZnD6fiGMJZ2NJ7/DR0RwScAFKNtbxD4K+7CQfDZ3jxIO/jpTWar4z
DMvjAHe7KtAQ+WoWA94nDJ+GhJbbMS0L1y++5C13M6r4XRaaDuFkXRsZiEIqynKK
43J/ofCQGgy/bqd8ppKlDBBS4scOgwkFSc3SrU97j/48IzmWFeLvcU1SlZD6DRUN
W2yA8bBIWMdE0c4broOkz9pJgEk7fACfYwutbnDJ0Su2fB1FhFYsg4qhSOGZN+60
P0zWFN3q8BR4MBIZwL2weIY9VCki9jU56sD40JOCH3zJ8fcu7Ut1UtU4tcus5IMl
PZKcLzRNES2Zq5aDz2gl2/ii/tFMtYTYsUcP+H7U7t57hIc7buW/rcpPkJ9T6mGP
i+ihytxW0YYSG36CddslJPs1iif6Qimg0sn0qa/RkVAm5SO/iEz6u+kWK5JIpkIm
kZBT7aQHzjdhSk65PrgcntbfVdJW7PUihwWvEqVeUysUtoTtVfky2C2SSuxH8CR0
cdjRGMPAjym5fmyJ7aHdaaUSwWEH72Gw8Eb15fdc2JAPFGuy/fRfqxxmE2P7msnT
S1p7orIIGuQx5xH9lrTsc50JXGVFesBrTsi7Au2d39snrsDwx4o=
=334G
-----END PGP SIGNATURE-----

Christopher Baines wrote 5 years ago
[PATCH 3/4] gnu: python2-dogtail: Switch to Python 3, and add Python 2 variant.
(address . 40543@debbugs.gnu.org)
20200410162157.21065-3-mail@cbaines.net
* gnu/packages/python-xyz.scm (python2-dogtail): Rename to python-dogtail.
[name]: Change python2-dogtail to python-dogtail.
[arguments]: Remove #:python.
[propagated-inputs,native-inputs]: Switch Python 2 packages to Python 3
variants.
(python2-dogtail): New variable.
---
gnu/packages/python-xyz.scm | 20 ++++++++++----------
1 file changed, 10 insertions(+), 10 deletions(-)

Toggle diff (56 lines)
diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm
index 455bebf1b7..dac43eeea8 100644
--- a/gnu/packages/python-xyz.scm
+++ b/gnu/packages/python-xyz.scm
@@ -1735,11 +1735,9 @@ Python 3.3+.")
(delete-file "test/test_Script.py")
#t))))))))
-(define-public python2-dogtail
- ;; Python 2 only, as it leads to "TabError: inconsistent use of tabs and
- ;; spaces in indentation" with Python 3.
+(define-public python-dogtail
(package
- (name "python2-dogtail")
+ (name "python-dogtail")
(version "0.9.11")
(source (origin
(method url-fetch)
@@ -1752,8 +1750,7 @@ Python 3.3+.")
"0sr38z7b2n12bvfd4xw4b5dnnhkn5zl3h0ymmnnzavcihfqia6l0"))))
(build-system python-build-system)
(arguments
- `(#:python ,python-2
- #:tests? #f ; TODO Launching dbus for the tests
+ `(#:tests? #f ; TODO Launching dbus for the tests
; fails
#:phases
(modify-phases %standard-phases
@@ -1765,11 +1762,11 @@ Python 3.3+.")
(invoke "dbus-run-session" "--" "nosetests" "-v" "tests/"))
#t)))))
(propagated-inputs
- `(("python-pygobject" ,python2-pygobject)
- ("python-pycairo" ,python2-pycairo)
- ("python-pyatspi" ,python2-pyatspi)))
+ `(("python-pygobject" ,python-pygobject)
+ ("python-pycairo" ,python-pycairo)
+ ("python-pyatspi" ,python-pyatspi)))
(native-inputs
- `(("python-nose" ,python2-nose)
+ `(("python-nose" ,python-nose)
("gtk+" ,gtk+)
("xvfb" ,xorg-server)
("dbus" ,dbus)
@@ -1784,6 +1781,9 @@ applications. dogtail scripts are written in Python and executed like any
other Python program.")
(license license:gpl2+)))
+(define-public python2-dogtail
+ (package-with-python2 python-dogtail))
+
(define-public python-empy
(package
(name "python-empy")
--
2.26.0
Christopher Baines wrote 5 years ago
[PATCH 2/4] gnu: python2-dogtail: Update to 0.9.11.
(address . 40543@debbugs.gnu.org)
20200410162157.21065-2-mail@cbaines.net
There are newer releases on a gitlab.com repository compared to PyPI. Make an
attempt at getting the tests to work, they don't yet I believe because DBus
isn't working properly. This update is a step towards getting a Python 3
variant of the package, which can be used to test virt-manager.

* gnu/packages/python-xyz.scm (python2-dogtail): Update to 0.9.11.
[source]: Switch from PyPI to gitlab.com, as gitlab.com contains newer
releases.
[arguments]: Replace the check phase, and update comment about disabling the
tests.
[propagated-inputs,native-inputs]: Add relevant packages.
---
gnu/packages/python-xyz.scm | 38 ++++++++++++++++++++++++++++++-------
1 file changed, 31 insertions(+), 7 deletions(-)

Toggle diff (56 lines)
diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm
index 64aa7da41e..455bebf1b7 100644
--- a/gnu/packages/python-xyz.scm
+++ b/gnu/packages/python-xyz.scm
@@ -1740,18 +1740,42 @@ Python 3.3+.")
;; spaces in indentation" with Python 3.
(package
(name "python2-dogtail")
- (version "0.9.9")
+ (version "0.9.11")
(source (origin
(method url-fetch)
- (uri (pypi-uri "dogtail" version))
+ (uri
+ (string-append
+ "https://gitlab.com/dogtail/dogtail/-/raw/released/"
+ "dogtail-" version ".tar.gz"))
(sha256
(base32
- "0p5wfssvzr9w0bvhllzbbd8fnp4cca2qxcpcsc33dchrmh5n552x"))))
+ "0sr38z7b2n12bvfd4xw4b5dnnhkn5zl3h0ymmnnzavcihfqia6l0"))))
(build-system python-build-system)
- (arguments `(#:python ,python-2
- #:tests? #f)) ; invalid command "test"
- ;; Currently no offical homepage.
- (home-page "https://pypi.org/project/dogtail/")
+ (arguments
+ `(#:python ,python-2
+ #:tests? #f ; TODO Launching dbus for the tests
+ ; fails
+ #:phases
+ (modify-phases %standard-phases
+ (replace 'check
+ (lambda* (#:key tests? #:allow-other-keys)
+ (when tests?
+ (system "Xvfb :1 &")
+ (setenv "DISPLAY" ":1")
+ (invoke "dbus-run-session" "--" "nosetests" "-v" "tests/"))
+ #t)))))
+ (propagated-inputs
+ `(("python-pygobject" ,python2-pygobject)
+ ("python-pycairo" ,python2-pycairo)
+ ("python-pyatspi" ,python2-pyatspi)))
+ (native-inputs
+ `(("python-nose" ,python2-nose)
+ ("gtk+" ,gtk+)
+ ("xvfb" ,xorg-server)
+ ("dbus" ,dbus)
+ ("gsettings-desktop-schemas" ,gsettings-desktop-schemas)
+ ("gobject-introspection" ,gobject-introspection)))
+ (home-page "https://gitlab.com/dogtail/dogtail/")
(synopsis "GUI test tool and automation framework written in Python")
(description
"Dogtail is a GUI test tool and automation framework written in Python.
--
2.26.0
Christopher Baines wrote 5 years ago
[PATCH 1/4] gnu: Add python2-pyatspi.
(address . 40543@debbugs.gnu.org)
20200410162157.21065-1-mail@cbaines.net
This will enable updating python2-dogtail to 0.9.11.

* gnu/packages/gnome.scm (python2-pyatspi): New variable.
---
gnu/packages/gnome.scm | 8 ++++++++
1 file changed, 8 insertions(+)

Toggle diff (21 lines)
diff --git a/gnu/packages/gnome.scm b/gnu/packages/gnome.scm
index 088de7dd4c..b28fe6594b 100644
--- a/gnu/packages/gnome.scm
+++ b/gnu/packages/gnome.scm
@@ -8773,6 +8773,14 @@ accessibility infrastructure.")
(license license:lgpl2.0)
(properties '((upstream-name . "pyatspi")))))
+(define-public python2-pyatspi
+ (package
+ (inherit python-pyatspi)
+ (name "python2-pyatspi")
+ (inputs
+ `(("python" ,python-2)
+ ("python-pygobject" ,python2-pygobject)))))
+
(define-public orca
(package
(name "orca")
--
2.26.0
Christopher Baines wrote 5 years ago
[PATCH 4/4] gnu: virt-manager: Work towards enabling some tests.
(address . 40543@debbugs.gnu.org)
20200410162157.21065-4-mail@cbaines.net
* 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(-)

Toggle diff (49 lines)
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")
--
2.26.0
Marius Bakke wrote 5 years ago
Re: [bug#40543] [PATCH 1/4] gnu: Add python2-pyatspi.
871rovjnso.fsf@devup.no
Christopher Baines <mail@cbaines.net> writes:

Toggle quote (23 lines)
> This will enable updating python2-dogtail to 0.9.11.
>
> * gnu/packages/gnome.scm (python2-pyatspi): New variable.
> ---
> gnu/packages/gnome.scm | 8 ++++++++
> 1 file changed, 8 insertions(+)
>
> diff --git a/gnu/packages/gnome.scm b/gnu/packages/gnome.scm
> index 088de7dd4c..b28fe6594b 100644
> --- a/gnu/packages/gnome.scm
> +++ b/gnu/packages/gnome.scm
> @@ -8773,6 +8773,14 @@ accessibility infrastructure.")
> (license license:lgpl2.0)
> (properties '((upstream-name . "pyatspi")))))
>
> +(define-public python2-pyatspi
> + (package
> + (inherit python-pyatspi)
> + (name "python2-pyatspi")
> + (inputs
> + `(("python" ,python-2)
> + ("python-pygobject" ,python2-pygobject)))))

Should the latter not be propagated? I think the #:python argument of
python-build-system will still refer to python3 in this case.

It's better to use (package-with-python2 ...), see e.g. commit
1ffd618eba4836da5e5eaf6edd394ee949512bd8 for an example.
-----BEGIN PGP SIGNATURE-----

iQEzBAEBCgAdFiEEu7At3yzq9qgNHeZDoqBt8qM6VPoFAl6QoccACgkQoqBt8qM6
VPrcdAf/byCexBGcofNixu2EV1NF67RqNmgrjubxmPaR5+JOtAGg8/rGUHWvgp/d
stKf4PBZ3ot9vTUvbc4LEDlZaSJZ8HzO4+sTPkqWXWid2jA90L2ULGuFbJmzOCoo
mWp+Wc+YCf9sBsrbmKrs4ZtZePUhiHWdUsIra0Sv7n6Sqe/fOFoJYVObmxo+2aLb
I49Q5gx4lCXeSGSfytpbw18/T4Z04xEITZjJemMQi/YMtktyLw0NEHXuLnsgSlM5
EekUEzl//f3Vydd0Fq6RXDMsuDX2rNdTbwxG92uhpVKYLL3yPbSyszlqvqYyF4Ex
1wbYVIEc7W2FJ4RE5XvLBgfAbwMWWw==
=5XDQ
-----END PGP SIGNATURE-----

Marius Bakke wrote 5 years ago
Re: [bug#40543] [PATCH 4/4] gnu: virt-manager: Work towards enabling some tests.
87y2r3i8m5.fsf@devup.no
Christopher Baines <mail@cbaines.net> writes:

Toggle quote (4 lines)
> * 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.

[...]

Toggle quote (10 lines)
> @@ -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.
-----BEGIN PGP SIGNATURE-----

iQEzBAEBCgAdFiEEu7At3yzq9qgNHeZDoqBt8qM6VPoFAl6QpOIACgkQoqBt8qM6
VPpW3wf/UGS+raJ/99xGNEvLw1vySQ9pMNV/ONckgAolWMHGxRtMV+qmYzDbB2lm
igjyXXMGDCOn1bKp314JLi0OaQSUT9kaR3vbmgFSaTQiC35ng2sn8q9Vo62uk2mp
8cD82ltOnsLkKHOjNIa4+O4gAIY47WIwAPb/Ua/HSpIR/rhPRjpkv8i3FrSstE4f
zS8YCrkLZmnU5dH66eyYX/62+KtK3e6CIfyycjKN235uLaEA7379DaYed3gGrrlX
hwiPcYQGC9aXNSJBCV0c5zh1NylXFJw0sREr3YDMcOXbdH8BpjWQKQqb3VhJ9JEq
6b+k+31RJ/0tyRZTwlvfET6+nq9zYA==
=W0OU
-----END PGP SIGNATURE-----

Christopher Baines wrote 5 years ago
[PATCH v2 3/5] gnu: python2-dogtail: Update to 0.9.11.
(address . 40543@debbugs.gnu.org)
20200415174952.9368-3-mail@cbaines.net
There are newer releases on a gitlab.com repository compared to PyPI. Make an
attempt at getting the tests to work, they don't yet I believe because DBus
isn't working properly. This update is a step towards getting a Python 3
variant of the package, which can be used to test virt-manager.

* gnu/packages/python-xyz.scm (python2-dogtail): Update to 0.9.11.
[source]: Switch from PyPI to gitlab.com, as gitlab.com contains newer
releases.
[arguments]: Replace the check phase, and update comment about disabling the
tests.
[propagated-inputs,native-inputs]: Add relevant packages.
---
gnu/packages/python-xyz.scm | 38 ++++++++++++++++++++++++++++++-------
1 file changed, 31 insertions(+), 7 deletions(-)

Toggle diff (56 lines)
diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm
index 20b8784c05..3dccedd6df 100644
--- a/gnu/packages/python-xyz.scm
+++ b/gnu/packages/python-xyz.scm
@@ -1741,18 +1741,42 @@ Python 3.3+.")
;; spaces in indentation" with Python 3.
(package
(name "python2-dogtail")
- (version "0.9.9")
+ (version "0.9.11")
(source (origin
(method url-fetch)
- (uri (pypi-uri "dogtail" version))
+ (uri
+ (string-append
+ "https://gitlab.com/dogtail/dogtail/-/raw/released/"
+ "dogtail-" version ".tar.gz"))
(sha256
(base32
- "0p5wfssvzr9w0bvhllzbbd8fnp4cca2qxcpcsc33dchrmh5n552x"))))
+ "0sr38z7b2n12bvfd4xw4b5dnnhkn5zl3h0ymmnnzavcihfqia6l0"))))
(build-system python-build-system)
- (arguments `(#:python ,python-2
- #:tests? #f)) ; invalid command "test"
- ;; Currently no offical homepage.
- (home-page "https://pypi.org/project/dogtail/")
+ (arguments
+ `(#:python ,python-2
+ #:tests? #f ; TODO Launching dbus for the tests
+ ; fails
+ #:phases
+ (modify-phases %standard-phases
+ (replace 'check
+ (lambda* (#:key tests? #:allow-other-keys)
+ (when tests?
+ (system "Xvfb :1 &")
+ (setenv "DISPLAY" ":1")
+ (invoke "dbus-run-session" "--" "nosetests" "-v" "tests/"))
+ #t)))))
+ (propagated-inputs
+ `(("python-pygobject" ,python2-pygobject)
+ ("python-pycairo" ,python2-pycairo)
+ ("python-pyatspi" ,python2-pyatspi)))
+ (native-inputs
+ `(("python-nose" ,python2-nose)
+ ("gtk+" ,gtk+)
+ ("xvfb" ,xorg-server)
+ ("dbus" ,dbus)
+ ("gsettings-desktop-schemas" ,gsettings-desktop-schemas)
+ ("gobject-introspection" ,gobject-introspection)))
+ (home-page "https://gitlab.com/dogtail/dogtail/")
(synopsis "GUI test tool and automation framework written in Python")
(description
"Dogtail is a GUI test tool and automation framework written in Python.
--
2.26.0
Christopher Baines wrote 5 years ago
[PATCH v2 2/5] gnu: python-pyatspi: Propagate python-pygobject.
(address . 40543@debbugs.gnu.org)
20200415174952.9368-2-mail@cbaines.net
As python-pygobject is required at runtime.

* gnu/packages/gnome.scm (python-pygobject)[inputs]: Move python-pygobject to…
[propagated-inputs]: …here.
(python2-pygobject)[inputs]: Move python2-pygobject to…
[propagated-inputs]: …here.
---
gnu/packages/gnome.scm | 10 ++++++----
1 file changed, 6 insertions(+), 4 deletions(-)

Toggle diff (30 lines)
diff --git a/gnu/packages/gnome.scm b/gnu/packages/gnome.scm
index 4710bd1349..e7b36fff1d 100644
--- a/gnu/packages/gnome.scm
+++ b/gnu/packages/gnome.scm
@@ -8763,8 +8763,9 @@ from gi.repository import Atspi"))
(native-inputs
`(("pkg-config" ,pkg-config)))
(inputs
- `(("python" ,python)
- ("python-pygobject" ,python-pygobject)))
+ `(("python" ,python)))
+ (propagated-inputs
+ `(("python-pygobject" ,python-pygobject)))
(synopsis "Python client bindings for D-Bus AT-SPI")
(home-page "https://wiki.linuxfoundation.org/accessibility\
/atk/at-spi/at-spi_on_d-bus")
@@ -8779,8 +8780,9 @@ accessibility infrastructure.")
(inherit python-pyatspi)
(name "python2-pyatspi")
(inputs
- `(("python" ,python-2)
- ("python-pygobject" ,python2-pygobject)))))
+ `(("python" ,python-2)))
+ (propagated-inputs
+ `(("python-pygobject" ,python2-pygobject)))))
(define-public orca
(package
--
2.26.0
Christopher Baines wrote 5 years ago
[PATCH v2 4/5] gnu: python2-dogtail: Switch to Python 3, and add Python 2 variant.
(address . 40543@debbugs.gnu.org)
20200415174952.9368-4-mail@cbaines.net
* gnu/packages/python-xyz.scm (python2-dogtail): Rename to python-dogtail.
[name]: Change python2-dogtail to python-dogtail.
[arguments]: Remove #:python.
[propagated-inputs,native-inputs]: Switch Python 2 packages to Python 3
variants.
(python2-dogtail): New variable.
---
gnu/packages/python-xyz.scm | 20 ++++++++++----------
1 file changed, 10 insertions(+), 10 deletions(-)

Toggle diff (56 lines)
diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm
index 3dccedd6df..768f030051 100644
--- a/gnu/packages/python-xyz.scm
+++ b/gnu/packages/python-xyz.scm
@@ -1736,11 +1736,9 @@ Python 3.3+.")
(delete-file "test/test_Script.py")
#t))))))))
-(define-public python2-dogtail
- ;; Python 2 only, as it leads to "TabError: inconsistent use of tabs and
- ;; spaces in indentation" with Python 3.
+(define-public python-dogtail
(package
- (name "python2-dogtail")
+ (name "python-dogtail")
(version "0.9.11")
(source (origin
(method url-fetch)
@@ -1753,8 +1751,7 @@ Python 3.3+.")
"0sr38z7b2n12bvfd4xw4b5dnnhkn5zl3h0ymmnnzavcihfqia6l0"))))
(build-system python-build-system)
(arguments
- `(#:python ,python-2
- #:tests? #f ; TODO Launching dbus for the tests
+ `(#:tests? #f ; TODO Launching dbus for the tests
; fails
#:phases
(modify-phases %standard-phases
@@ -1766,11 +1763,11 @@ Python 3.3+.")
(invoke "dbus-run-session" "--" "nosetests" "-v" "tests/"))
#t)))))
(propagated-inputs
- `(("python-pygobject" ,python2-pygobject)
- ("python-pycairo" ,python2-pycairo)
- ("python-pyatspi" ,python2-pyatspi)))
+ `(("python-pygobject" ,python-pygobject)
+ ("python-pycairo" ,python-pycairo)
+ ("python-pyatspi" ,python-pyatspi)))
(native-inputs
- `(("python-nose" ,python2-nose)
+ `(("python-nose" ,python-nose)
("gtk+" ,gtk+)
("xvfb" ,xorg-server)
("dbus" ,dbus)
@@ -1785,6 +1782,9 @@ applications. dogtail scripts are written in Python and executed like any
other Python program.")
(license license:gpl2+)))
+(define-public python2-dogtail
+ (package-with-python2 python-dogtail))
+
(define-public python-empy
(package
(name "python-empy")
--
2.26.0
Christopher Baines wrote 5 years ago
[PATCH v2 5/5] gnu: virt-manager: Work towards enabling some tests.
(address . 40543@debbugs.gnu.org)
20200415174952.9368-5-mail@cbaines.net
* 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(-)

Toggle diff (52 lines)
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)))
(home-page "https://virt-manager.org/")
(synopsis "Manage virtual machines")
(description
--
2.26.0
Christopher Baines wrote 5 years ago
[PATCH v2 1/5] gnu: Add python2-pyatspi.
(address . 40543@debbugs.gnu.org)
20200415174952.9368-1-mail@cbaines.net
This will enable updating python2-dogtail to 0.9.11.

* gnu/packages/gnome.scm (python2-pyatspi): New variable.
---
gnu/packages/gnome.scm | 8 ++++++++
1 file changed, 8 insertions(+)

Toggle diff (21 lines)
diff --git a/gnu/packages/gnome.scm b/gnu/packages/gnome.scm
index 33aae4545e..4710bd1349 100644
--- a/gnu/packages/gnome.scm
+++ b/gnu/packages/gnome.scm
@@ -8774,6 +8774,14 @@ accessibility infrastructure.")
(license license:lgpl2.0)
(properties '((upstream-name . "pyatspi")))))
+(define-public python2-pyatspi
+ (package
+ (inherit python-pyatspi)
+ (name "python2-pyatspi")
+ (inputs
+ `(("python" ,python-2)
+ ("python-pygobject" ,python2-pygobject)))))
+
(define-public orca
(package
(name "orca")
--
2.26.0
Christopher Baines wrote 5 years ago
Re: [bug#40543] [PATCH 4/4] gnu: virt-manager: Work towards enabling some tests.
(name . Marius Bakke)(address . mbakke@fastmail.com)(address . 40543@debbugs.gnu.org)
871roo7htg.fsf@cbaines.net
Marius Bakke <mbakke@fastmail.com> writes:

Toggle quote (27 lines)
> 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.
-----BEGIN PGP SIGNATURE-----

iQKTBAEBCgB9FiEEPonu50WOcg2XVOCyXiijOwuE9XcFAl6XSwtfFIAAAAAALgAo
aXNzdWVyLWZwckBub3RhdGlvbnMub3BlbnBncC5maWZ0aGhvcnNlbWFuLm5ldDNF
ODlFRUU3NDU4RTcyMEQ5NzU0RTBCMjVFMjhBMzNCMEI4NEY1NzcACgkQXiijOwuE
9XdnbBAAqIOjbKfnGZrDKmy9+xsJdaHslMztNJUe4yynCcclCyoRQ/8WgHjATXSz
blgCaOIC0elxS+DwkqufR+OtlklEI9FFpY9EKh7NneSLDz6vz/wDuLDJ2eI/VG/+
LdUE6mUsVrlJZCGWVGwxxdtWdkV9dhzr+ClFufwD3hsotbwRobZHMwYAMHjn1k35
RmdnvdLlOBwPwdpjHv+I4scDUqVHPCA1PKzYs1Pk7n8qBg6nY5IXEthYoayy1zLt
Wen8IUtPEHI+WKldeplTd1o+JABYIeR/Xxc75aRftZBlGVrbqYssiaT+25Z8ZBfp
3/2liwqiaxnTk8IRRetmLKymrFTi0a/x6HtIO53zuE0h0PNhtuuN4aIAsIdmzQFz
USgcNEB8gdaGRnoS3wVOtldxrgZ/cNeJ/ONTso7s7uMzLIrestp4ykwcfA33JtlU
Sufj/YE4oG7swyQmC79V3WeYrGcrK/7IqOvIuUG+wmP0EiIis6V2TfT3bkflk4dv
dZPskYK4Uahb6IrCWnswqD+NpcjdGAnIme1thNiZWU69jD3NwueASluYBw/FiBIt
sZs+Y/Bu8qxpqRi5+4i2phdWT+NVztCiZ8eRm58ZYMBp1q09op+rCTmMZiftXXFW
UDPLnnEK8vqymc50ltR7W8bMksMQNtmXAXEHJiz6FlBeTJ2Sdxs=
=rQQ2
-----END PGP SIGNATURE-----

Christopher Baines wrote 5 years ago
Re: [bug#40543] [PATCH 1/4] gnu: Add python2-pyatspi.
(name . Marius Bakke)(address . mbakke@fastmail.com)(address . 40543@debbugs.gnu.org)
87zhbc637c.fsf@cbaines.net
Marius Bakke <mbakke@fastmail.com> writes:

Toggle quote (27 lines)
> Christopher Baines <mail@cbaines.net> writes:
>
>> This will enable updating python2-dogtail to 0.9.11.
>>
>> * gnu/packages/gnome.scm (python2-pyatspi): New variable.
>> ---
>> gnu/packages/gnome.scm | 8 ++++++++
>> 1 file changed, 8 insertions(+)
>>
>> diff --git a/gnu/packages/gnome.scm b/gnu/packages/gnome.scm
>> index 088de7dd4c..b28fe6594b 100644
>> --- a/gnu/packages/gnome.scm
>> +++ b/gnu/packages/gnome.scm
>> @@ -8773,6 +8773,14 @@ accessibility infrastructure.")
>> (license license:lgpl2.0)
>> (properties '((upstream-name . "pyatspi")))))
>>
>> +(define-public python2-pyatspi
>> + (package
>> + (inherit python-pyatspi)
>> + (name "python2-pyatspi")
>> + (inputs
>> + `(("python" ,python-2)
>> + ("python-pygobject" ,python2-pygobject)))))
>
> Should the latter not be propagated?

Yeah, I've added another commit which makes this propagated.

Toggle quote (3 lines)
> I think the #:python argument of python-build-system will still refer
> to python3 in this case.

It would, however python-pyatspi is using the gnu-build-system. I think
this is why I ended up doing it this way.
-----BEGIN PGP SIGNATURE-----

iQKTBAEBCgB9FiEEPonu50WOcg2XVOCyXiijOwuE9XcFAl6XS0dfFIAAAAAALgAo
aXNzdWVyLWZwckBub3RhdGlvbnMub3BlbnBncC5maWZ0aGhvcnNlbWFuLm5ldDNF
ODlFRUU3NDU4RTcyMEQ5NzU0RTBCMjVFMjhBMzNCMEI4NEY1NzcACgkQXiijOwuE
9XfG6Q//VDCQdfYB2hN5Jj5sFfKMQRbMFNmdsfWBiHnTd4aEIi/ebu7bRpZtPt8q
rAQOqFD8wPbcd1mGzxosUJcfVRBi3WhhRO42QBxRvzUkJY9ae7lVJThxIkq6+gZg
zdRfnQiplC1ZhjXm2AGg4iJVaT1pnN3FEmZtYFoJ04DTmxCq6wIcSfZG1JImV+Zm
me4tnfReQiNy2SQMgOiUNTkFxeIl7Sg66U7Z51nFchm5iDZ0DGsLg1X8qIZ4hoZ2
mx/7R3BJe9RkWlh19EUcofZDidz8/WOPakUEzMgqviYvVwhjeObG8gsm8k11JkdY
jSma24N1YvPAo5Akm+cqFhw1Up3H+gSYz+AHhaJ5MKoDDlHKqVnKzkEwaKCbGp71
Qzd2U5zZJnDpVBdf3BDkvwNeyTI8PaBZU/VRC8hXMIuVCdqn/89bY9sLpAG6d8fS
8+brsXSFKEppYQ9z3pBpnOp4l4GvJlWg7tuIi9igY2r3pfodwv9FRe9rZyGc3CUX
sVFQUg06J8XZT7tdwcuqVYLPi/dk7OXfQeFuuivXvAMaZQy1kIPVqcP0sG4/ZyUP
pOyi64WIu11B2lOIqWyWkmcYI15N3rMbuldFwJKbyqt0GEaSOrJNBsCa+JwCkWK9
5utQ6kWwxyDEVpDZXNx8j86KTHu8PHuGV4A9AriH15DhVvsNxzA=
=C45e
-----END PGP SIGNATURE-----

Marius Bakke wrote 5 years ago
Re: [bug#40543] [PATCH v2 2/5] gnu: python-pyatspi: Propagate python-pygobject.
875ze0ioi1.fsf@devup.no
Christopher Baines <mail@cbaines.net> writes:

Toggle quote (3 lines)
> As python-pygobject is required at runtime.
>
> * gnu/packages/gnome.scm (python-pygobject)[inputs]: Move python-pygobject to…
^^^
Typo: I think this should be 'python-pyatspi'.

Toggle quote (2 lines)
> [propagated-inputs]: …here.
> (python2-pygobject)[inputs]: Move python2-pygobject to…
^^^ likewise
Toggle quote (4 lines)
> [propagated-inputs]: …here.
> ---
> gnu/packages/gnome.scm | 10 ++++++----
> 1 file changed, 6 insertions(+), 4 deletions(-)
-----BEGIN PGP SIGNATURE-----

iQEzBAEBCgAdFiEEu7At3yzq9qgNHeZDoqBt8qM6VPoFAl6XVHcACgkQoqBt8qM6
VPrNFwf/UT6HNoFVsxAcFZ63NbmH7cy1saFsrYX6yn4EXnp16XYkud7x4ZQ9EERr
kyFYgRQKE7Ef1y8439Xz4XI2sK8W/wm6E4Qok/I6tXTM3NmbluRs6ai96a6YA/n/
rTdxvGCgTiteDe9/TZaA1o6Je/2oSh7BfI0tHcrzjQdh2jTFaDRPslfbFdGqarX8
7Z9hOZdLpACZZWknEFyQV0TGPWMA2X5fXFdUbUdmYYZtokToV7xBCS+FpCWBDcsA
MkK+pmCVero9H3U51NJ++DLlYRlRVaYppbiqlIPzDaHbVHrIt2elpSfIJ3ip4LTm
qd+g2RdCjBpql2CRE7DEChlecEypSA==
=tucJ
-----END PGP SIGNATURE-----

Marius Bakke wrote 5 years ago
Re: [bug#40543] [PATCH v2 5/5] gnu: virt-manager: Work towards enabling some tests.
873694io3q.fsf@devup.no
Christopher Baines <mail@cbaines.net> writes:

Toggle quote (55 lines)
> * 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.
-----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-----

Christopher Baines wrote 5 years ago
(name . Marius Bakke)(address . mbakke@fastmail.com)(address . 40543@debbugs.gnu.org)
87sgh36djb.fsf@cbaines.net
Marius Bakke <mbakke@fastmail.com> writes:

Toggle quote (60 lines)
> 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.
>> ---
>> 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?

Sure, I'll comment them out.

Toggle quote (2 lines)
> Also, this should use 'xorg-server-for-tests'.

I did see xorg-server-for-tests, but the comment said "This package is
intended to be used when building GTK". I guess the same reasoning
applies though, and it is used for packages other than GTK.

I'll make these changes and send some updated patches.
-----BEGIN PGP SIGNATURE-----

iQKTBAEBCgB9FiEEPonu50WOcg2XVOCyXiijOwuE9XcFAl6YFvhfFIAAAAAALgAo
aXNzdWVyLWZwckBub3RhdGlvbnMub3BlbnBncC5maWZ0aGhvcnNlbWFuLm5ldDNF
ODlFRUU3NDU4RTcyMEQ5NzU0RTBCMjVFMjhBMzNCMEI4NEY1NzcACgkQXiijOwuE
9Xekiw/9Ev46sjrmZmo3VTjrqYRItONhfeULg5xgLnvzQ8Ud9qEX3JXGGVFxtJ+L
T4RumxIoS7NV3XrpqU2I61MrB8AhEhTjBjynJFqp3nl8WzdQVubn/mRNAWfbM7Q1
c48Yn2ZB+Y0dqkFH/MX8CBUUU352Rrdk7kbOPe1SlD/WnSrQsMG2AQkGkp+L4l7C
2uhQJybIyQrOyNDuiYTwsN2jCzIT7GDj1n9HN4rPcRiv5BgQ4UN6w48hjkt2/WTV
u7u8QdV7VD5Wjs8/Pg8MOynVW6NR14QMmMaTucOON1/0TFUT3kVmJ7wYrZXQrOKm
dfoahWDVpSRMZCq8HO2WZv2UC0VpuE8UEI96AePyXKi5uppa9/3KbESu2vPR7bjT
b2IxYJi87TibIXg8Gjfx5jau7sQPLCwlAMxXg3hG1xY8n3I8MQUgYTbxwcnTD/0b
6I4h4jih3Zqf+OEqYxPLa5O+sH4Rg3q3k+gZOqJbZr0q2DRQfQpSMS+tmBWTii9C
QntTuE3IhYfjBARJVTdamzS4zAoVj4Df6ZXOgbwPIdd3GSQR2pBw2XW+NCCbkjo7
d6QGPHqz4hUydfUoEgaJegGj5o8EwfFQqPWX5gdR6oRfznJvgEB/QH+rdsFppDPT
eVoXxKZ4aJ0fsDaXif/YFXTjHP7WTjb1QC0gUXHjOKmEnIaK9Tk=
=R8vD
-----END PGP SIGNATURE-----

Christopher Baines wrote 5 years ago
Re: [bug#40543] [PATCH v2 2/5] gnu: python-pyatspi: Propagate python-pygobject.
(name . Marius Bakke)(address . mbakke@fastmail.com)(address . 40543@debbugs.gnu.org)
87r1wn6di7.fsf@cbaines.net
Marius Bakke <mbakke@fastmail.com> writes:

Toggle quote (16 lines)
> Christopher Baines <mail@cbaines.net> writes:
>
>> As python-pygobject is required at runtime.
>>
>> * gnu/packages/gnome.scm (python-pygobject)[inputs]: Move python-pygobject to…
> ^^^
> Typo: I think this should be 'python-pyatspi'.
>
>> [propagated-inputs]: …here.
>> (python2-pygobject)[inputs]: Move python2-pygobject to…
> ^^^ likewise
>> [propagated-inputs]: …here.
>> ---
>> gnu/packages/gnome.scm | 10 ++++++----
>> 1 file changed, 6 insertions(+), 4 deletions(-)

Good spot, I've fixed.
-----BEGIN PGP SIGNATURE-----

iQKTBAEBCgB9FiEEPonu50WOcg2XVOCyXiijOwuE9XcFAl6YFyBfFIAAAAAALgAo
aXNzdWVyLWZwckBub3RhdGlvbnMub3BlbnBncC5maWZ0aGhvcnNlbWFuLm5ldDNF
ODlFRUU3NDU4RTcyMEQ5NzU0RTBCMjVFMjhBMzNCMEI4NEY1NzcACgkQXiijOwuE
9XedoxAAqpg/DlcB/V4kBWpSSvyIq53nuq+Q7pzXXAvfuOeM9AGPcujCx90bztMR
a0xw9cPKTzRJOQmxYTaDnA3aRgPwNWUq9mZV1lmiHfMe03a3OaTNqdtkmxg2A2tg
0SfZIKQfJgcDfFXXg5oEmZvuqdGnpEP5ra+4v5wS4Si0fL0DTlk06PDPjY2HBCO0
mLU0mq5yMnsuO8/1xaTjWu4qYnc1i94DWVdvENWilpVvp9rpKEB2XO/NpF6WDsPp
tPs0Um7OWLongJ3a1HC4Vzlre0nGz26urefXKoiymBz/KTU2ARC++qUN1RpyDzRT
HLdAI1PYF455UeGnuRpqagdLQ+cma4xW3j05moSmcckcphHjyN3zv0Yns26eFAdT
7AxX+sLYtGexy6SUqRi4O/BAdpjhMam5FUJASNkZYBSsZ7Qp1KvDXR02+QByP3Gs
qWDIyh4n6aB0f3h0KrI1NKIG922PKMEDHrbabckMJWMh9ZzYMmR34mXPfYUt6igg
RxVZNyTm8PJutOHio8wTGsP6zzKVCCmphEX2UuV2E07XVn7gwwr/3QluXGUWtzzs
xd3ZqGCukUHtMZEEeFOgCd3qV7G6C2vdra6iQQkcDPOEpbWXKplKS06FuT8M9+Hu
bS6ElkuG9PtKejKJWQxzBj9kB28qTgUCPEpY0s480PCuKtTzCoU=
=cIgN
-----END PGP SIGNATURE-----

Christopher Baines wrote 5 years ago
[PATCH v3 1/5] gnu: Add python2-pyatspi.
(address . 40543@debbugs.gnu.org)
20200416082852.4319-1-mail@cbaines.net
This will enable updating python2-dogtail to 0.9.11.

* gnu/packages/gnome.scm (python2-pyatspi): New variable.
---
gnu/packages/gnome.scm | 8 ++++++++
1 file changed, 8 insertions(+)

Toggle diff (21 lines)
diff --git a/gnu/packages/gnome.scm b/gnu/packages/gnome.scm
index 33aae4545e..4710bd1349 100644
--- a/gnu/packages/gnome.scm
+++ b/gnu/packages/gnome.scm
@@ -8774,6 +8774,14 @@ accessibility infrastructure.")
(license license:lgpl2.0)
(properties '((upstream-name . "pyatspi")))))
+(define-public python2-pyatspi
+ (package
+ (inherit python-pyatspi)
+ (name "python2-pyatspi")
+ (inputs
+ `(("python" ,python-2)
+ ("python-pygobject" ,python2-pygobject)))))
+
(define-public orca
(package
(name "orca")
--
2.26.0
Christopher Baines wrote 5 years ago
[PATCH v3 2/5] gnu: python-pyatspi: Propagate python-pygobject.
(address . 40543@debbugs.gnu.org)
20200416082852.4319-2-mail@cbaines.net
As python-pygobject is required at runtime.

* gnu/packages/gnome.scm (python-pyatspi)[inputs]: Move python-pygobject to…
[propagated-inputs]: …here.
(python2-pyatspi)[inputs]: Move python2-pygobject to…
[propagated-inputs]: …here.
---
gnu/packages/gnome.scm | 10 ++++++----
1 file changed, 6 insertions(+), 4 deletions(-)

Toggle diff (30 lines)
diff --git a/gnu/packages/gnome.scm b/gnu/packages/gnome.scm
index 4710bd1349..e7b36fff1d 100644
--- a/gnu/packages/gnome.scm
+++ b/gnu/packages/gnome.scm
@@ -8763,8 +8763,9 @@ from gi.repository import Atspi"))
(native-inputs
`(("pkg-config" ,pkg-config)))
(inputs
- `(("python" ,python)
- ("python-pygobject" ,python-pygobject)))
+ `(("python" ,python)))
+ (propagated-inputs
+ `(("python-pygobject" ,python-pygobject)))
(synopsis "Python client bindings for D-Bus AT-SPI")
(home-page "https://wiki.linuxfoundation.org/accessibility\
/atk/at-spi/at-spi_on_d-bus")
@@ -8779,8 +8780,9 @@ accessibility infrastructure.")
(inherit python-pyatspi)
(name "python2-pyatspi")
(inputs
- `(("python" ,python-2)
- ("python-pygobject" ,python2-pygobject)))))
+ `(("python" ,python-2)))
+ (propagated-inputs
+ `(("python-pygobject" ,python2-pygobject)))))
(define-public orca
(package
--
2.26.0
Christopher Baines wrote 5 years ago
[PATCH v3 3/5] gnu: python2-dogtail: Update to 0.9.11.
(address . 40543@debbugs.gnu.org)
20200416082852.4319-3-mail@cbaines.net
There are newer releases on a gitlab.com repository compared to PyPI. Make an
attempt at getting the tests to work, they don't yet I believe because DBus
isn't working properly. This update is a step towards getting a Python 3
variant of the package, which can be used to test virt-manager.

* gnu/packages/python-xyz.scm (python2-dogtail): Update to 0.9.11.
[source]: Switch from PyPI to gitlab.com, as gitlab.com contains newer
releases.
[arguments]: Replace the check phase, and update comment about disabling the
tests.
[propagated-inputs,native-inputs]: Add relevant packages.
---
gnu/packages/python-xyz.scm | 38 ++++++++++++++++++++++++++++++-------
1 file changed, 31 insertions(+), 7 deletions(-)

Toggle diff (56 lines)
diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm
index 20b8784c05..3dccedd6df 100644
--- a/gnu/packages/python-xyz.scm
+++ b/gnu/packages/python-xyz.scm
@@ -1741,18 +1741,42 @@ Python 3.3+.")
;; spaces in indentation" with Python 3.
(package
(name "python2-dogtail")
- (version "0.9.9")
+ (version "0.9.11")
(source (origin
(method url-fetch)
- (uri (pypi-uri "dogtail" version))
+ (uri
+ (string-append
+ "https://gitlab.com/dogtail/dogtail/-/raw/released/"
+ "dogtail-" version ".tar.gz"))
(sha256
(base32
- "0p5wfssvzr9w0bvhllzbbd8fnp4cca2qxcpcsc33dchrmh5n552x"))))
+ "0sr38z7b2n12bvfd4xw4b5dnnhkn5zl3h0ymmnnzavcihfqia6l0"))))
(build-system python-build-system)
- (arguments `(#:python ,python-2
- #:tests? #f)) ; invalid command "test"
- ;; Currently no offical homepage.
- (home-page "https://pypi.org/project/dogtail/")
+ (arguments
+ `(#:python ,python-2
+ #:tests? #f ; TODO Launching dbus for the tests
+ ; fails
+ #:phases
+ (modify-phases %standard-phases
+ (replace 'check
+ (lambda* (#:key tests? #:allow-other-keys)
+ (when tests?
+ (system "Xvfb :1 &")
+ (setenv "DISPLAY" ":1")
+ (invoke "dbus-run-session" "--" "nosetests" "-v" "tests/"))
+ #t)))))
+ (propagated-inputs
+ `(("python-pygobject" ,python2-pygobject)
+ ("python-pycairo" ,python2-pycairo)
+ ("python-pyatspi" ,python2-pyatspi)))
+ (native-inputs
+ `(("python-nose" ,python2-nose)
+ ("gtk+" ,gtk+)
+ ("xvfb" ,xorg-server)
+ ("dbus" ,dbus)
+ ("gsettings-desktop-schemas" ,gsettings-desktop-schemas)
+ ("gobject-introspection" ,gobject-introspection)))
+ (home-page "https://gitlab.com/dogtail/dogtail/")
(synopsis "GUI test tool and automation framework written in Python")
(description
"Dogtail is a GUI test tool and automation framework written in Python.
--
2.26.0
Christopher Baines wrote 5 years ago
[PATCH v3 5/5] gnu: virt-manager: Work towards enabling some tests.
(address . 40543@debbugs.gnu.org)
20200416082852.4319-5-mail@cbaines.net
* 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(-)

Toggle diff (53 lines)
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
Christopher Baines wrote 5 years ago
[PATCH v3 4/5] gnu: python2-dogtail: Switch to Python 3, and add Python 2 variant.
(address . 40543@debbugs.gnu.org)
20200416082852.4319-4-mail@cbaines.net
* gnu/packages/python-xyz.scm (python2-dogtail): Rename to python-dogtail.
[name]: Change python2-dogtail to python-dogtail.
[arguments]: Remove #:python.
[propagated-inputs,native-inputs]: Switch Python 2 packages to Python 3
variants.
(python2-dogtail): New variable.
---
gnu/packages/python-xyz.scm | 20 ++++++++++----------
1 file changed, 10 insertions(+), 10 deletions(-)

Toggle diff (56 lines)
diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm
index 3dccedd6df..768f030051 100644
--- a/gnu/packages/python-xyz.scm
+++ b/gnu/packages/python-xyz.scm
@@ -1736,11 +1736,9 @@ Python 3.3+.")
(delete-file "test/test_Script.py")
#t))))))))
-(define-public python2-dogtail
- ;; Python 2 only, as it leads to "TabError: inconsistent use of tabs and
- ;; spaces in indentation" with Python 3.
+(define-public python-dogtail
(package
- (name "python2-dogtail")
+ (name "python-dogtail")
(version "0.9.11")
(source (origin
(method url-fetch)
@@ -1753,8 +1751,7 @@ Python 3.3+.")
"0sr38z7b2n12bvfd4xw4b5dnnhkn5zl3h0ymmnnzavcihfqia6l0"))))
(build-system python-build-system)
(arguments
- `(#:python ,python-2
- #:tests? #f ; TODO Launching dbus for the tests
+ `(#:tests? #f ; TODO Launching dbus for the tests
; fails
#:phases
(modify-phases %standard-phases
@@ -1766,11 +1763,11 @@ Python 3.3+.")
(invoke "dbus-run-session" "--" "nosetests" "-v" "tests/"))
#t)))))
(propagated-inputs
- `(("python-pygobject" ,python2-pygobject)
- ("python-pycairo" ,python2-pycairo)
- ("python-pyatspi" ,python2-pyatspi)))
+ `(("python-pygobject" ,python-pygobject)
+ ("python-pycairo" ,python-pycairo)
+ ("python-pyatspi" ,python-pyatspi)))
(native-inputs
- `(("python-nose" ,python2-nose)
+ `(("python-nose" ,python-nose)
("gtk+" ,gtk+)
("xvfb" ,xorg-server)
("dbus" ,dbus)
@@ -1785,6 +1782,9 @@ applications. dogtail scripts are written in Python and executed like any
other Python program.")
(license license:gpl2+)))
+(define-public python2-dogtail
+ (package-with-python2 python-dogtail))
+
(define-public python-empy
(package
(name "python-empy")
--
2.26.0
Christopher Baines wrote 5 years ago
Re: [bug#40543] [PATCH 0/4] Work towards enabling virt-manager tests
(address . 40543-done@debbugs.gnu.org)
87eer7ktrl.fsf@cbaines.net
Christopher Baines <mail@cbaines.net> writes:

Toggle quote (11 lines)
> Christopher Baines (4):
> gnu: Add python2-pyatspi.
> gnu: python2-dogtail: Update to 0.9.11.
> gnu: python2-dogtail: Switch to Python 3, and add Python 2 variant.
> gnu: virt-manager: Work towards enabling some tests.
>
> gnu/packages/gnome.scm | 8 ++++++
> gnu/packages/python-xyz.scm | 46 +++++++++++++++++++++++++--------
> gnu/packages/virtualization.scm | 22 +++++++++++++---
> 3 files changed, 62 insertions(+), 14 deletions(-)

Pushed as 20f524a44b1a9728045be1198ff795697557796c.
-----BEGIN PGP SIGNATURE-----

iQKTBAEBCgB9FiEEPonu50WOcg2XVOCyXiijOwuE9XcFAl7MzU5fFIAAAAAALgAo
aXNzdWVyLWZwckBub3RhdGlvbnMub3BlbnBncC5maWZ0aGhvcnNlbWFuLm5ldDNF
ODlFRUU3NDU4RTcyMEQ5NzU0RTBCMjVFMjhBMzNCMEI4NEY1NzcACgkQXiijOwuE
9XfdRg//VNJkdyFHtZ2Lj5HB4depBTfbI6/JkfTkAWIq2+cWFYxQj2F9Kaz3bXas
TuaU+bgYgSZJGu59Afsb3DTZ3lHLWm+Qq7RNPtUw0kTojbCgEX8HPSpl0Lp9sHoL
A683+PMTj9+t5KPfjh4TPe+Sckk4YlXlJZHI7bOC9vbJLUpntJXM6MjctEB5YYi/
RmgwalW7wDDPQoDo7rPtuFjVPSEuVFq5mFvuaJ6NJKI/c0f+bkH/9dEY2tJ8GtkO
AIhxwOnRnD4epm6zKsBIgknS4/fGoV9ZowEZGcIXurok0wnhF+WEt8j6yFw2jLYb
4hoqGCl0T3IT3u+nRpw0uwpfV3RSh6AzEGvuvYFxRxPGPXlUcv27hmXsbWcB7ey7
W/yh6JNbpk499L8V6LDaoTmOnTzrI1tcIPuAwinslKM4nFnIhMRXthAZ0TZ3g5P2
4DVGnxtVHYWu70ZzcCxdrn+lbDc3uAUpyEYWeeqP1BXKPdAMb1PSQqRpd/BhlfaK
9FZJ+SGw++sz/hZon5aGC9yZLxFwYB8jIlcCT/YT0BpvHrcxDnamb2TnlgxhfV7y
vSdlUE+pILwEPlOJQZNchlFZmoo0fri3pThtHSwLWYpsG1ihliCc+YgkAay/k+oE
+e3IoKFRnobohvvR70UW9I6CHiK8p5ktzGVwrMNQaOQ1J7FNPpQ=
=6gR8
-----END PGP SIGNATURE-----

Closed
?
Your comment

This issue is archived.

To comment on this conversation send an email to 40543@debbugs.gnu.org

To respond to this issue using the mumi CLI, first switch to it
mumi current 40543
Then, you may apply the latest patchset in this issue (with sign off)
mumi am -- -s
Or, compose a reply to this issue
mumi compose
Or, send patches to this issue
mumi send-email *.patch
You may also tag this issue. See list of standard tags. For example, to set the confirmed and easy tags
mumi command -t +confirmed -t +easy
Or, remove the moreinfo tag and set the help tag
mumi command -t -moreinfo -t +help