1From fe830f0f75f3b4b41e3dbef8d4cf6ee4103c9e06 Mon Sep 17 00:00:00 2001
2From: Jose Quaresma <quaresma.jose@gmail.com>
3Date: Sat, 24 Apr 2021 10:34:47 +0100
4Subject: [PATCH 3/4] tests: use a dictionaries for environment
5
6meson environment() can't be passed to configure_file and it is needed for installed_tests,
7use a dictionary as this is simplest solution to install the environment.
8
9Upstream-Status: Submitted [https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/789]
10
11Signed-off-by: Jose Quaresma <quaresma.jose@gmail.com>
12---
13 subprojects/gstreamer/tests/check/meson.build | 21 ++++++++++++-------
14 1 file changed, 13 insertions(+), 8 deletions(-)
15
16diff --git a/subprojects/gstreamer/tests/check/meson.build b/subprojects/gstreamer/tests/check/meson.build
17index 00a138a568..48ec2532f8 100644
18--- a/subprojects/gstreamer/tests/check/meson.build
19+++ b/subprojects/gstreamer/tests/check/meson.build
20@@ -161,14 +161,19 @@ foreach t : core_tests
21       install: installed_tests_enabled,
22     )
23
24-    env = environment()
25-    env.set('GST_PLUGIN_PATH_1_0', meson.project_build_root())
26-    env.set('GST_PLUGIN_SYSTEM_PATH_1_0', '')
27-    env.set('GST_STATE_IGNORE_ELEMENTS', '')
28-    env.set('CK_DEFAULT_TIMEOUT', '20')
29-    env.set('GST_REGISTRY', '@0@/@1@.registry'.format(meson.current_build_dir(), test_name))
30-    env.set('GST_PLUGIN_SCANNER_1_0', gst_scanner_dir + '/gst-plugin-scanner')
31-    env.set('GST_PLUGIN_LOADING_WHITELIST', 'gstreamer')
32+    # meson environment object can't be passed to configure_file and
33+    # installed tests uses configure_file to install the environment.
34+    # use a dictionary as this is the simplest solution
35+    # to install the environment.
36+    env = {
37+      'GST_PLUGIN_PATH_1_0': meson.project_build_root(),
38+      'GST_PLUGIN_SYSTEM_PATH_1_0': '',
39+      'GST_STATE_IGNORE_ELEMENTS': '',
40+      'CK_DEFAULT_TIMEOUT': '20',
41+      'GST_REGISTRY': '@0@/@1@.registry'.format(meson.current_build_dir(), test_name),
42+      'GST_PLUGIN_SCANNER_1_0': gst_scanner_dir + '/gst-plugin-scanner',
43+      'GST_PLUGIN_LOADING_WHITELIST': 'gstreamer',
44+    }
45
46     if installed_tests_enabled
47       test_conf = configuration_data()
48--
492.33.1
50
51