[gtk+] Install gdk tests



commit 4c64509b28c6fc3ea35e1ae6e6e845ce7779b510
Author: Matthias Clasen <mclasen redhat com>
Date:   Wed Oct 18 09:19:44 2017 +0800

    Install gdk tests
    
    This was missing so far

 testsuite/gdk/cairo.test.in     |    4 ++++
 testsuite/gdk/cursor.test.in    |    4 ++++
 testsuite/gdk/display.test.in   |    4 ++++
 testsuite/gdk/encoding.test.in  |    4 ++++
 testsuite/gdk/keysyms.test.in   |    4 ++++
 testsuite/gdk/meson.build       |   33 +++++++++++++++++++++++++--------
 testsuite/gdk/rectangle.test.in |    4 ++++
 testsuite/gdk/rgba.test.in      |    4 ++++
 testsuite/gdk/seat.test.in      |    4 ++++
 9 files changed, 57 insertions(+), 8 deletions(-)
---
diff --git a/testsuite/gdk/cairo.test.in b/testsuite/gdk/cairo.test.in
new file mode 100644
index 0000000..26fd33e
--- /dev/null
+++ b/testsuite/gdk/cairo.test.in
@@ -0,0 +1,4 @@
+[Test]
+Exec=@libexecdir@/installed-tests/gtk-4.0/gdk/cairo --tap -k
+Type=session
+Output=TAP
diff --git a/testsuite/gdk/cursor.test.in b/testsuite/gdk/cursor.test.in
new file mode 100644
index 0000000..25e5c8a
--- /dev/null
+++ b/testsuite/gdk/cursor.test.in
@@ -0,0 +1,4 @@
+[Test]
+Exec=@libexecdir@/installed-tests/gtk-4.0/gdk/cursor --tap -k
+Type=session
+Output=TAP
diff --git a/testsuite/gdk/display.test.in b/testsuite/gdk/display.test.in
new file mode 100644
index 0000000..ea2b75b
--- /dev/null
+++ b/testsuite/gdk/display.test.in
@@ -0,0 +1,4 @@
+[Test]
+Exec=@libexecdir@/installed-tests/gtk-4.0/gdk/display --tap -k
+Type=session
+Output=TAP
diff --git a/testsuite/gdk/encoding.test.in b/testsuite/gdk/encoding.test.in
new file mode 100644
index 0000000..07ad561
--- /dev/null
+++ b/testsuite/gdk/encoding.test.in
@@ -0,0 +1,4 @@
+[Test]
+Exec=@libexecdir@/installed-tests/gtk-4.0/gdk/encoding --tap -k
+Type=session
+Output=TAP
diff --git a/testsuite/gdk/keysyms.test.in b/testsuite/gdk/keysyms.test.in
new file mode 100644
index 0000000..4eb2596
--- /dev/null
+++ b/testsuite/gdk/keysyms.test.in
@@ -0,0 +1,4 @@
+[Test]
+Exec=@libexecdir@/installed-tests/gtk-4.0/gdk/keysyms --tap -k
+Type=session
+Output=TAP
diff --git a/testsuite/gdk/meson.build b/testsuite/gdk/meson.build
index b74d654..0694b42 100644
--- a/testsuite/gdk/meson.build
+++ b/testsuite/gdk/meson.build
@@ -1,6 +1,8 @@
+testexecdir = join_paths(installed_test_bindir, 'gdk')
+testdatadir = join_paths(installed_test_datadir, 'gdk')
+
 tests = [
   'cairo',
-  # 'check-gdk-cairo' # disabled in Makefile.am
   'cursor',
   'display',
   'encoding',
@@ -10,14 +12,29 @@ tests = [
   'seat',
 ]
 
-test_env = environment()
-test_env.set('G_TEST_SRCDIR', meson.current_source_dir())
-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_exe = executable(t, '@0@.c'.format(t),
+                        dependencies: libgtk_dep,
+                        install: get_option('install-tests'),
+                        install_dir: testexecdir)
+
+  test(t, test_exe,
+       args: [ '--tap', '-k' ],
+       env: installed_test_env,
+       suite: 'gdk')
 
-  test(t, test_exe, suite : 'gdk', env : test_env)
 endforeach
 
-# TODO: installed tests + .test files
+if get_option('install-tests')
+  test_cdata = configuration_data()
+  test_cdata.set('libexecdir', gtk_libexecdir)
+
+  foreach t : tests
+    configure_file(input: '@0  test in'.format(t),
+                   output: '@0@.test'.format(t),
+                   configuration: test_cdata,
+                   install: true,
+                   install_dir: testdatadir)
+  endforeach
+
+endif
diff --git a/testsuite/gdk/rectangle.test.in b/testsuite/gdk/rectangle.test.in
new file mode 100644
index 0000000..b3b9617
--- /dev/null
+++ b/testsuite/gdk/rectangle.test.in
@@ -0,0 +1,4 @@
+[Test]
+Exec=@libexecdir@/installed-tests/gtk-4.0/gdk/rectangle --tap -k
+Type=session
+Output=TAP
diff --git a/testsuite/gdk/rgba.test.in b/testsuite/gdk/rgba.test.in
new file mode 100644
index 0000000..ae3f7e0
--- /dev/null
+++ b/testsuite/gdk/rgba.test.in
@@ -0,0 +1,4 @@
+[Test]
+Exec=@libexecdir@/installed-tests/gtk-4.0/gdk/rgba --tap -k
+Type=session
+Output=TAP
diff --git a/testsuite/gdk/seat.test.in b/testsuite/gdk/seat.test.in
new file mode 100644
index 0000000..dade2ef
--- /dev/null
+++ b/testsuite/gdk/seat.test.in
@@ -0,0 +1,4 @@
+[Test]
+Exec=@libexecdir@/installed-tests/gtk-4.0/gdk/seat --tap -k
+Type=session
+Output=TAP


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]