[gtk+] More testsuite cosmetics
- From: Matthias Clasen <matthiasc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+] More testsuite cosmetics
- Date: Wed, 18 Oct 2017 15:31:48 +0000 (UTC)
commit abe7d8a846d0b83a7534cc12f9fcfebaf8eab017
Author: Matthias Clasen <mclasen redhat com>
Date: Wed Oct 18 02:50:05 2017 +0800
More testsuite cosmetics
Unify the test naming some more.
testsuite/css/nodes/meson.build | 2 +-
testsuite/css/parser/meson.build | 2 +-
testsuite/css/style/meson.build | 2 +-
testsuite/gdk/meson.build | 2 +-
testsuite/gsk/meson.build | 43 ++++++++++++++++++++++++++++++-
testsuite/gsk/test-render-nodes.test.in | 4 +++
testsuite/gtk/meson.build | 4 +-
testsuite/tools/meson.build | 2 +-
8 files changed, 53 insertions(+), 8 deletions(-)
---
diff --git a/testsuite/css/nodes/meson.build b/testsuite/css/nodes/meson.build
index 6c6612e..ae98608 100644
--- a/testsuite/css/nodes/meson.build
+++ b/testsuite/css/nodes/meson.build
@@ -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',
diff --git a/testsuite/css/parser/meson.build b/testsuite/css/parser/meson.build
index 8c5e3d4..2c36e15 100644
--- a/testsuite/css/parser/meson.build
+++ b/testsuite/css/parser/meson.build
@@ -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',
diff --git a/testsuite/css/style/meson.build b/testsuite/css/style/meson.build
index 394bca1..79cd90a 100644
--- a/testsuite/css/style/meson.build
+++ b/testsuite/css/style/meson.build
@@ -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',
diff --git a/testsuite/gdk/meson.build b/testsuite/gdk/meson.build
index cc33a7b..b74d654 100644
--- a/testsuite/gdk/meson.build
+++ b/testsuite/gdk/meson.build
@@ -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
diff --git a/testsuite/gsk/meson.build b/testsuite/gsk/meson.build
index d5ad54d..b16d074 100644
--- a/testsuite/gsk/meson.build
+++ b/testsuite/gsk/meson.build
@@ -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
+
diff --git a/testsuite/gsk/test-render-nodes.test.in b/testsuite/gsk/test-render-nodes.test.in
new file mode 100644
index 0000000..4ea3baa
--- /dev/null
+++ b/testsuite/gsk/test-render-nodes.test.in
@@ -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
diff --git a/testsuite/gtk/meson.build b/testsuite/gtk/meson.build
index 2afb14a..a772a71 100644
--- a/testsuite/gtk/meson.build
+++ b/testsuite/gtk/meson.build
@@ -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?
diff --git a/testsuite/tools/meson.build b/testsuite/tools/meson.build
index 316b0b6..2515aa5 100644
--- a/testsuite/tools/meson.build
+++ b/testsuite/tools/meson.build
@@ -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,
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]