summaryrefslogtreecommitdiff
path: root/testsuite
diff options
context:
space:
mode:
authorMatthias Clasen <mclasen@redhat.com>2017-10-18 16:55:02 +0800
committerMatthias Clasen <mclasen@redhat.com>2017-10-18 17:30:20 +0200
commit4a22704d82d5245cec9321b906941282fc714595 (patch)
tree81005273e0f39d19d23e7e0d8a08f0b16d525a43 /testsuite
parentf8f94ab329b1deb8d315cdb8689203c7bb4d1906 (diff)
downloadgtk+-4a22704d82d5245cec9321b906941282fc714595.tar.gz
Fix test environments
Diffstat (limited to 'testsuite')
-rw-r--r--testsuite/a11y/meson.build14
-rw-r--r--testsuite/css/meson.build8
-rw-r--r--testsuite/css/nodes/meson.build9
-rw-r--r--testsuite/css/parser/meson.build8
-rw-r--r--testsuite/css/style/meson.build8
-rw-r--r--testsuite/gdk/meson.build8
-rw-r--r--testsuite/gsk/meson.build30
-rw-r--r--testsuite/gtk/meson.build16
-rw-r--r--testsuite/meson.build9
-rw-r--r--testsuite/tools/meson.build12
10 files changed, 87 insertions, 35 deletions
diff --git a/testsuite/a11y/meson.build b/testsuite/a11y/meson.build
index 8950e6f790..164eda40ab 100644
--- a/testsuite/a11y/meson.build
+++ b/testsuite/a11y/meson.build
@@ -1,3 +1,6 @@
+testexecdir = join_paths(installed_test_bindir, 'a11y')
+testdatadir = join_paths(installed_test_datadir, 'a11y')
+
a11y_tests = [
'accessibility-dump',
'tree-performance',
@@ -10,9 +13,6 @@ a11y_tests = [
'util',
]
-testexecdir = join_paths(installed_test_bindir, 'a11y')
-testdatadir = join_paths(installed_test_datadir, 'a11y')
-
foreach t: a11y_tests
test_prefix = 'a11y'
@@ -22,7 +22,13 @@ foreach t: a11y_tests
install_dir: testexecdir,
dependencies: libgtk_dep),
args: [ '--tap', '-k', ],
- env: installed_test_env,
+ env: [ 'GIO_USE_VOLUME_MONITOR=unix',
+ 'GSETTINGS_BACKEND=memory',
+ 'GTK_CSD=1',
+ 'G_ENABLE_DIAGNOSTIC=0',
+ 'G_TEST_SRCDIR=@0@'.format(meson.current_source_dir()),
+ 'G_TEST_BUILDDIR=@0@'.format(meson.current_build_dir())
+ ],
suite: 'a11y')
endforeach
diff --git a/testsuite/css/meson.build b/testsuite/css/meson.build
index 53297089c8..077cb7d5c3 100644
--- a/testsuite/css/meson.build
+++ b/testsuite/css/meson.build
@@ -11,7 +11,13 @@ test_api = executable('api', 'api.c',
install_dir: testexecdir)
test('api', test_api,
args: ['--tap', '-k' ],
- env: installed_test_env,
+ env: [ 'GIO_USE_VOLUME_MONITOR=unix',
+ 'GSETTINGS_BACKEND=memory',
+ 'GTK_CSD=1',
+ 'G_ENABLE_DIAGNOSTIC=0',
+ 'G_TEST_SRCDIR=@0@'.format(meson.current_source_dir()),
+ 'G_TEST_BUILDDIR=@0@'.format(meson.current_build_dir())
+ ],
suite: 'css')
if get_option('install-tests')
diff --git a/testsuite/css/nodes/meson.build b/testsuite/css/nodes/meson.build
index 0ce567ebac..67abd8667d 100644
--- a/testsuite/css/nodes/meson.build
+++ b/testsuite/css/nodes/meson.build
@@ -1,14 +1,19 @@
testexecdir = join_paths(installed_test_bindir, 'css', 'nodes')
testdatadir = join_paths(installed_test_datadir, 'css')
-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('nodes', test_nodes,
args: [ '--tap', '-k' ],
- env: installed_test_env,
+ env: [ 'GIO_USE_VOLUME_MONITOR=unix',
+ 'GSETTINGS_BACKEND=memory',
+ 'GTK_CSD=1',
+ 'G_ENABLE_DIAGNOSTIC=0',
+ 'G_TEST_SRCDIR=@0@'.format(meson.current_source_dir()),
+ 'G_TEST_BUILDDIR=@0@'.format(meson.current_build_dir())
+ ],
suite: 'css')
test_data = [
diff --git a/testsuite/css/parser/meson.build b/testsuite/css/parser/meson.build
index ac91b6c0c9..9be1fdf8e7 100644
--- a/testsuite/css/parser/meson.build
+++ b/testsuite/css/parser/meson.build
@@ -7,7 +7,13 @@ test_parser = executable('test-css-parser', 'test-css-parser.c',
dependencies: libgtk_dep)
test('parser', test_parser,
args: [ '--tap', '-k' ],
- env: installed_test_env,
+ env: [ 'GIO_USE_VOLUME_MONITOR=unix',
+ 'GSETTINGS_BACKEND=memory',
+ 'GTK_CSD=1',
+ 'G_ENABLE_DIAGNOSTIC=0',
+ 'G_TEST_SRCDIR=@0@'.format(meson.current_source_dir()),
+ 'G_TEST_BUILDDIR=@0@'.format(meson.current_build_dir())
+ ],
suite: 'css')
test_data = [
diff --git a/testsuite/css/style/meson.build b/testsuite/css/style/meson.build
index 5c84c02049..fa2515f313 100644
--- a/testsuite/css/style/meson.build
+++ b/testsuite/css/style/meson.build
@@ -17,7 +17,13 @@ test_style = executable(
)
test('style', test_style,
args: [ '--tap', '-k' ],
- env: installed_test_env,
+ env: [ 'GIO_USE_VOLUME_MONITOR=unix',
+ 'GSETTINGS_BACKEND=memory',
+ 'GTK_CSD=1',
+ 'G_ENABLE_DIAGNOSTIC=0',
+ 'G_TEST_SRCDIR=@0@'.format(meson.current_source_dir()),
+ 'G_TEST_BUILDDIR=@0@'.format(meson.current_build_dir())
+ ],
suite: 'css')
test_data = [
diff --git a/testsuite/gdk/meson.build b/testsuite/gdk/meson.build
index 84b503daa5..df60341f85 100644
--- a/testsuite/gdk/meson.build
+++ b/testsuite/gdk/meson.build
@@ -20,7 +20,13 @@ foreach t : tests
test(t, test_exe,
args: [ '--tap', '-k' ],
- env: installed_test_env,
+ env: [ 'GIO_USE_VOLUME_MONITOR=unix',
+ 'GSETTINGS_BACKEND=memory',
+ 'GTK_CSD=1',
+ 'G_ENABLE_DIAGNOSTIC=0',
+ 'G_TEST_SRCDIR=@0@'.format(meson.current_source_dir()),
+ 'G_TEST_BUILDDIR=@0@'.format(meson.current_build_dir())
+ ],
suite: 'gdk')
if get_option('install-tests')
diff --git a/testsuite/gsk/meson.build b/testsuite/gsk/meson.build
index 7b932d3f7b..8e4e39754c 100644
--- a/testsuite/gsk/meson.build
+++ b/testsuite/gsk/meson.build
@@ -10,28 +10,36 @@ test_render_nodes = executable(
install_dir: testexecdir
)
-cairo_test_env = environment()
-cairo_test_env.set('G_TEST_SRCDIR', meson.current_source_dir())
-cairo_test_env.set('G_TEST_BUILDDIR', meson.current_build_dir())
-cairo_test_env.set('GSETTINGS_BACKEND', 'memory')
-cairo_test_env.set('G_ENABLE_DIAGNOSTIC', '0')
-cairo_test_env.set('GSK_RENDERER', 'cairo')
-
test('nodes (cairo)', test_render_nodes,
- args: [ '--tap', '-k' ],
- env: cairo_test_env,
- suite: 'gsk')
+ args: [ '--tap', '-k' ],
+ env: [ 'GIO_USE_VOLUME_MONITOR=unix',
+ 'GSETTINGS_BACKEND=memory',
+ 'GTK_CSD=1',
+ 'G_ENABLE_DIAGNOSTIC=0',
+ 'G_TEST_SRCDIR=@0@'.format(meson.current_source_dir()),
+ 'G_TEST_BUILDDIR=@0@'.format(meson.current_build_dir()),
+ 'GSK_RENDERER=cairo'
+ ],
+ suite: 'gsk')
vulkan_test_env = environment()
vulkan_test_env.set('G_TEST_SRCDIR', meson.current_source_dir())
vulkan_test_env.set('G_TEST_BUILDDIR', meson.current_build_dir())
vulkan_test_env.set('GSETTINGS_BACKEND', 'memory')
+vulkan_test_env.set('GTK_CSD', '1')
vulkan_test_env.set('G_ENABLE_DIAGNOSTIC', '0')
vulkan_test_env.set('GSK_RENDERER', 'vulkan')
test('nodes (vulkan)', test_render_nodes,
args: [ '--tap', '-k' ],
- env: vulkan_test_env,
+ env: [ 'GIO_USE_VOLUME_MONITOR=unix',
+ 'GSETTINGS_BACKEND=memory',
+ 'GTK_CSD=1',
+ 'G_ENABLE_DIAGNOSTIC=0',
+ 'G_TEST_SRCDIR=@0@'.format(meson.current_source_dir()),
+ 'G_TEST_BUILDDIR=@0@'.format(meson.current_build_dir()),
+ 'GSK_RENDERER=vulkan'
+ ],
suite: 'gsk')
test_data = [
diff --git a/testsuite/gtk/meson.build b/testsuite/gtk/meson.build
index 1c91d192ea..dab8a506e9 100644
--- a/testsuite/gtk/meson.build
+++ b/testsuite/gtk/meson.build
@@ -76,7 +76,13 @@ foreach t : tests
test(test_name, test_exe,
args: [ '--tap', '-k' ],
- env: installed_test_env,
+ env: [ 'GIO_USE_VOLUME_MONITOR=unix',
+ 'GSETTINGS_BACKEND=memory',
+ 'GTK_CSD=1',
+ 'G_ENABLE_DIAGNOSTIC=0',
+ 'G_TEST_SRCDIR=@0@'.format(meson.current_source_dir()),
+ 'G_TEST_BUILDDIR=@0@'.format(meson.current_build_dir())
+ ],
suite: 'gtk')
endforeach
@@ -90,7 +96,13 @@ if add_languages('cpp')
install_dir: testexecdir)
test('c++ keywords', test_exe,
args: [ '--tap', '-k' ],
- env: installed_test_env,
+ env: [ 'GIO_USE_VOLUME_MONITOR=unix',
+ 'GSETTINGS_BACKEND=memory',
+ 'GTK_CSD=1',
+ 'G_ENABLE_DIAGNOSTIC=0',
+ 'G_TEST_SRCDIR=@0@'.format(meson.current_source_dir()),
+ 'G_TEST_BUILDDIR=@0@'.format(meson.current_build_dir())
+ ],
suite: 'gtk')
if get_option('install-tests')
conf = configuration_data()
diff --git a/testsuite/meson.build b/testsuite/meson.build
index fa283dd65c..f966e769da 100644
--- a/testsuite/meson.build
+++ b/testsuite/meson.build
@@ -2,15 +2,6 @@ gtk_libexecdir = join_paths(gtk_prefix, get_option('libexecdir'))
installed_test_bindir = join_paths(gtk_libexecdir, 'installed-tests', 'gtk-4.0')
installed_test_datadir = join_paths(gtk_datadir, 'installed-tests', 'gtk-4.0')
-installed_test_env = [
- 'G_TEST_SRCDIR=@0@'.format(meson.current_source_dir()),
- 'G_TEST_BUILDDIR=@0@'.format(meson.current_build_dir()),
- 'GIO_USE_VOLUME_MONITOR=unix',
- 'GSETTINGS_BACKEND=memory',
- 'GTK_CSD=1',
- 'G_ENABLE_DIAGNOSTIC=0',
-]
-
subdir('gdk')
subdir('gsk')
subdir('gtk')
diff --git a/testsuite/tools/meson.build b/testsuite/tools/meson.build
index 64724d292b..cfce7a3a1c 100644
--- a/testsuite/tools/meson.build
+++ b/testsuite/tools/meson.build
@@ -4,8 +4,6 @@ testdatadir = join_paths(installed_test_datadir, 'tools')
bash = find_program('bash', required : false)
if bash.found()
test_env = environment()
- test_env.set('GTK_BUILDER_TOOL', get_variable('gtk4_builder_tool').full_path())
- test_env.set('GTK_QUERY_SETTINGS', get_variable('gtk4_query_settings').full_path())
foreach t : ['simplify', 'settings']
configure_file(output: t,
@@ -16,7 +14,15 @@ if bash.found()
test(t, bash,
args: 'test-@0@'.format(t),
workdir: meson.current_build_dir(),
- env: test_env,
+ env: [ 'GIO_USE_VOLUME_MONITOR=unix',
+ 'GSETTINGS_BACKEND=memory',
+ 'GTK_CSD=1',
+ 'G_ENABLE_DIAGNOSTIC=0',
+ 'G_TEST_SRCDIR=@0@'.format(meson.current_source_dir()),
+ 'G_TEST_BUILDDIR=@0@'.format(meson.current_build_dir()),
+ 'GTK_BUILDER_TOOL=@0@'.format(get_variable('gtk4_builder_tool').full_path()),
+ 'GTK_QUERY_SETTINGS=@0@'.format(get_variable('gtk4_query_settings').full_path())
+ ],
suite: 'tools')
endforeach
endif