blob: 0fd830f15043e3d4f21d46824ff890886adca1bb [file] [log] [blame]
Patrick Williams73bd93f2024-02-20 08:07:48 -06001From 7041bc5adf9501beb1428d8bbae6b351a6bf07f9 Mon Sep 17 00:00:00 2001
Andrew Geissler7e0e3c02022-02-25 20:34:39 +00002From: Jose Quaresma <quaresma.jose@gmail.com>
3Date: Sat, 24 Apr 2021 10:34:47 +0100
Patrick Williams73bd93f2024-02-20 08:07:48 -06004Subject: [PATCH] tests: use a dictionaries for environment
Andrew Geissler7e0e3c02022-02-25 20:34:39 +00005
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>
Patrick Williams73bd93f2024-02-20 08:07:48 -060012
Andrew Geissler7e0e3c02022-02-25 20:34:39 +000013---
Patrick Williams73bd93f2024-02-20 08:07:48 -060014 tests/check/meson.build | 21 +++++++++++++--------
Andrew Geissler7e0e3c02022-02-25 20:34:39 +000015 1 file changed, 13 insertions(+), 8 deletions(-)
16
Patrick Williams73bd93f2024-02-20 08:07:48 -060017diff --git a/tests/check/meson.build b/tests/check/meson.build
18index f2d400f..50dff7f 100644
19--- a/tests/check/meson.build
20+++ b/tests/check/meson.build
21@@ -160,14 +160,19 @@ foreach t : core_tests
Andrew Geissler7e0e3c02022-02-25 20:34:39 +000022 install: installed_tests_enabled,
23 )
24
25- env = environment()
26- env.set('GST_PLUGIN_PATH_1_0', meson.project_build_root())
27- env.set('GST_PLUGIN_SYSTEM_PATH_1_0', '')
28- env.set('GST_STATE_IGNORE_ELEMENTS', '')
29- env.set('CK_DEFAULT_TIMEOUT', '20')
30- env.set('GST_REGISTRY', '@0@/@1@.registry'.format(meson.current_build_dir(), test_name))
31- env.set('GST_PLUGIN_SCANNER_1_0', gst_scanner_dir + '/gst-plugin-scanner')
32- env.set('GST_PLUGIN_LOADING_WHITELIST', 'gstreamer')
33+ # meson environment object can't be passed to configure_file and
34+ # installed tests uses configure_file to install the environment.
35+ # use a dictionary as this is the simplest solution
36+ # to install the environment.
37+ env = {
38+ 'GST_PLUGIN_PATH_1_0': meson.project_build_root(),
39+ 'GST_PLUGIN_SYSTEM_PATH_1_0': '',
40+ 'GST_STATE_IGNORE_ELEMENTS': '',
41+ 'CK_DEFAULT_TIMEOUT': '20',
42+ 'GST_REGISTRY': '@0@/@1@.registry'.format(meson.current_build_dir(), test_name),
43+ 'GST_PLUGIN_SCANNER_1_0': gst_scanner_dir + '/gst-plugin-scanner',
44+ 'GST_PLUGIN_LOADING_WHITELIST': 'gstreamer',
45+ }
46
47 if installed_tests_enabled
48 test_conf = configuration_data()