From 9a14228eec61f1bbc14b537044d3de4229bcaaa3 Mon Sep 17 00:00:00 2001 From: Raghav Gururajan Date: Fri, 12 Mar 2021 08:24:01 -0500 Subject: [PATCH 50/68] gnu: gtk+: Enable tests. * gnu/packages/gtk.scm (gtk+) [arguments]<#:phases>['pre-configure]: Remove phase. ['disable-failing-tests]: New phase. ['pre-check]: New phase. --- gnu/packages/gtk.scm | 35 ++++++++++++++++++++++++++--------- 1 file changed, 26 insertions(+), 9 deletions(-) diff --git a/gnu/packages/gtk.scm b/gnu/packages/gtk.scm index c288a0f1ce..6ee702de2a 100644 --- a/gnu/packages/gtk.scm +++ b/gnu/packages/gtk.scm @@ -992,16 +992,33 @@ application suites.") "--enable-broadway-backend") #:phases (modify-phases %standard-phases - (add-before 'configure 'pre-configure + (add-after 'unpack 'disable-failing-tests + (lambda _ + (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 _ - ;; 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")) + ;; 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. -- 2.30.1