diff mbox series

[bug#41447,3/3] gnu: upower: Enable tests.

Message ID 20200522082243.2160-3-brice@waegenei.re
State Accepted
Headers show
Series upower: Enable tests | expand

Checks

Context Check Description
cbaines/applying patch fail View Laminar job
cbaines/applying patch fail View Laminar job

Commit Message

Brice Waegeneire May 22, 2020, 8:22 a.m. UTC
* gnu/packages/gnome.scm (upower)[arguments]: Enable tests and add
phases 'pre-check'.
[native-inputs]: Add 'python-pygobject', 'python-dbus',
'python-dbusmock' and 'umockdev'.
---
 gnu/packages/gnome.scm | 18 ++++++++++++++----
 1 file changed, 14 insertions(+), 4 deletions(-)
diff mbox series

Patch

diff --git a/gnu/packages/gnome.scm b/gnu/packages/gnome.scm
index 803ac8fe5a..afd40ac725 100644
--- a/gnu/packages/gnome.scm
+++ b/gnu/packages/gnome.scm
@@ -4156,10 +4156,14 @@  faster results and to avoid unnecessary server load.")
                   #t))))
     (build-system glib-or-gtk-build-system)
     (arguments
-     '( ;; The tests want to contact the system bus, which can't be done in the
-       ;; build environment.  The integration test can run, but the last of
-       ;; the up-self-tests doesn't.  Disable tests for now.
-       #:tests? #f
+     '(#:phases
+       (modify-phases %standard-phases
+         (add-before 'check 'pre-check
+           (lambda* (#:key inputs #:allow-other-keys)
+             (let ((umockdev (string-append (assoc-ref inputs "umockdev")
+                                            "/lib")))
+               (setenv "LD_LIBRARY_PATH" umockdev))
+             #t)))
        #:configure-flags (list "--localstatedir=/var"
                                (string-append "--with-udevrulesdir="
                                               (assoc-ref %outputs "out")
@@ -4170,6 +4174,12 @@  faster results and to avoid unnecessary server load.")
        ("intltool" ,intltool)
        ("python" ,python)
 
+       ;; For tests.
+       ("python-dbus" ,python-dbus)
+       ("python-dbusmock" ,python-dbusmock)
+       ("python-pygobject" ,python-pygobject)
+       ("umockdev" ,umockdev)
+
        ;; For man pages.
        ("libxslt" ,libxslt)                       ;for 'xsltproc'
        ("libxml2" ,libxml2)                       ;for 'XML_CATALOG_FILES'