summaryrefslogtreecommitdiffstats
path: root/meta/recipes-multimedia/gstreamer/gstreamer1.0/0003-tests-use-a-dictionaries-for-environment.patch
blob: 0fd830f15043e3d4f21d46824ff890886adca1bb (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
From 7041bc5adf9501beb1428d8bbae6b351a6bf07f9 Mon Sep 17 00:00:00 2001
From: Jose Quaresma <quaresma.jose@gmail.com>
Date: Sat, 24 Apr 2021 10:34:47 +0100
Subject: [PATCH] tests: use a dictionaries for environment

meson environment() can't be passed to configure_file and it is needed for installed_tests,
use a dictionary as this is simplest solution to install the environment.

Upstream-Status: Submitted [https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/789]

Signed-off-by: Jose Quaresma <quaresma.jose@gmail.com>

---
 tests/check/meson.build | 21 +++++++++++++--------
 1 file changed, 13 insertions(+), 8 deletions(-)

diff --git a/tests/check/meson.build b/tests/check/meson.build
index f2d400f..50dff7f 100644
--- a/tests/check/meson.build
+++ b/tests/check/meson.build
@@ -160,14 +160,19 @@ foreach t : core_tests
       install: installed_tests_enabled,
     )
 
-    env = environment()
-    env.set('GST_PLUGIN_PATH_1_0', meson.project_build_root())
-    env.set('GST_PLUGIN_SYSTEM_PATH_1_0', '')
-    env.set('GST_STATE_IGNORE_ELEMENTS', '')
-    env.set('CK_DEFAULT_TIMEOUT', '20')
-    env.set('GST_REGISTRY', '@0@/@1@.registry'.format(meson.current_build_dir(), test_name))
-    env.set('GST_PLUGIN_SCANNER_1_0', gst_scanner_dir + '/gst-plugin-scanner')
-    env.set('GST_PLUGIN_LOADING_WHITELIST', 'gstreamer')
+    # meson environment object can't be passed to configure_file and
+    # installed tests uses configure_file to install the environment.
+    # use a dictionary as this is the simplest solution
+    # to install the environment.
+    env = {
+      'GST_PLUGIN_PATH_1_0': meson.project_build_root(),
+      'GST_PLUGIN_SYSTEM_PATH_1_0': '',
+      'GST_STATE_IGNORE_ELEMENTS': '',
+      'CK_DEFAULT_TIMEOUT': '20',
+      'GST_REGISTRY': '@0@/@1@.registry'.format(meson.current_build_dir(), test_name),
+      'GST_PLUGIN_SCANNER_1_0': gst_scanner_dir + '/gst-plugin-scanner',
+      'GST_PLUGIN_LOADING_WHITELIST': 'gstreamer',
+    }
 
     if installed_tests_enabled
       test_conf = configuration_data()