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 <massimiliano.culpo@gmail.com>
This commit is contained in:
Bernhard Kaindl 2021-11-01 17:33:35 +01:00 committed by GitHub
parent 888de27210
commit 8ca411c749
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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)