From 8ca411c7490c3252835d557fad412e97c5a4af11 Mon Sep 17 00:00:00 2001 From: Bernhard Kaindl <43588962+bernhardkaindl@users.noreply.github.com> Date: Mon, 1 Nov 2021 17:33:35 +0100 Subject: [PATCH] glib: skip tests which we cannot make pass (#26693) glib has a few tests which have external dependencies or try to access the X server. We cannot run those. Co-authored-by: Massimiliano Culpo --- var/spack/repos/builtin/packages/glib/package.py | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/var/spack/repos/builtin/packages/glib/package.py b/var/spack/repos/builtin/packages/glib/package.py index c7536922e6..5180973e26 100644 --- a/var/spack/repos/builtin/packages/glib/package.py +++ b/var/spack/repos/builtin/packages/glib/package.py @@ -94,6 +94,18 @@ def url_for_version(self, version): url = 'http://ftp.gnome.org/pub/gnome/sources/glib' return url + '/%s/glib-%s.tar.xz' % (version.up_to(2), version) + def patch(self): + """A few glib tests have external dependencies / try to access the X server""" + # Surgically disable tests which we cannot make pass in a spack build + gio_tests = FileFilter('gio/tests/meson.build') + gio_tests.filter('if not glib_have_cocoa', 'if false') + gio_tests.filter("'contenttype' : {},", '') + gio_tests.filter("'file' : {},", '') + gio_tests.filter("'gdbus-peer'", "'file'") + gio_tests.filter("'gdbus-address-get-session' : {},", '') + filter_file("'mkenums.py',*", '', 'gobject/tests/meson.build') + filter_file("'fileutils' : {},", '', 'glib/tests/meson.build') + @property def libs(self): return find_libraries(['libglib*'], root=self.prefix, recursive=True)