gtk/testsuite/css/style/meson.build
Matthias Clasen 18519a7ca0 Make css node and style tests run
Just like the previous commit, we need to set G_TEST_SRCDIR.
2017-10-12 16:06:03 +08:00

65 lines
1.5 KiB
Meson

test_env = environment()
test_env.set('G_TEST_SRCDIR', meson.current_source_dir())
test_env.set('G_TEST_BUILDDIR', meson.current_build_dir())
test_env.set('GSETTINGS_BACKEND', 'memory')
test_env.set('G_ENABLE_DIAGNOSTIC', '0')
testexecdir = join_paths(installed_test_bindir, 'css', 'style')
cssresources = gnome.compile_resources(
'cssresources',
'test-css-style.gresource.xml',
source_dir: '.',
)
test_style = executable(
'test-css-style',
'test-css-style.c',
cssresources,
install: get_option('install-tests'),
install_dir: testexecdir,
dependencies: libgtk_dep,
)
test('test-style', test_style, suite: 'css', env: test_env)
test_data = [
'adjacent-states.css',
'adjacent-states.nodes',
'adjacent-states.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: 'test-css-style.test.in',
output: 'test-css-style.test',
configuration: conf,
install_dir: installed_test_datadir)
install_data(test_data, install_dir: testexecdir)
endif