pipewire: update to pw 0.3.40 and wp 0.4.5
[AGL/meta-agl.git] / meta-pipewire / recipes-multimedia / wireplumber / wireplumber / 0002-Revert-tests-add-pipewire-env-variables-when-running.patch
1 From 4ea8ddc256df636208479a5b64bf8bdc6e413aca 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] Revert "tests: add pipewire env variables when running tests,
5  tidy up common_env"
6
7 This reverts commit c24db9f3539f9b7ebe9e74c991cc3037f28ea22c.
8 ---
9  tests/meson.build         | 31 -------------------------------
10  tests/modules/meson.build |  9 ++++++---
11  tests/wp/meson.build      | 10 +++++++---
12  tests/wplua/meson.build   | 15 +++++++++++----
13  4 files changed, 24 insertions(+), 41 deletions(-)
14
15 diff --git a/tests/meson.build b/tests/meson.build
16 index 0e06568..9238d5b 100644
17 --- a/tests/meson.build
18 +++ b/tests/meson.build
19 @@ -28,37 +28,6 @@ if valgrind.found()
20      timeout_multiplier: 2)
21  endif
22  
23 -# The common test environment
24 -common_test_env = environment({
25 -  'HOME': '/invalid',
26 -  'XDG_RUNTIME_DIR': '/invalid',
27 -  'PIPEWIRE_RUNTIME_DIR': '/tmp',
28 -  'XDG_CONFIG_HOME': meson.current_build_dir() / '.config',
29 -  'XDG_STATE_HOME': meson.current_build_dir() / '.local' / 'state',
30 -  'FILE_MONITOR_DIR': meson.current_build_dir() / '.local' / 'file_monitor',
31 -  'WIREPLUMBER_CONFIG_DIR': '/invalid',
32 -  'WIREPLUMBER_DATA_DIR': '/invalid',
33 -  'WIREPLUMBER_MODULE_DIR': meson.current_build_dir() / '..' / 'modules',
34 -  'WIREPLUMBER_DEBUG': '7',
35 -})
36 -
37 -spa_plugindir = spa_dep.get_variable(
38 -  pkgconfig: 'plugindir', internal: 'plugindir', default_value: '')
39 -pipewire_moduledir = pipewire_dep.get_variable(
40 -  pkgconfig: 'moduledir', internal: 'moduledir', default_value: '')
41 -pipewire_confdatadir = pipewire_dep.get_variable(
42 -  pkgconfig: 'confdatadir', internal: 'confdatadir', default_value: '')
43 -
44 -if spa_plugindir != ''
45 -  common_test_env.set('SPA_PLUGIN_DIR', spa_plugindir)
46 -endif
47 -if pipewire_moduledir != ''
48 -  common_test_env.set('PIPEWIRE_MODULE_DIR', pipewire_moduledir)
49 -endif
50 -if pipewire_confdatadir != ''
51 -  common_test_env.set('PIPEWIRE_CONFIG_DIR', pipewire_confdatadir)
52 -endif
53 -
54  subdir('wp')
55  subdir('wplua')
56  subdir('modules')
57 diff --git a/tests/modules/meson.build b/tests/modules/meson.build
58 index ffab80b..2fc46dc 100644
59 --- a/tests/modules/meson.build
60 +++ b/tests/modules/meson.build
61 @@ -1,7 +1,10 @@
62  common_deps = [gobject_dep, gio_dep, wp_dep, pipewire_dep]
63 -common_env = common_test_env
64 -common_env.set('G_TEST_SRCDIR', meson.current_source_dir())
65 -common_env.set('G_TEST_BUILDDIR', meson.current_build_dir())
66 +common_env = environment({
67 +  'G_TEST_SRCDIR': meson.current_source_dir(),
68 +  'G_TEST_BUILDDIR': meson.current_build_dir(),
69 +  'WIREPLUMBER_MODULE_DIR': meson.current_build_dir() / '..' / '..' / 'modules',
70 +  'WIREPLUMBER_DEBUG': '7',
71 +})
72  common_args = [
73    '-DG_LOG_USE_STRUCTURED',
74  ]
75 diff --git a/tests/wp/meson.build b/tests/wp/meson.build
76 index adc9cef..e75640c 100644
77 --- a/tests/wp/meson.build
78 +++ b/tests/wp/meson.build
79 @@ -1,7 +1,11 @@
80  common_deps = [gobject_dep, gio_dep, wp_dep, pipewire_dep]
81 -common_env = common_test_env
82 -common_env.set('G_TEST_SRCDIR', meson.current_source_dir())
83 -common_env.set('G_TEST_BUILDDIR', meson.current_build_dir())
84 +common_env = environment({
85 +  'G_TEST_SRCDIR': meson.current_source_dir(),
86 +  'G_TEST_BUILDDIR': meson.current_build_dir(),
87 +  'XDG_CONFIG_HOME': meson.current_build_dir() / '.config',
88 +  'WIREPLUMBER_MODULE_DIR': meson.current_build_dir() / '..' / '..' / 'modules',
89 +  'WIREPLUMBER_DEBUG': '7',
90 +})
91  common_args = [
92    '-DG_LOG_USE_STRUCTURED',
93  ]
94 diff --git a/tests/wplua/meson.build b/tests/wplua/meson.build
95 index 128cc30..cd45c1c 100644
96 --- a/tests/wplua/meson.build
97 +++ b/tests/wplua/meson.build
98 @@ -1,13 +1,18 @@
99  common_deps = [wplua_dep, pipewire_dep, wp_dep]
100 -common_env = common_test_env
101 -common_env.set('G_TEST_SRCDIR', meson.current_source_dir())
102 -common_env.set('G_TEST_BUILDDIR', meson.current_build_dir())
103 -common_env.set('WIREPLUMBER_DATA_DIR', meson.current_source_dir())
104 +common_env = environment({
105 +  'G_TEST_SRCDIR': meson.current_source_dir(),
106 +  'G_TEST_BUILDDIR': meson.current_build_dir(),
107 +  'WIREPLUMBER_CONFIG_DIR': '/invalid',
108 +  'WIREPLUMBER_DATA_DIR': meson.current_source_dir(),
109 +  'WIREPLUMBER_MODULE_DIR': meson.current_build_dir() / '..' / '..' / 'modules',
110 +  'WIREPLUMBER_DEBUG': '7',
111 +})
112  
113  test(
114    'test-wplua',
115    executable('test-wplua', 'wplua.c', dependencies: common_deps),
116    env: common_env,
117 +  workdir : meson.current_source_dir(),
118  )
119  
120  script_tester = executable('script-tester',
121 @@ -20,10 +25,12 @@ test(
122    script_tester,
123    args: ['pod.lua'],
124    env: common_env,
125 +  workdir : meson.current_source_dir(),
126  )
127  test(
128    'test-lua-monitor-rules',
129    script_tester,
130    args: ['monitor-rules.lua'],
131    env: common_env,
132 +  workdir : meson.current_source_dir(),
133  )
134 -- 
135 2.33.1
136