[pango/ci-improved: 1/2] tests: Use idiomatic Meson and GTest options



commit 90075eb2d10b65edee549b9e70b99102d1669ea4
Author: Emmanuele Bassi <ebassi gnome org>
Date:   Tue Apr 14 12:19:02 2020 +0100

    tests: Use idiomatic Meson and GTest options
    
     - Switch to an environment() object, to allow for proper escaping
     - Use the TAP protocol with GTest
     - Put all tests under the Pango suite

 tests/meson.build | 16 ++++++++++------
 1 file changed, 10 insertions(+), 6 deletions(-)
---
diff --git a/tests/meson.build b/tests/meson.build
index 4ffffa4c..9b78fbfd 100644
--- a/tests/meson.build
+++ b/tests/meson.build
@@ -10,11 +10,10 @@ if host_system == 'windows'
   test_cflags += '-DHAVE_WIN32'
 endif
 
-test_env = [
-  'srcdir=@0@'.format(meson.current_source_dir()),
-  'G_TEST_SRCDIR=@0@'.format(meson.current_source_dir()),
-  'G_TEST_BUILDDIR=@0@'.format(meson.current_build_dir()),
-]
+test_env = environment()
+test_env.set('srcdir', meson.current_source_dir())
+test_env.set('G_TEST_SRCDIR', meson.current_source_dir())
+test_env.set('G_TEST_BUILDDIR', meson.current_build_dir())
 
 tests = [
   [ 'test-coverage' ],
@@ -177,5 +176,10 @@ foreach t: tests
                    install: get_option('install-tests'),
                    install_dir: installed_test_bindir)
 
-  test(name, bin, env: test_env)
+  test(name, bin,
+    args: ['-k', '--tap'],
+    env: test_env,
+    suite: 'pango',
+    protocol: 'tap',
+  )
 endforeach


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