More testsuite cosmetics

Unify the test naming some more.
This commit is contained in:
Matthias Clasen 2017-10-18 02:50:05 +08:00
parent 3166dc45e8
commit abe7d8a846
8 changed files with 53 additions and 8 deletions

View File

@ -9,7 +9,7 @@ test_nodes = executable('test-css-nodes', 'test-css-nodes.c',
install: get_option('install-tests'),
install_dir: testexecdir,
dependencies: libgtk_dep)
test('test-nodes', test_nodes, suite: 'css', env: test_env)
test('nodes', test_nodes, suite: 'css', env: test_env)
test_data = [
'box.ltr.nodes',

View File

@ -10,7 +10,7 @@ test_parser = executable('test-css-parser', 'test-css-parser.c',
install: get_option('install-tests'),
install_dir: testexecdir,
dependencies: libgtk_dep)
test('css-parser', test_parser, suite: 'css', env: test_env)
test('parser', test_parser, suite: 'css', env: test_env)
test_data = [
'animation-crash-3.12.css',

View File

@ -20,7 +20,7 @@ test_style = executable(
install_dir: testexecdir,
dependencies: libgtk_dep,
)
test('test-style', test_style, suite: 'css', env: test_env)
test('style', test_style, suite: 'css', env: test_env)
test_data = [
'adjacent-states.css',

View File

@ -17,7 +17,7 @@ test_env.set('G_TEST_BUILDDIR', meson.current_build_dir())
foreach t : tests
test_exe = executable(t, '@0@.c'.format(t), dependencies : libgtk_dep)
test('@0@ test'.format(t), test_exe, suite : 'gdk', env : test_env)
test(t, test_exe, suite : 'gdk', env : test_env)
endforeach
# TODO: installed tests + .test files

View File

@ -1,7 +1,48 @@
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')
test_render_nodes = executable(
'test-render-nodes',
['test-render-nodes.c',
'reftest-compare.c'],
dependencies: libgtk_dep,
)
test('test-render-nodes', test_render_nodes, suite: 'gsk')
test('test-render-nodes', test_render_nodes, suite: 'gsk', env: test_env)
test_data = [
'blendmode.node',
'blendmode.png',
'blendmodes.node',
'blendmodes.png',
'cairo.node',
'cairo.png',
'colors.cairo.png',
'colors.node',
'colors.vulkan.png',
'cross-fade.node',
'cross-fade.png',
'cross-fades.node',
'cross-fades.png',
'ducky.png',
'repeat.node',
'repeat.png',
'transform.node',
'transform.png',
]
if get_option('install-tests')
conf = configuration_data()
conf.set('libexecdir', gtk_libexecdir)
configure_file(input: 'test-render-nodes.test.in',
output: 'test-render-nodes.test',
configuration: conf,
install_dir: installed_test_datadir)
install_data(test_data, install_dir: testexecdir)
endif

View File

@ -0,0 +1,4 @@
[Test]
Exec=/bin/sh -c "cd @libexecdir@/installed-tests/gtk-4.0/gsk && @libexecdir@/installed-tests/gtk-4.0/gsk/test-render-nodes --tap"
Type=session
Output=TAP

View File

@ -77,7 +77,7 @@ foreach t : tests
link_args : test_extra_ldflags,
dependencies : libgtk_dep)
test('@0@ test'.format(test_name), test_exe, suite : 'gtk', env : test_env)
test(test_name, test_exe, suite : 'gtk', env : test_env)
endforeach
# FIXME: if objc autotestkeywords_CPPFLAGS += -DHAVE_OBJC=1 -x objective-c++
@ -86,7 +86,7 @@ if add_languages('cpp')
'autotestkeywords.cc',
c_args : test_cargs + ['-Idummy-headers'],
dependencies : libgtk_dep)
test('autotestkeywords test', test_exe, suite : 'gtk', env : test_env)
test('c++ keywords', test_exe, suite : 'gtk', env : test_env)
endif
# FIXME: schemas from gtk+ dir?

View File

@ -9,7 +9,7 @@ if bash.found()
input : 'test-@0@.in'.format(t),
configuration : configuration_data())
test('test-@0@'.format(t), bash,
test(t, bash,
args : 'test-@0@'.format(t),
workdir : meson.current_build_dir(),
env : test_env,