meson: test: Fix environment object usage

This commit is contained in:
Thibault Saunier 2017-03-28 11:15:53 -03:00
parent abfb53c6a7
commit 8fab61bd22

View file

@ -177,18 +177,14 @@ foreach t : good_tests
endif endif
if not skip_test if not skip_test
env = environment() env = environment()
env.set('GST_PLUGIN_PATH_1_0', meson.build_root())
env.set('GST_PLUGIN_SYSTEM_PATH_1_0', '') env.set('GST_PLUGIN_SYSTEM_PATH_1_0', '')
env.set('GST_STATE_IGNORE_ELEMENTS', state_ignore_elements) env.set('GST_STATE_IGNORE_ELEMENTS', state_ignore_elements)
env.set('CK_DEFAULT_TIMEOUT', '20') env.set('CK_DEFAULT_TIMEOUT', '20')
env.set('GST_PLUGIN_LOADING_WHITELIST', 'gstreamer', 'gst-plugins-base', env.set('GST_PLUGIN_LOADING_WHITELIST', 'gstreamer', 'gst-plugins-base',
'gst-plugins-good@' + meson.build_root(), separator: ':') 'gst-plugins-good@' + meson.build_root(), separator: ':')
env.set('GST_PLUGIN_PATH_1_0', meson.build_root()) env.set('GST_PLUGIN_PATH_1_0', [meson.build_root()] + pluginsdirs)
env.set('GSETTINGS_BACKEND', 'memory') env.set('GSETTINGS_BACKEND', 'memory')
foreach plugindir: pluginsdirs
env.append('GST_PLUGIN_PATH_1_0', plugindir)
endforeach
env.set('GST_REGISTRY', '@0@/@1@.registry'.format(meson.current_build_dir(), test_name)) env.set('GST_REGISTRY', '@0@/@1@.registry'.format(meson.current_build_dir(), test_name))
exe = executable(test_name, '@0@.c'.format(test_name), exe = executable(test_name, '@0@.c'.format(test_name),
include_directories : [configinc], include_directories : [configinc],