2016-09-24 07:59:55 +00:00
|
|
|
# name, condition when to skip the test and extra dependencies
|
|
|
|
ugly_tests = [
|
|
|
|
[ 'elements/amrnbenc', not amrnb_dep.found() ],
|
2017-05-19 18:05:02 +00:00
|
|
|
[ 'elements/mpeg2dec', not mpeg2_dep.found(), [ gstvideo_dep ] ],
|
2016-09-24 07:59:55 +00:00
|
|
|
[ 'elements/x264enc', not x264_dep.found() ],
|
|
|
|
[ 'elements/xingmux' ],
|
|
|
|
[ 'generic/states' ],
|
|
|
|
]
|
|
|
|
|
|
|
|
test_defines = [
|
|
|
|
'-UG_DISABLE_ASSERT',
|
|
|
|
'-UG_DISABLE_CAST_CHECKS',
|
|
|
|
'-DGST_CHECK_TEST_ENVIRONMENT_BEACON="GST_PLUGIN_LOADING_WHITELIST"',
|
2016-10-04 21:06:09 +00:00
|
|
|
'-DGST_TEST_FILES_PATH="' + meson.current_source_dir() + '/../files"',
|
2016-09-24 07:59:55 +00:00
|
|
|
'-DGST_USE_UNSTABLE_API',
|
|
|
|
]
|
|
|
|
|
2017-03-28 17:18:38 +00:00
|
|
|
pluginsdirs = []
|
|
|
|
if gst_dep.type_name() == 'pkgconfig'
|
|
|
|
pbase = dependency('gstreamer-plugins-base-' + api_version, required : false)
|
|
|
|
pluginsdirs = [gst_dep.get_pkgconfig_variable('pluginsdir'),
|
|
|
|
pbase.get_pkgconfig_variable('pluginsdir')]
|
2016-10-04 21:06:09 +00:00
|
|
|
endif
|
2016-09-24 07:59:55 +00:00
|
|
|
|
|
|
|
test_deps = [gst_dep, gstbase_dep, gstcheck_dep, gstaudio_dep, gstapp_dep, gstfft_dep]
|
|
|
|
|
|
|
|
libm = cc.find_library('m', required : false)
|
|
|
|
|
|
|
|
# FIXME: valgrind_args: add suppressions $(top_srcdir)/common/gst.supp $(srcdir)/gst-plugins-ugly.supp
|
|
|
|
|
2018-03-01 18:07:42 +00:00
|
|
|
no_warn_args = []
|
|
|
|
foreach arg : [
|
|
|
|
'-Wno-missing-prototypes',
|
|
|
|
'-Wno-missing-declarations',
|
|
|
|
'-Wno-old-style-definition']
|
|
|
|
if cc.has_argument(arg)
|
|
|
|
no_warn_args += [arg]
|
|
|
|
endif
|
|
|
|
endforeach
|
|
|
|
|
2016-09-24 07:59:55 +00:00
|
|
|
foreach t : ugly_tests
|
2017-06-07 16:08:43 +00:00
|
|
|
fname = '@0@.c'.format(t.get(0))
|
|
|
|
test_name = t.get(0).underscorify()
|
2016-09-24 07:59:55 +00:00
|
|
|
extra_deps = [ ]
|
|
|
|
if t.length() == 3
|
|
|
|
extra_deps = t.get(2)
|
|
|
|
skip_test = t.get(1)
|
|
|
|
elif t.length() == 2
|
|
|
|
skip_test = t.get(1)
|
|
|
|
else
|
|
|
|
skip_test = false
|
|
|
|
endif
|
|
|
|
if not skip_test
|
2017-06-07 16:08:43 +00:00
|
|
|
exe = executable(test_name, fname,
|
2016-09-24 07:59:55 +00:00
|
|
|
include_directories : [configinc],
|
2018-03-01 18:07:42 +00:00
|
|
|
c_args : ['-DHAVE_CONFIG_H=1' ] + test_defines + no_warn_args,
|
2016-09-24 07:59:55 +00:00
|
|
|
dependencies : [libm] + test_deps + extra_deps,
|
|
|
|
)
|
2016-10-04 21:06:09 +00:00
|
|
|
|
|
|
|
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',
|
2017-01-24 22:24:10 +00:00
|
|
|
'gst-plugins-good', 'gst-plugins-ugly@' + meson.build_root(), separator: ':')
|
2017-03-28 17:18:38 +00:00
|
|
|
env.set('GST_PLUGIN_PATH_1_0', [meson.build_root()] + pluginsdirs)
|
2016-10-04 21:06:09 +00:00
|
|
|
env.set('GST_REGISTRY', '@0@/@1@.registry'.format(meson.current_build_dir(), test_name))
|
|
|
|
test(test_name, exe, env: env, timeout: 3 * 60)
|
2016-09-24 07:59:55 +00:00
|
|
|
endif
|
|
|
|
endforeach
|