[gtk+] meson: testsuite: gdk: use array for test definitions
- From: Emmanuele Bassi <ebassi src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+] meson: testsuite: gdk: use array for test definitions
- Date: Wed, 3 May 2017 14:28:15 +0000 (UTC)
commit bffbc6e1b92c5da1732c59c5d600da6bee8690be
Author: Tim-Philipp Müller <tim centricular com>
Date: Wed Mar 22 11:39:27 2017 +0000
meson: testsuite: gdk: use array for test definitions
testsuite/gdk/meson.build | 39 +++++++++++++++++++--------------------
1 files changed, 19 insertions(+), 20 deletions(-)
---
diff --git a/testsuite/gdk/meson.build b/testsuite/gdk/meson.build
index cfe2d07..cc33a7b 100644
--- a/testsuite/gdk/meson.build
+++ b/testsuite/gdk/meson.build
@@ -1,24 +1,23 @@
-# FIXME: use array + foreach
-test_cairo = executable('cairo', 'cairo.c', dependencies: libgtk_dep)
-test('gdk/cairo', test_cairo)
+tests = [
+ 'cairo',
+ # 'check-gdk-cairo' # disabled in Makefile.am
+ 'cursor',
+ 'display',
+ 'encoding',
+ 'keysyms',
+ 'rectangle',
+ 'rgba',
+ 'seat',
+]
-test_cursor = executable('cursor', 'cursor.c', dependencies: libgtk_dep)
-test('gdk/cursor', test_cursor)
+test_env = environment()
+test_env.set('G_TEST_SRCDIR', meson.current_source_dir())
+test_env.set('G_TEST_BUILDDIR', meson.current_build_dir())
-test_display = executable('display', 'display.c', dependencies: libgtk_dep)
-test('gdk/display', test_display)
+foreach t : tests
+ test_exe = executable(t, '@0@.c'.format(t), dependencies : libgtk_dep)
-test_encoding = executable('encoding', 'encoding.c', dependencies: libgtk_dep)
-test('gdk/encoding', test_encoding)
+ test('@0@ test'.format(t), test_exe, suite : 'gdk', env : test_env)
+endforeach
-test_keysyms = executable('keysyms', 'keysyms.c', dependencies: libgtk_dep)
-test('gdk/keysyms', test_keysyms)
-
-test_rectangle = executable('rectangle', 'rectangle.c', dependencies: libgtk_dep)
-test('gdk/rectangle', test_rectangle)
-
-test_rgba = executable('rgba', 'rgba.c', dependencies: libgtk_dep)
-test('gdk/rgba', test_rgba)
-
-test_seat = executable('seat', 'seat.c', dependencies: libgtk_dep)
-test('gdk/seat', test_seat)
+# TODO: installed tests + .test files
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]