1 From 1197f31d2b681d0cf0ca1309d50c8ab8ea80ac5e Mon Sep 17 00:00:00 2001
2 From: Ashok Sidipotu <ashok.sidipotu@collabora.com>
3 Date: Thu, 2 Dec 2021 16:57:54 +0530
4 Subject: [PATCH 1/2] Revert "tests: add pipewire env variables when running
5 tests, tidy up common_env"
7 This reverts commit c24db9f3539f9b7ebe9e74c991cc3037f28ea22c.
9 Upstream-Status: Inappropriate[meson version dependent]
11 tests/meson.build | 31 -------------------------------
12 tests/modules/meson.build | 9 ++++++---
13 tests/wp/meson.build | 10 +++++++---
14 tests/wplua/meson.build | 15 +++++++++++----
15 4 files changed, 24 insertions(+), 41 deletions(-)
17 diff --git a/tests/meson.build b/tests/meson.build
18 index 0e06568..9238d5b 100644
19 --- a/tests/meson.build
20 +++ b/tests/meson.build
21 @@ -28,37 +28,6 @@ if valgrind.found()
22 timeout_multiplier: 2)
25 -# The common test environment
26 -common_test_env = environment({
28 - 'XDG_RUNTIME_DIR': '/invalid',
29 - 'PIPEWIRE_RUNTIME_DIR': '/tmp',
30 - 'XDG_CONFIG_HOME': meson.current_build_dir() / '.config',
31 - 'XDG_STATE_HOME': meson.current_build_dir() / '.local' / 'state',
32 - 'FILE_MONITOR_DIR': meson.current_build_dir() / '.local' / 'file_monitor',
33 - 'WIREPLUMBER_CONFIG_DIR': '/invalid',
34 - 'WIREPLUMBER_DATA_DIR': '/invalid',
35 - 'WIREPLUMBER_MODULE_DIR': meson.current_build_dir() / '..' / 'modules',
36 - 'WIREPLUMBER_DEBUG': '7',
39 -spa_plugindir = spa_dep.get_variable(
40 - pkgconfig: 'plugindir', internal: 'plugindir', default_value: '')
41 -pipewire_moduledir = pipewire_dep.get_variable(
42 - pkgconfig: 'moduledir', internal: 'moduledir', default_value: '')
43 -pipewire_confdatadir = pipewire_dep.get_variable(
44 - pkgconfig: 'confdatadir', internal: 'confdatadir', default_value: '')
46 -if spa_plugindir != ''
47 - common_test_env.set('SPA_PLUGIN_DIR', spa_plugindir)
49 -if pipewire_moduledir != ''
50 - common_test_env.set('PIPEWIRE_MODULE_DIR', pipewire_moduledir)
52 -if pipewire_confdatadir != ''
53 - common_test_env.set('PIPEWIRE_CONFIG_DIR', pipewire_confdatadir)
59 diff --git a/tests/modules/meson.build b/tests/modules/meson.build
60 index ffab80b..2fc46dc 100644
61 --- a/tests/modules/meson.build
62 +++ b/tests/modules/meson.build
64 common_deps = [gobject_dep, gio_dep, wp_dep, pipewire_dep]
65 -common_env = common_test_env
66 -common_env.set('G_TEST_SRCDIR', meson.current_source_dir())
67 -common_env.set('G_TEST_BUILDDIR', meson.current_build_dir())
68 +common_env = environment({
69 + 'G_TEST_SRCDIR': meson.current_source_dir(),
70 + 'G_TEST_BUILDDIR': meson.current_build_dir(),
71 + 'WIREPLUMBER_MODULE_DIR': meson.current_build_dir() / '..' / '..' / 'modules',
72 + 'WIREPLUMBER_DEBUG': '7',
75 '-DG_LOG_USE_STRUCTURED',
77 diff --git a/tests/wp/meson.build b/tests/wp/meson.build
78 index 178564d..b64ccae 100644
79 --- a/tests/wp/meson.build
80 +++ b/tests/wp/meson.build
82 common_deps = [gobject_dep, gio_dep, wp_dep, pipewire_dep]
83 -common_env = common_test_env
84 -common_env.set('G_TEST_SRCDIR', meson.current_source_dir())
85 -common_env.set('G_TEST_BUILDDIR', meson.current_build_dir())
86 +common_env = environment({
87 + 'G_TEST_SRCDIR': meson.current_source_dir(),
88 + 'G_TEST_BUILDDIR': meson.current_build_dir(),
89 + 'XDG_CONFIG_HOME': meson.current_build_dir() / '.config',
90 + 'WIREPLUMBER_MODULE_DIR': meson.current_build_dir() / '..' / '..' / 'modules',
91 + 'WIREPLUMBER_DEBUG': '7',
94 '-DG_LOG_USE_STRUCTURED',
96 diff --git a/tests/wplua/meson.build b/tests/wplua/meson.build
97 index a7ff033..fcf4b51 100644
98 --- a/tests/wplua/meson.build
99 +++ b/tests/wplua/meson.build
101 common_deps = [wplua_dep, pipewire_dep, wp_dep]
102 -common_env = common_test_env
103 -common_env.set('G_TEST_SRCDIR', meson.current_source_dir())
104 -common_env.set('G_TEST_BUILDDIR', meson.current_build_dir())
105 -common_env.set('WIREPLUMBER_DATA_DIR', meson.current_source_dir())
106 +common_env = environment({
107 + 'G_TEST_SRCDIR': meson.current_source_dir(),
108 + 'G_TEST_BUILDDIR': meson.current_build_dir(),
109 + 'WIREPLUMBER_CONFIG_DIR': '/invalid',
110 + 'WIREPLUMBER_DATA_DIR': meson.current_source_dir(),
111 + 'WIREPLUMBER_MODULE_DIR': meson.current_build_dir() / '..' / '..' / 'modules',
112 + 'WIREPLUMBER_DEBUG': '7',
117 executable('test-wplua', 'wplua.c', dependencies: common_deps),
119 + workdir : meson.current_source_dir(),
122 script_tester = executable('script-tester',
123 @@ -20,6 +25,7 @@ test(
127 + workdir : meson.current_source_dir(),
131 @@ -32,4 +38,5 @@ test(
133 args: ['monitor-rules.lua'],
135 + workdir : meson.current_source_dir(),