meta-core/recipes-graphics/mesa: Backport a fix from 22.2.5
[AGL/meta-agl.git] / meta-pipewire / recipes-multimedia / wireplumber / wireplumber / 0001-Revert-tests-add-pipewire-env-variables-when-running.patch
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"
6
7 This reverts commit c24db9f3539f9b7ebe9e74c991cc3037f28ea22c.
8
9 Upstream-Status: Inappropriate[meson version dependent]
10 ---
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(-)
16
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)
23  endif
24  
25 -# The common test environment
26 -common_test_env = environment({
27 -  'HOME': '/invalid',
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',
37 -})
38 -
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: '')
45 -
46 -if spa_plugindir != ''
47 -  common_test_env.set('SPA_PLUGIN_DIR', spa_plugindir)
48 -endif
49 -if pipewire_moduledir != ''
50 -  common_test_env.set('PIPEWIRE_MODULE_DIR', pipewire_moduledir)
51 -endif
52 -if pipewire_confdatadir != ''
53 -  common_test_env.set('PIPEWIRE_CONFIG_DIR', pipewire_confdatadir)
54 -endif
55 -
56  subdir('wp')
57  subdir('wplua')
58  subdir('modules')
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
63 @@ -1,7 +1,10 @@
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',
73 +})
74  common_args = [
75    '-DG_LOG_USE_STRUCTURED',
76  ]
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
81 @@ -1,7 +1,11 @@
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',
92 +})
93  common_args = [
94    '-DG_LOG_USE_STRUCTURED',
95  ]
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
100 @@ -1,13 +1,18 @@
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',
113 +})
114  
115  test(
116    'test-wplua',
117    executable('test-wplua', 'wplua.c', dependencies: common_deps),
118    env: common_env,
119 +  workdir : meson.current_source_dir(),
120  )
121  
122  script_tester = executable('script-tester',
123 @@ -20,6 +25,7 @@ test(
124    script_tester,
125    args: ['pod.lua'],
126    env: common_env,
127 +  workdir : meson.current_source_dir(),
128  )
129  test(
130    'test-lua-json',
131 @@ -32,4 +38,5 @@ test(
132    script_tester,
133    args: ['monitor-rules.lua'],
134    env: common_env,
135 +  workdir : meson.current_source_dir(),
136  )
137 -- 
138 2.35.1
139