mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-21 15:56:42 +00:00
9845c91a5f
No reason to have one file per type and it makes it more complicated to handle.
30 lines
917 B
Meson
30 lines
917 B
Meson
runtests = find_program('runtests.py')
|
|
|
|
tests = [
|
|
['Test gst', 'test_gst.py'],
|
|
['Test fundamentals', 'test_types.py'],
|
|
]
|
|
|
|
pluginsdirs = []
|
|
if not meson.is_subproject()
|
|
pkgconfig = find_program('pkg-config')
|
|
runcmd = run_command(pkgconfig, '--variable=pluginsdir',
|
|
'gstreamer-' + api_version)
|
|
if runcmd.returncode() == 0
|
|
pluginsdirs = runcmd.stdout().split()
|
|
else
|
|
error('Could not determine GStreamer core plugins directory for unit tests.')
|
|
endif
|
|
endif
|
|
|
|
foreach i: tests
|
|
test_name = i.get(0)
|
|
env = environment()
|
|
env.set('GST_PLUGIN_PATH_1_0', meson.build_root())
|
|
env.set('GST_PLUGIN_SYSTEM_PATH_1_0', '')
|
|
foreach plugindir: pluginsdirs
|
|
env.append('GST_PLUGIN_PATH_1_0', plugindir)
|
|
endforeach
|
|
env.set('GST_REGISTRY', '@0@/@1@.registry'.format(meson.current_build_dir(), i.get(1)))
|
|
test(test_name, runtests, args: [i.get(1)], env: env)
|
|
endforeach
|