Patrick Williams | 73bd93f | 2024-02-20 08:07:48 -0600 | [diff] [blame] | 1 | From 7041bc5adf9501beb1428d8bbae6b351a6bf07f9 Mon Sep 17 00:00:00 2001 |
Andrew Geissler | 7e0e3c0 | 2022-02-25 20:34:39 +0000 | [diff] [blame] | 2 | From: Jose Quaresma <quaresma.jose@gmail.com> |
| 3 | Date: Sat, 24 Apr 2021 10:34:47 +0100 |
Patrick Williams | 73bd93f | 2024-02-20 08:07:48 -0600 | [diff] [blame] | 4 | Subject: [PATCH] tests: use a dictionaries for environment |
Andrew Geissler | 7e0e3c0 | 2022-02-25 20:34:39 +0000 | [diff] [blame] | 5 | |
| 6 | meson environment() can't be passed to configure_file and it is needed for installed_tests, |
| 7 | use a dictionary as this is simplest solution to install the environment. |
| 8 | |
| 9 | Upstream-Status: Submitted [https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/789] |
| 10 | |
| 11 | Signed-off-by: Jose Quaresma <quaresma.jose@gmail.com> |
Patrick Williams | 73bd93f | 2024-02-20 08:07:48 -0600 | [diff] [blame] | 12 | |
Andrew Geissler | 7e0e3c0 | 2022-02-25 20:34:39 +0000 | [diff] [blame] | 13 | --- |
Patrick Williams | 73bd93f | 2024-02-20 08:07:48 -0600 | [diff] [blame] | 14 | tests/check/meson.build | 21 +++++++++++++-------- |
Andrew Geissler | 7e0e3c0 | 2022-02-25 20:34:39 +0000 | [diff] [blame] | 15 | 1 file changed, 13 insertions(+), 8 deletions(-) |
| 16 | |
Patrick Williams | 73bd93f | 2024-02-20 08:07:48 -0600 | [diff] [blame] | 17 | diff --git a/tests/check/meson.build b/tests/check/meson.build |
| 18 | index 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 Geissler | 7e0e3c0 | 2022-02-25 20:34:39 +0000 | [diff] [blame] | 22 | 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() |