2020-10-01 09:45:57 +00:00
|
|
|
# name, condition when to skip the test and extra dependencies
|
|
|
|
libav_tests = [
|
2020-10-06 09:19:12 +00:00
|
|
|
[ 'elements/avaudenc' ],
|
2020-10-01 09:45:57 +00:00
|
|
|
[ 'elements/avdec_adpcm' ],
|
|
|
|
[ 'elements/avdemux_ape' ],
|
2020-10-06 09:19:12 +00:00
|
|
|
[ 'elements/avvidenc' ],
|
2020-10-01 09:45:57 +00:00
|
|
|
[ 'generic/libavcodec-locking' ],
|
|
|
|
[ 'generic/plugin-test' ]
|
|
|
|
]
|
|
|
|
|
2023-07-12 03:57:22 +00:00
|
|
|
fsmod = import('fs')
|
2020-10-01 09:45:57 +00:00
|
|
|
test_defines = [
|
|
|
|
'-UG_DISABLE_ASSERT',
|
|
|
|
'-UG_DISABLE_CAST_CHECKS',
|
|
|
|
'-DGST_CHECK_TEST_ENVIRONMENT_BEACON="GST_PLUGIN_LOADING_WHITELIST"',
|
2023-07-12 03:57:22 +00:00
|
|
|
'-DGST_TEST_FILES_PATH="' + fsmod.as_posix(meson.current_source_dir()) + '/../files"',
|
2020-10-01 09:45:57 +00:00
|
|
|
'-DGST_USE_UNSTABLE_API',
|
|
|
|
]
|
|
|
|
|
|
|
|
pluginsdirs = []
|
|
|
|
if gst_dep.type_name() == 'pkgconfig'
|
|
|
|
pbase = dependency('gstreamer-plugins-base-' + api_version, required: true)
|
2021-10-17 23:40:14 +00:00
|
|
|
pluginsdirs = [gst_dep.get_variable('pluginsdir'),
|
|
|
|
pbase.get_variable('pluginsdir')]
|
|
|
|
gst_plugin_scanner_dir = gst_dep.get_variable('pluginscannerdir')
|
2020-10-01 09:45:57 +00:00
|
|
|
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: check, also + PTHREAD_CFLAGS
|
|
|
|
test_deps = [gst_dep, gstbase_dep, gstcheck_dep, gstaudio_dep,
|
|
|
|
gstvideo_dep, gstpbutils_dep]
|
|
|
|
|
|
|
|
# FIXME: add valgrind suppression common/gst.supp gst-libav.supp
|
|
|
|
foreach t : libav_tests
|
|
|
|
fname = '@0@.c'.format(t.get(0))
|
|
|
|
test_name = t.get(0).underscorify()
|
|
|
|
extra_sources = t.get(3, [ ])
|
|
|
|
extra_deps = t.get(2, [ ])
|
|
|
|
skip_test = t.get(1, false)
|
|
|
|
if not skip_test
|
|
|
|
env = environment()
|
|
|
|
env.set('GST_PLUGIN_SYSTEM_PATH_1_0', '')
|
|
|
|
env.set('CK_DEFAULT_TIMEOUT', '20')
|
|
|
|
env.set('GST_PLUGIN_LOADING_WHITELIST', 'gstreamer', 'gst-plugins-base',
|
2021-10-18 14:47:00 +00:00
|
|
|
'gst-libav@' + meson.project_build_root())
|
|
|
|
env.set('GST_PLUGIN_PATH_1_0', [meson.global_build_root()] + pluginsdirs)
|
2020-10-01 09:45:57 +00:00
|
|
|
env.set('GSETTINGS_BACKEND', 'memory')
|
|
|
|
|
|
|
|
env.set('GST_REGISTRY', join_paths(meson.current_build_dir(), '@0@.registry'.format(test_name)))
|
|
|
|
env.set('GST_PLUGIN_SCANNER_1_0', gst_plugin_scanner_path)
|
|
|
|
exe = executable(test_name, fname, extra_sources,
|
|
|
|
include_directories : [configinc],
|
|
|
|
c_args : ['-DHAVE_CONFIG_H=1' ] + test_defines,
|
|
|
|
dependencies : [libm] + test_deps + extra_deps,
|
|
|
|
)
|
|
|
|
test(test_name, exe, env: env, timeout: 3 * 60)
|
|
|
|
endif
|
|
|
|
endforeach
|
|
|
|
|