gstreamer/validate/tests/launcher_tests/meson.build
Thibault Saunier 9c9fe14293 meson:validate:test: Properly set paths to run launcher based tests
Adding a --validate-tools-path option to the launcher, allowing
to pass it from meson.
2016-09-09 12:24:54 -03:00

26 lines
1 KiB
Meson

launcher = find_program(meson.build_root() + '/validate/tools/gst-validate-launcher',
required : false)
runcmd = run_command(getpluginsdir, 'gstreamer', 'gstreamer-' + apiversion,
'gst-plugins-base', 'gst-plugins-base-' + apiversion)
if runcmd.returncode() == 0
needed_plugins_dirs = runcmd.stdout().strip()
message('Using GStreamer plug-ins in ' + needed_plugins_dirs)
else
error('Could not determine GStreamer plugins directory for unit tests.')
endif
test_env = [
'GST_PLUGIN_SYSTEM_PATH_1_0=',
'GST_PLUGIN_PATH_1_0=' + needed_plugins_dirs,
'GST_PLUGIN_SCANNER_1_0='+ meson.build_root() + '/libs/gst/helpers/gst-plugin-scanner',
]
if launcher.found()
test_name = 'launcher_tests'
test(test_name, launcher, args: ['-o', meson.build_root() + '/validate-launcher-output/',
meson.current_source_dir() + '/test_validate.py', '--validate-tools-path',
meson.build_root() + '/validate/tools/'],
env: ['GST_REGISTRY=@0@/@1@.registry'.format(meson.current_build_dir(), test_name)] +
test_env)
endif