[gtk/matthiasc/for-master] testsuite: Make all css tests run again



commit 01d52a72925569ac80d441c56f1667e71b5e8f8c
Author: Matthias Clasen <mclasen redhat com>
Date:   Fri Oct 30 20:14:17 2020 -0400

    testsuite: Make all css tests run again
    
    The tests in subdirectories of testsuite/css were
    using an environment defined in the parent directory,
    causing them to not find their test data. Give each
    test directory its own environment.

 testsuite/css/change/meson.build | 11 ++++++++++-
 testsuite/css/nodes/meson.build  | 11 ++++++++++-
 testsuite/css/style/meson.build  | 11 ++++++++++-
 3 files changed, 30 insertions(+), 3 deletions(-)
---
diff --git a/testsuite/css/change/meson.build b/testsuite/css/change/meson.build
index 83e37ae2f6..a52fc5348e 100644
--- a/testsuite/css/change/meson.build
+++ b/testsuite/css/change/meson.build
@@ -1,3 +1,12 @@
+changetest_env = environment()
+changetest_env.set('GTK_TEST_ACCESSIBLE', '1')
+changetest_env.set('GSK_RENDERER', 'cairo')
+changetest_env.set('G_TEST_SRCDIR', meson.current_source_dir())
+changetest_env.set('G_TEST_BUILDDIR', meson.current_build_dir())
+changetest_env.set('GIO_USE_VFS', 'local')
+changetest_env.set('GSETTINGS_BACKEND', 'memory')
+changetest_env.set('G_ENABLE_DIAGNOSTIC', '0')
+
 testexecdir = join_paths(installed_test_bindir, 'css', 'change')
 testdatadir = join_paths(installed_test_datadir, 'css')
 
@@ -13,7 +22,7 @@ test_change = executable(
 test('change', test_change,
   args: [ '--tap', '-k' ],
   protocol: 'tap',
-  env: csstest_env,
+  env: changetest_env,
   suite: 'css',
 )
 
diff --git a/testsuite/css/nodes/meson.build b/testsuite/css/nodes/meson.build
index 11ed48b9e5..313e06a112 100644
--- a/testsuite/css/nodes/meson.build
+++ b/testsuite/css/nodes/meson.build
@@ -1,3 +1,12 @@
+nodetest_env = environment()
+nodetest_env.set('GTK_TEST_ACCESSIBLE', '1')
+nodetest_env.set('GSK_RENDERER', 'cairo')
+nodetest_env.set('G_TEST_SRCDIR', meson.current_source_dir())
+nodetest_env.set('G_TEST_BUILDDIR', meson.current_build_dir())
+nodetest_env.set('GIO_USE_VFS', 'local')
+nodetest_env.set('GSETTINGS_BACKEND', 'memory')
+nodetest_env.set('G_ENABLE_DIAGNOSTIC', '0')
+
 testexecdir = join_paths(installed_test_bindir, 'css', 'nodes')
 testdatadir = join_paths(installed_test_datadir, 'css')
 
@@ -9,7 +18,7 @@ test_nodes = executable('test-css-nodes', 'test-css-nodes.c',
 test('nodes', test_nodes,
   args: [ '--tap', '-k' ],
   protocol: 'tap',
-  env: csstest_env,
+  env: nodetest_env,
   suite: 'css',
 )
 
diff --git a/testsuite/css/style/meson.build b/testsuite/css/style/meson.build
index b54adf7c68..a7af27deb3 100644
--- a/testsuite/css/style/meson.build
+++ b/testsuite/css/style/meson.build
@@ -1,3 +1,12 @@
+styletest_env = environment()
+styletest_env.set('GTK_TEST_ACCESSIBLE', '1')
+styletest_env.set('GSK_RENDERER', 'cairo')
+styletest_env.set('G_TEST_SRCDIR', meson.current_source_dir())
+styletest_env.set('G_TEST_BUILDDIR', meson.current_build_dir())
+styletest_env.set('GIO_USE_VFS', 'local')
+styletest_env.set('GSETTINGS_BACKEND', 'memory')
+styletest_env.set('G_ENABLE_DIAGNOSTIC', '0')
+
 testexecdir = join_paths(installed_test_bindir, 'css', 'style')
 testdatadir = join_paths(installed_test_datadir, 'css')
 
@@ -19,7 +28,7 @@ test_style = executable(
 test('style', test_style,
   args: [ '--tap', '-k' ],
   protocol: 'tap',
-  env: csstest_env,
+  env: styletest_env,
   suite: 'css',
 )
 


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