[gtk+] Make css node and style tests run



commit 18519a7ca0e69dea2bdc54833b355f6213ef61d4
Author: Matthias Clasen <mclasen redhat com>
Date:   Thu Oct 12 16:05:32 2017 +0800

    Make css node and style tests run
    
    Just like the previous commit, we need to set G_TEST_SRCDIR.

 testsuite/css/nodes/meson.build |    8 +++++++-
 testsuite/css/style/meson.build |    8 +++++++-
 2 files changed, 14 insertions(+), 2 deletions(-)
---
diff --git a/testsuite/css/nodes/meson.build b/testsuite/css/nodes/meson.build
index 9dbbd48..6c6612e 100644
--- a/testsuite/css/nodes/meson.build
+++ b/testsuite/css/nodes/meson.build
@@ -1,9 +1,15 @@
+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')
+
 testexecdir = join_paths(installed_test_bindir, 'css', 'nodes')
 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')
+test('test-nodes', test_nodes, suite: 'css', env: test_env)
 
 test_data = [
   'box.ltr.nodes',
diff --git a/testsuite/css/style/meson.build b/testsuite/css/style/meson.build
index 248e52a..394bca1 100644
--- a/testsuite/css/style/meson.build
+++ b/testsuite/css/style/meson.build
@@ -1,3 +1,9 @@
+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')
+
 testexecdir = join_paths(installed_test_bindir, 'css', 'style')
 
 cssresources = gnome.compile_resources(
@@ -14,7 +20,7 @@ test_style = executable(
   install_dir: testexecdir,
   dependencies: libgtk_dep,
 )
-test('test-style', test_style, suite: 'css')
+test('test-style', test_style, suite: 'css', env: test_env)
 
 test_data = [
   'adjacent-states.css',


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