summary refs log tree commit diff
diff options
context:
space:
mode:
authorArun Isaac <arunisaac@systemreboot.net>2020-05-30 02:44:33 +0530
committerArun Isaac <arunisaac@systemreboot.net>2020-06-15 23:38:53 +0530
commitec8e1c91773c756f78034abd94351259632fd1b3 (patch)
tree90d251df6b11d4740a214cfe7139f33b97f75127
parentbd03e99f66be1a038e3a8aeb502f5153fd05cc67 (diff)
downloadguix-ec8e1c91773c756f78034abd94351259632fd1b3.tar.gz
gnu: glade3: Enable tests.
* gnu/packages/gnome.scm (glade3)[arguments]: Enable tests. Add custom
pre-check phase.
[native-inputs]: Add hicolor-icon-theme and xorg-server-for-tests.
-rw-r--r--gnu/packages/gnome.scm16
1 files changed, 12 insertions, 4 deletions
diff --git a/gnu/packages/gnome.scm b/gnu/packages/gnome.scm
index 098abc8f49..a6caabfc46 100644
--- a/gnu/packages/gnome.scm
+++ b/gnu/packages/gnome.scm
@@ -2174,8 +2174,7 @@ API add-ons to make GTK+ widgets OpenGL-capable.")
                 "023gx8rj51njn8fsb6ma5kz1irjpxi4js0n8rwy22inc4ysldd8r"))))
     (build-system glib-or-gtk-build-system)
     (arguments
-     `(#:tests? #f ; needs X, GL, and software rendering
-       #:phases
+     `(#:phases
        (modify-phases %standard-phases
          (add-before 'configure 'fix-docbook
            (lambda* (#:key inputs #:allow-other-keys)
@@ -2185,18 +2184,27 @@ API add-ons to make GTK+ widgets OpenGL-capable.")
                                "/xml/xsl/docbook-xsl-"
                                ,(package-version docbook-xsl)
                                "/manpages/docbook.xsl")))
+             #t))
+         (add-before 'check 'pre-check
+           (lambda _
+             (setenv "HOME" "/tmp")
+             ;; Tests require a running X server.
+             (system "Xvfb :1 &")
+             (setenv "DISPLAY" ":1")
              #t)))))
     (inputs
      `(("gtk+" ,gtk+)
        ("libxml2" ,libxml2)))
     (native-inputs
-     `(("intltool" ,intltool)
+     `(("hicolor-icon-theme" ,hicolor-icon-theme)
+       ("intltool" ,intltool)
        ("itstool" ,itstool)
        ("libxslt" ,libxslt) ;for xsltproc
        ("docbook-xml" ,docbook-xml-4.2)
        ("docbook-xsl" ,docbook-xsl)
        ("python" ,python-2)
-       ("pkg-config" ,pkg-config)))
+       ("pkg-config" ,pkg-config)
+       ("xorg-server" ,xorg-server-for-tests)))
     (home-page "https://glade.gnome.org")
     (synopsis "GTK+ rapid application development tool")
     (description "Glade is a rapid application development (RAD) tool to