gtk2/testsuite/css/style/meson.build
Alexander Larsson a3be0ec5f0 Don't use xsettings or xft defaults in testsuite
This adds a GDK_DEBUG=default-settings flag which disables reads
from xsettings and Xft resources, and enables this for the testsuite.

This is one less way to get different testresults depending on the
environment. In particular, it was failing the css tests for me
due to getting the wrong font size because i have a different dpi.
2020-02-03 15:11:35 +01:00

72 lines
1.7 KiB
Meson

testexecdir = join_paths(installed_test_bindir, 'css', 'style')
testdatadir = join_paths(installed_test_datadir, 'css')
cssresources = gnome.compile_resources(
'cssresources',
'test-css-style.gresource.xml',
source_dir: '.',
)
test_style = executable(
'test-css-style',
'test-css-style.c',
cssresources,
dependencies: libgtk_dep,
install: get_option('install-tests'),
install_dir: testexecdir,
)
test('style', test_style,
args: [ '--tap', '-k' ],
env: [ 'GIO_USE_VOLUME_MONITOR=unix',
'GSETTINGS_BACKEND=memory',
'GDK_DEBUG=default-settings',
'GTK_CSD=1',
'G_ENABLE_DIAGNOSTIC=0',
'G_TEST_SRCDIR=@0@'.format(meson.current_source_dir()),
'G_TEST_BUILDDIR=@0@'.format(meson.current_build_dir())
],
suite: 'css')
test_data = [
'adjacent-states.css',
'adjacent-states.nodes',
'adjacent-states.ui',
'bloomfilter-not.css',
'bloomfilter-not.nodes',
'bloomfilter-not.ui',
'colornames.css',
'colornames.nodes',
'colornames.ui',
'currentcolor.css',
'currentcolor.nodes',
'currentcolor.ui',
'font.css',
'font.nodes',
'font.ui',
'gradient.css',
'gradient.nodes',
'gradient.ui',
'gtk.css',
'inherit.css',
'inherit.nodes',
'inherit.ui',
'label.css',
'label.nodes',
'label.ui',
'nth-child.css',
'nth-child.nodes',
'nth-child.ui',
]
if get_option('install-tests')
conf = configuration_data()
conf.set('libexecdir', gtk_libexecdir)
configure_file(input: 'style.test.in',
output: 'style.test',
configuration: conf,
install_dir: testdatadir)
install_data(test_data, install_dir: testexecdir)
endif