mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-18 15:51:11 +00:00
validate:tests: Cleanup the way set environment vars
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-devtools/-/merge_requests/209>
This commit is contained in:
parent
619fd21174
commit
1f8fec66e0
3 changed files with 25 additions and 19 deletions
|
@ -17,15 +17,6 @@ test_defines = [
|
|||
'-DGST_USE_UNSTABLE_API',
|
||||
]
|
||||
|
||||
env = environment()
|
||||
env.set('GST_PLUGIN_SYSTEM_PATH_1_0', '')
|
||||
env.set('GST_STATE_IGNORE_ELEMENTS', '')
|
||||
env.set('CK_DEFAULT_TIMEOUT', '20')
|
||||
env.set('GST_PLUGIN_PATH_1_0', meson.build_root())
|
||||
if gst_dep.type_name() == 'pkgconfig'
|
||||
env.append('GST_PLUGIN_PATH_1_0', gst_dep.get_pkgconfig_variable('pluginsdir'))
|
||||
endif
|
||||
|
||||
foreach t : validate_tests
|
||||
fname = '@0@.c'.format(t.get(0))
|
||||
test_name = t.get(0).underscorify()
|
||||
|
@ -36,6 +27,13 @@ foreach t : validate_tests
|
|||
endif
|
||||
|
||||
if not skip_test
|
||||
env = environment()
|
||||
env.set('GST_STATE_IGNORE_ELEMENTS', '')
|
||||
env.set('GST_PLUGIN_SYSTEM_PATH_1_0', '')
|
||||
env.set('GST_PLUGIN_PATH_1_0', [meson.build_root()] + pluginsdirs)
|
||||
env.set('GST_REGISTRY', '@0@/@1@.registry'.format(meson.current_build_dir(), test_name))
|
||||
env.set('GST_PLUGIN_SCANNER_1_0', gst_plugin_scanner_path)
|
||||
|
||||
exe = executable(test_name, fname,
|
||||
'validate/test-utils.c',
|
||||
c_args : gst_c_args + test_defines,
|
||||
|
|
|
@ -1,16 +1,12 @@
|
|||
env = environment()
|
||||
env.set('GST_PLUGIN_SYSTEM_PATH_1_0', '')
|
||||
env.set('GST_PLUGIN_PATH_1_0', meson.build_root())
|
||||
if not meson.is_subproject()
|
||||
env.append('GST_PLUGIN_PATH_1_0', gst_dep.get_pkgconfig_variable('pluginsdir'))
|
||||
|
||||
gst_plugins_base_dep = dependency('gstreamer-plugins-base-1.0')
|
||||
env.append('GST_PLUGIN_PATH_1_0', gst_plugins_base_dep.get_pkgconfig_variable('pluginsdir'))
|
||||
endif
|
||||
|
||||
if launcher.found()
|
||||
test_name = 'validate/launcher_tests'
|
||||
|
||||
env = environment()
|
||||
env.set('GST_STATE_IGNORE_ELEMENTS', '')
|
||||
env.set('GST_PLUGIN_SYSTEM_PATH_1_0', '')
|
||||
env.set('GST_PLUGIN_PATH_1_0', [meson.build_root()] + pluginsdirs)
|
||||
env.set('GST_REGISTRY', '@0@/@1@.registry'.format(meson.current_build_dir(), test_name))
|
||||
env.set('GST_PLUGIN_SCANNER_1_0', gst_plugin_scanner_path)
|
||||
|
||||
test(test_name, launcher, args: ['-o', meson.build_root() + '/validate-launcher-output/',
|
||||
meson.current_source_dir() + '/test_validate.py', '--validate-tools-path',
|
||||
|
|
|
@ -1,3 +1,15 @@
|
|||
pluginsdirs = [ ]
|
||||
if gst_dep.type_name() == 'pkgconfig'
|
||||
pbase = dependency('gstreamer-plugins-base-' + apiversion)
|
||||
|
||||
pluginsdirs = [gst_dep.get_pkgconfig_variable('pluginsdir'),
|
||||
pbase.get_pkgconfig_variable('pluginsdir')]
|
||||
gst_plugin_scanner_dir = gst_dep.get_pkgconfig_variable('pluginscannerdir')
|
||||
else
|
||||
gst_plugin_scanner_dir = subproject('gstreamer').get_variable('gst_scanner_dir')
|
||||
endif
|
||||
gst_plugin_scanner_path = join_paths(gst_plugin_scanner_dir, 'gst-plugin-scanner')
|
||||
|
||||
# FIXME: make check work on windows
|
||||
if host_machine.system() != 'windows' and gst_check_dep.found()
|
||||
subdir('check')
|
||||
|
|
Loading…
Reference in a new issue