2017-05-18 20:02:38 +00:00
|
|
|
have_registry = true # FIXME not get_option('disable_registry')
|
|
|
|
|
2017-08-10 08:07:17 +00:00
|
|
|
libparser = static_library('parser',
|
|
|
|
'elements/parser.c',
|
2017-05-18 20:02:38 +00:00
|
|
|
install : false,
|
|
|
|
dependencies : [gst_dep, gstcheck_dep],
|
|
|
|
)
|
|
|
|
|
|
|
|
libparser_dep = declare_dependency(link_with: libparser,
|
|
|
|
sources: ['elements/parser.h'])
|
|
|
|
|
|
|
|
exif_dep = dependency('libexif', version : '>= 0.6.16', required : false)
|
|
|
|
|
|
|
|
# name, condition when to skip the test and extra dependencies
|
|
|
|
base_tests = [
|
|
|
|
[['elements/aiffparse.c']],
|
|
|
|
[['elements/asfmux.c']],
|
|
|
|
[['elements/assrender.c'], not ass_dep.found(), [ass_dep]],
|
|
|
|
[['elements/audiointerleave.c']],
|
|
|
|
[['elements/audiomixer.c']],
|
|
|
|
[['elements/autoconvert.c']],
|
|
|
|
[['elements/autovideoconvert.c']],
|
|
|
|
[['elements/camerabin.c']],
|
|
|
|
[['elements/compositor.c']],
|
|
|
|
[['elements/curlhttpsink.c'], not curl_dep.found(), [curl_dep]],
|
|
|
|
[['elements/curlfilesink.c'], not curl_dep.found(), [curl_dep]],
|
|
|
|
[['elements/curlftpsink.c'], not curl_dep.found(), [curl_dep]],
|
|
|
|
[['elements/curlsmtpsink.c'], not curl_dep.found(), [curl_dep]],
|
|
|
|
[['elements/dash_mpd.c'], not xml2_dep.found(), [xml2_dep]],
|
|
|
|
[['elements/faac.c'], not faac_dep.found() or not cc.has_header_symbol('faac.h', 'faacEncOpen'), [faac_dep]],
|
|
|
|
[['elements/faad.c'], not faad_dep.found() or not have_faad_2_7, [faad_dep]],
|
|
|
|
[['elements/gdpdepay.c']],
|
|
|
|
[['elements/gdppay.c']],
|
2017-08-10 08:07:17 +00:00
|
|
|
[['elements/h263parse.c'], false, [libparser_dep]],
|
|
|
|
[['elements/h264parse.c'], false, [libparser_dep]],
|
2017-05-18 20:02:38 +00:00
|
|
|
[['elements/id3mux.c']],
|
|
|
|
[['elements/jifmux.c'], not exif_dep.found(), [exif_dep]],
|
|
|
|
[['elements/jpegparse.c']],
|
|
|
|
[['elements/kate.c'], not kate_dep.found(), [kate_dep]],
|
2017-08-10 08:07:17 +00:00
|
|
|
[['elements/mpeg4videoparse.c'], false, [libparser_dep]],
|
2017-05-18 20:02:38 +00:00
|
|
|
[['elements/mpegtsmux.c']],
|
2017-08-10 08:07:17 +00:00
|
|
|
[['elements/mpegvideoparse.c'], false, [libparser_dep]],
|
2017-05-18 20:02:38 +00:00
|
|
|
[['elements/mssdemux.c', 'elements/test_http_src.c', 'elements/adaptive_demux_engine.c', 'elements/adaptive_demux_common.c'], not xml28_dep.found(), [xml28_dep]],
|
|
|
|
[['elements/mxfdemux.c']],
|
|
|
|
[['elements/mxfmux.c']],
|
2017-06-22 20:40:07 +00:00
|
|
|
[['elements/netsim.c']],
|
2017-08-10 08:07:17 +00:00
|
|
|
[['elements/pcapparse.c'], false, [libparser_dep]],
|
2017-05-18 20:02:38 +00:00
|
|
|
[['elements/pnm.c']],
|
|
|
|
[['elements/schroenc.c'], not schro_dep.found(), [schro_dep]],
|
2017-06-21 19:15:37 +00:00
|
|
|
[['elements/shm.c'], not shm_enabled, shm_deps],
|
2017-05-18 20:02:38 +00:00
|
|
|
[['elements/rtponvifparse.c']],
|
|
|
|
[['elements/rtponviftimestamp.c']],
|
|
|
|
[['elements/videoframe-audiolevel.c']],
|
|
|
|
[['elements/viewfinderbin.c']],
|
|
|
|
[['elements/voaacenc.c'], not voaac_dep.found(), [voaac_dep]],
|
|
|
|
[['elements/x265enc.c'], not x265_dep.found(), [x265_dep]],
|
|
|
|
[['elements/zbar.c'], not zbar_dep.found(), [zbar_dep]],
|
2017-08-26 11:03:06 +00:00
|
|
|
[['libs/isoff.c'], not xml2_dep.found(), [gstisoff_dep, xml2_dep]],
|
2017-05-18 20:02:38 +00:00
|
|
|
]
|
|
|
|
|
|
|
|
test_defines = [
|
|
|
|
'-UG_DISABLE_ASSERT',
|
|
|
|
'-UG_DISABLE_CAST_CHECKS',
|
|
|
|
'-DGST_CHECK_TEST_ENVIRONMENT_BEACON="GST_STATE_IGNORE_ELEMENTS"',
|
|
|
|
'-DGST_TEST_FILES_PATH="' + meson.current_source_dir() + '/../files"',
|
|
|
|
'-DDASH_MPD_DATADIR=' + meson.current_source_dir() + '/elements/dash_mpd_data',
|
|
|
|
'-DGST_USE_UNSTABLE_API',
|
|
|
|
]
|
|
|
|
|
2017-06-07 20:58:23 +00:00
|
|
|
test_deps = [gst_dep, gstapp_dep, gstbase_dep,
|
|
|
|
gstbasecamerabin_dep, gstphotography_dep,
|
|
|
|
gstpbutils_dep, gstcontroller_dep, gstaudio_dep,
|
|
|
|
gstvideo_dep, gstrtp_dep, gsturidownloader_dep,
|
2017-08-10 08:07:17 +00:00
|
|
|
gstcheck_dep, gio_dep, glib_dep, gsttag_dep]
|
2017-05-18 20:02:38 +00:00
|
|
|
|
|
|
|
pluginsdirs = [ ]
|
|
|
|
|
|
|
|
if gst_dep.type_name() == 'pkgconfig'
|
2017-06-07 20:58:23 +00:00
|
|
|
pbase = dependency('gstreamer-plugins-base-' + api_version)
|
|
|
|
|
|
|
|
pluginsdirs = [gst_dep.get_pkgconfig_variable('pluginsdir')] + [pbase.get_pkgconfig_variable('pluginsdir')]
|
2017-05-18 20:02:38 +00:00
|
|
|
endif
|
|
|
|
|
|
|
|
foreach t : base_tests
|
|
|
|
fnames = t.get(0)
|
2017-06-20 17:44:47 +00:00
|
|
|
test_name = fnames[0].split('.').get(0).underscorify()
|
2017-05-18 20:02:38 +00:00
|
|
|
skip_test = false
|
|
|
|
extra_deps = [ ]
|
|
|
|
|
|
|
|
if t.length() >= 3
|
|
|
|
extra_deps = t.get(2)
|
|
|
|
endif
|
|
|
|
|
|
|
|
if t.length() >= 2
|
|
|
|
skip_test = t.get(1)
|
|
|
|
endif
|
|
|
|
|
|
|
|
if not skip_test
|
|
|
|
exe = executable(test_name, fnames,
|
|
|
|
include_directories : [configinc],
|
|
|
|
c_args : ['-DHAVE_CONFIG_H=1' ] + test_defines,
|
|
|
|
cpp_args : gst_plugins_bad_args,
|
|
|
|
dependencies : [libm] + test_deps + extra_deps,
|
|
|
|
)
|
|
|
|
|
|
|
|
env = environment()
|
|
|
|
env.set('GST_PLUGIN_PATH_1_0', meson.build_root())
|
|
|
|
env.set('GST_PLUGIN_SYSTEM_PATH_1_0', '')
|
|
|
|
env.set('CK_DEFAULT_TIMEOUT', '20')
|
|
|
|
env.set('GST_STATE_IGNORE_ELEMENTS', '')
|
2017-06-07 20:58:23 +00:00
|
|
|
env.set('GST_PLUGIN_PATH_1_0', [meson.build_root()] + pluginsdirs)
|
2017-05-18 20:02:38 +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)
|
|
|
|
endif
|
|
|
|
endforeach
|