gnu: gtk+: Enable tests.

* gnu/packages/gtk.scm (gtk+) [arguments]<#:phases>['pre-configure]: Remove phase.
['disable-failing-tests]: New phase.
['pre-check]: New phase.

Signed-off-by: Léo Le Bouter <lle-bout@zaclys.net>
This commit is contained in:
Raghav Gururajan 2021-03-26 10:53:09 -04:00
parent 10b31b5eac
commit 5721c0f03d
No known key found for this signature in database
GPG key ID: 45A8B1E86BCD10A6

View file

@ -923,10 +923,12 @@ (define-public gtk+-2
(home-page "https://www.gtk.org/")))
(define-public gtk+
(package (inherit gtk+-2)
(package
(inherit gtk+-2)
(name "gtk+")
(version "3.24.24")
(source (origin
(source
(origin
(method url-fetch)
(uri (string-append "mirror://gnome/sources/" name "/"
(version-major+minor version) "/"
@ -989,17 +991,35 @@ (define-public gtk+
"--enable-x11-backend"
;; This enables the HTML5 websocket backend.
"--enable-broadway-backend")
#:phases (modify-phases %standard-phases
(add-before 'configure 'pre-configure
#:phases
(modify-phases %standard-phases
(add-after 'unpack 'disable-failing-tests
(lambda _
;; Disable most tests, failing in the chroot with the message:
;; D-Bus library appears to be incorrectly set up; failed to read
;; machine uuid: Failed to open "/etc/machine-id": No such file or
;; directory.
;; See the manual page for dbus-uuidgen to correct this issue.
(substitute* "testsuite/Makefile.in"
(("SUBDIRS = gdk gtk a11y css reftests")
"SUBDIRS = gdk"))
(substitute* "testsuite/gtk/Makefile.in"
(("builderparser cellarea check-icon-names check-cursor-names")
"builderparser cellarea check-cursor-names")
(("notify no-gtk-init object objects-finalize papersize rbtree")
"no-gtk-init papersize rbtree")
(("stylecontext templates textbuffer textiter treemodel treepath")
"stylecontext textbuffer textiter treemodel treepath"))
(substitute* "testsuite/a11y/Makefile.in"
(("accessibility-dump tree-performance text children derive")
"tree-performance text children derive"))
(substitute* "testsuite/reftests/Makefile.in"
(("TEST_PROGS = gtk-reftest")
"TEST_PROGS = "))
#t))
(add-before 'check 'pre-check
(lambda _
;; Tests require a running X server.
(system "Xvfb :1 +extension GLX &")
(setenv "DISPLAY" ":1")
;; Tests write to $HOME.
(setenv "HOME" (getcwd))
;; Tests look for $XDG_RUNTIME_DIR.
(setenv "XDG_RUNTIME_DIR" (getcwd))
;; For missing '/etc/machine-id'.
(setenv "DBUS_FATAL_WARNINGS" "0")
#t))
(add-after 'install 'move-desktop-files
;; Move desktop files into 'bin' to avoid cycle references.