2018-05-05 13:55:20 +00:00
|
|
|
have_registry = true # FIXME get_option('registry')
|
2016-08-12 15:26:31 +00:00
|
|
|
|
|
|
|
# name, condition when to skip the test and extra dependencies
|
|
|
|
base_tests = [
|
2016-10-04 20:44:51 +00:00
|
|
|
[ 'gst/typefindfunctions.c', not have_registry ],
|
2018-01-16 19:21:53 +00:00
|
|
|
[ 'libs/allocators.c', host_machine.system() != 'linux' ],
|
2016-10-04 20:44:51 +00:00
|
|
|
[ 'libs/audio.c' ],
|
|
|
|
[ 'libs/audiocdsrc.c' ],
|
|
|
|
[ 'libs/audiodecoder.c' ],
|
|
|
|
[ 'libs/audioencoder.c' ],
|
|
|
|
[ 'libs/baseaudiovisualizer.c' ],
|
|
|
|
[ 'libs/discoverer.c' ],
|
|
|
|
[ 'libs/fft.c' ],
|
|
|
|
[ 'libs/libsabi.c' ],
|
|
|
|
[ 'libs/mikey.c' ],
|
|
|
|
[ 'libs/navigation.c' ],
|
|
|
|
[ 'libs/pbutils.c' ],
|
|
|
|
[ 'libs/profile.c' ],
|
|
|
|
[ 'libs/rtpbasedepayload.c' ],
|
|
|
|
[ 'libs/rtpbasepayload.c' ],
|
|
|
|
[ 'libs/rtp.c' ],
|
|
|
|
[ 'libs/rtsp.c' ],
|
|
|
|
[ 'libs/rtspconnection.c' ],
|
|
|
|
[ 'libs/sdp.c' ],
|
|
|
|
[ 'libs/tag.c' ],
|
2018-02-06 21:29:11 +00:00
|
|
|
[ 'libs/video.c' ],
|
2018-11-01 17:19:51 +00:00
|
|
|
[ 'libs/videoanc.c' ],
|
2016-10-04 20:44:51 +00:00
|
|
|
[ 'libs/videoencoder.c' ],
|
2018-04-05 14:41:57 +00:00
|
|
|
[ 'libs/videodecoder.c' ],
|
2016-10-04 20:44:51 +00:00
|
|
|
[ 'libs/videotimecode.c' ],
|
|
|
|
[ 'libs/xmpwriter.c' ],
|
|
|
|
[ 'elements/adder.c' ],
|
|
|
|
[ 'elements/appsink.c' ],
|
|
|
|
[ 'elements/appsrc.c' ],
|
|
|
|
[ 'elements/audioconvert.c' ],
|
2018-02-13 16:38:32 +00:00
|
|
|
[ 'elements/audiointerleave.c' ],
|
|
|
|
[ 'elements/audiomixer.c', false, [ gst_controller_dep ] ],
|
2016-10-04 20:44:51 +00:00
|
|
|
[ 'elements/audiorate.c' ],
|
|
|
|
[ 'elements/audiotestsrc.c' ],
|
|
|
|
[ 'elements/audioresample.c' ],
|
2018-01-16 18:14:59 +00:00
|
|
|
[ 'elements/libvisual.c', not is_variable('libvisual_dep') or not libvisual_dep.found() ],
|
2016-10-04 20:44:51 +00:00
|
|
|
[ 'elements/decodebin.c' ],
|
|
|
|
[ 'elements/encodebin.c', not theoraenc_dep.found() or not vorbisenc_dep.found() ],
|
2018-01-16 18:14:59 +00:00
|
|
|
[ 'elements/multifdsink.c', not core_conf.has('HAVE_SYS_SOCKET_H') or not core_conf.has('HAVE_UNISTD_H') ],
|
|
|
|
# FIXME: multisocketsink test on windows/msvc
|
|
|
|
[ 'elements/multisocketsink.c', not core_conf.has('HAVE_SYS_SOCKET_H') or not core_conf.has('HAVE_UNISTD_H') ],
|
2018-10-01 15:10:34 +00:00
|
|
|
[ 'elements/overlaycomposition.c' ],
|
2016-10-04 20:44:51 +00:00
|
|
|
[ 'elements/playbin.c' ],
|
|
|
|
[ 'elements/playbin-complex.c', not ogg_dep.found() ],
|
|
|
|
[ 'elements/playsink.c' ],
|
|
|
|
[ 'elements/streamsynchronizer.c' ],
|
|
|
|
[ 'elements/subparse.c' ],
|
|
|
|
[ 'elements/textoverlay.c', not pango_dep.found() ],
|
2018-07-30 04:57:23 +00:00
|
|
|
[ 'elements/urisourcebin.c' ],
|
2016-10-04 20:44:51 +00:00
|
|
|
[ 'elements/videoconvert.c' ],
|
|
|
|
[ 'elements/videorate.c' ],
|
|
|
|
[ 'elements/videoscale.c' ],
|
|
|
|
[ 'elements/videotestsrc.c' ],
|
|
|
|
[ 'elements/volume.c', false, [ gst_controller_dep ] ],
|
|
|
|
[ 'elements/vorbisdec.c', not vorbis_dep.found(), [ vorbis_dep, vorbisenc_dep ] ],
|
|
|
|
[ 'elements/vorbistag.c', not vorbisenc_dep.found(), [ vorbis_dep, vorbisenc_dep ] ],
|
|
|
|
[ 'generic/clock-selection.c' ],
|
2017-12-11 11:59:57 +00:00
|
|
|
[ 'generic/states.c', false, [ gmodule_dep ] ],
|
2016-10-04 20:44:51 +00:00
|
|
|
[ 'pipelines/simple-launch-lines.c' ],
|
|
|
|
[ 'pipelines/basetime.c' ],
|
|
|
|
[ 'pipelines/capsfilter-renegotiation.c' ],
|
|
|
|
[ 'pipelines/gio.c' ],
|
|
|
|
[ 'pipelines/oggmux.c', not ogg_dep.found(), [ ogg_dep, ] ],
|
|
|
|
[ 'pipelines/streamsynchronizer.c' ],
|
2018-01-16 18:14:59 +00:00
|
|
|
# FIXME: tcp test on windows/msvc
|
2018-01-16 19:22:16 +00:00
|
|
|
[ 'pipelines/tcp.c', not core_conf.has('HAVE_SYS_SOCKET_H') or not core_conf.has('HAVE_UNISTD_H'), [giounix_dep] ],
|
2016-10-04 20:44:51 +00:00
|
|
|
[ 'pipelines/theoraenc.c', not theoraenc_dep.found(), [ theoraenc_dep ] ],
|
|
|
|
[ 'pipelines/vorbisenc.c', not vorbisenc_dep.found() ],
|
|
|
|
[ 'pipelines/vorbisdec.c', not vorbisenc_dep.found(),],
|
2016-08-12 15:26:31 +00:00
|
|
|
]
|
|
|
|
|
2017-12-21 18:24:20 +00:00
|
|
|
if build_gstgl
|
|
|
|
base_tests += [
|
|
|
|
[ 'libs/gstglcolorconvert.c', not build_gstgl, [gstgl_dep]],
|
|
|
|
[ 'libs/gstglcontext.c', not build_gstgl, [gstgl_dep]],
|
2018-06-15 03:14:12 +00:00
|
|
|
[ 'libs/gstglfeature.c', not build_gstgl, [gstgl_dep]],
|
2018-05-05 11:29:40 +00:00
|
|
|
[ 'libs/gstglformat.c', not build_gstgl, [gstgl_dep]],
|
2017-12-21 18:24:20 +00:00
|
|
|
[ 'libs/gstglheaders.c', not build_gstgl, [gstgl_dep]],
|
|
|
|
[ 'libs/gstglmatrix.c', not build_gstgl, [gstgl_dep]],
|
|
|
|
[ 'libs/gstglmemory.c', not build_gstgl, [gstgl_dep]],
|
|
|
|
[ 'libs/gstglquery.c', not build_gstgl, [gstgl_dep]],
|
|
|
|
[ 'libs/gstglshader.c', not build_gstgl, [gstgl_dep]],
|
|
|
|
[ 'libs/gstglsl.c', not build_gstgl, [gstgl_dep]],
|
|
|
|
[ 'libs/gstglslstage.c', not build_gstgl, [gstgl_dep]],
|
2017-12-21 18:32:03 +00:00
|
|
|
[ 'libs/gstglupload.c', not build_gstgl, [gstgl_dep]],
|
2017-12-21 18:28:00 +00:00
|
|
|
[ 'elements/glimagesink.c', not build_gstgl, [gstgl_dep]],
|
2018-02-09 06:15:30 +00:00
|
|
|
[ 'elements/glbin.c', not build_gstgl ],
|
2017-12-22 21:28:20 +00:00
|
|
|
[ 'pipelines/gl-launch-lines.c', not build_gstgl ],
|
2017-12-21 18:24:20 +00:00
|
|
|
]
|
|
|
|
endif
|
|
|
|
|
2017-05-21 08:37:14 +00:00
|
|
|
# Make sure our headers are C++ clean
|
2017-05-21 09:49:20 +00:00
|
|
|
if have_cxx
|
2017-05-21 08:37:14 +00:00
|
|
|
base_tests += [
|
|
|
|
[ 'libs/gstlibscpp.cc', false, [ ] ],
|
|
|
|
]
|
|
|
|
endif
|
|
|
|
|
2016-08-12 15:26:31 +00:00
|
|
|
# FIXME: enable orc testing
|
|
|
|
#orc_tests = [
|
|
|
|
# 'orc/video',
|
|
|
|
# 'orc/audio',
|
|
|
|
# 'orc/adder',
|
|
|
|
# 'orc/volume',
|
|
|
|
# 'orc/videotestsrc'
|
|
|
|
#]
|
|
|
|
|
|
|
|
test_defines = [
|
|
|
|
'-UG_DISABLE_ASSERT',
|
|
|
|
'-UG_DISABLE_CAST_CHECKS',
|
|
|
|
'-DGST_CHECK_TEST_ENVIRONMENT_BEACON="GST_PLUGIN_LOADING_WHITELIST"',
|
2016-10-04 20:44:51 +00:00
|
|
|
'-DGST_TEST_FILES_PATH="' + meson.current_source_dir() + '/../files"',
|
|
|
|
'-DGST_TEST_FILE="' + meson.current_source_dir() + '/../files/partialframe.mjpeg"', # for libs/discoverer
|
2016-08-12 15:26:31 +00:00
|
|
|
'-DGST_USE_UNSTABLE_API',
|
|
|
|
]
|
|
|
|
|
|
|
|
test_deps = [gst_dep, gst_base_dep, gst_net_dep, gst_check_dep, audio_dep,
|
|
|
|
video_dep, pbutils_dep, rtp_dep, rtsp_dep, tag_dep, allocators_dep, app_dep,
|
|
|
|
fft_dep, riff_dep, sdp_dep, gio_dep] + glib_deps
|
|
|
|
|
2016-10-04 20:44:51 +00:00
|
|
|
pluginsdirs = [ ]
|
2017-03-28 17:31:34 +00:00
|
|
|
if gst_dep.type_name() == 'pkgconfig'
|
|
|
|
pluginsdirs = [gst_dep.get_pkgconfig_variable('pluginsdir')]
|
2016-10-04 20:44:51 +00:00
|
|
|
endif
|
|
|
|
|
2016-08-12 15:26:31 +00:00
|
|
|
foreach t : base_tests
|
2016-10-04 20:44:51 +00:00
|
|
|
fname = t.get(0)
|
2017-06-07 15:41:05 +00:00
|
|
|
test_name = fname.split('.').get(0).underscorify()
|
2016-10-04 20:44:51 +00:00
|
|
|
skip_test = false
|
2016-08-12 15:26:31 +00:00
|
|
|
extra_deps = [ ]
|
2016-10-04 20:44:51 +00:00
|
|
|
|
|
|
|
if t.length() >= 3
|
2016-08-12 15:26:31 +00:00
|
|
|
extra_deps = t.get(2)
|
2016-10-04 20:44:51 +00:00
|
|
|
endif
|
|
|
|
|
|
|
|
if t.length() >= 2
|
2016-08-12 15:26:31 +00:00
|
|
|
skip_test = t.get(1)
|
|
|
|
endif
|
2016-10-04 20:44:51 +00:00
|
|
|
|
2016-08-12 15:26:31 +00:00
|
|
|
if not skip_test
|
2016-10-04 20:44:51 +00:00
|
|
|
exe = executable(test_name, fname,
|
2016-08-12 15:26:31 +00:00
|
|
|
include_directories : [configinc],
|
|
|
|
c_args : ['-DHAVE_CONFIG_H=1' ] + test_defines,
|
2016-10-04 20:44:51 +00:00
|
|
|
cpp_args : gst_plugins_base_args,
|
2016-08-12 15:26:31 +00:00
|
|
|
dependencies : [libm] + test_deps + extra_deps,
|
|
|
|
)
|
2016-10-04 20:44:51 +00:00
|
|
|
|
|
|
|
env = environment()
|
2017-03-24 20:16:26 +00:00
|
|
|
env.set('GST_PLUGIN_PATH_1_0',
|
2017-03-24 21:00:23 +00:00
|
|
|
meson.build_root(), '@0@/@1@'.format(get_option('prefix'), plugins_install_dir),
|
2017-03-24 21:46:34 +00:00
|
|
|
pluginsdirs)
|
2016-10-04 20:44:51 +00:00
|
|
|
env.set('GST_PLUGIN_SYSTEM_PATH_1_0', '')
|
|
|
|
env.set('GST_STATE_IGNORE_ELEMENTS', 'cdio cdparanoiasrc libvisual_ alsasrc alsasink')
|
|
|
|
env.set('CK_DEFAULT_TIMEOUT', '20')
|
|
|
|
env.set('GST_TAG_LICENSE_TRANSLATIONS_DICT', gst_tag_dir + '/license-translations.dict')
|
|
|
|
env.set('GST_PLUGIN_LOADING_WHITELIST', 'gstreamer',
|
2017-01-24 22:20:53 +00:00
|
|
|
'gst-plugins-base@' + meson.build_root(), separator: ':')
|
2016-10-04 20:44:51 +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-08-12 15:26:31 +00:00
|
|
|
endif
|
|
|
|
endforeach
|
|
|
|
|
2016-09-10 09:05:28 +00:00
|
|
|
# videoscale tests (split in groups)
|
|
|
|
foreach group : [1, 2, 3, 4, 5, 6]
|
2017-06-07 15:41:05 +00:00
|
|
|
vscale_test_name = 'elements-videoscale-@0@'.format(group)
|
2016-09-10 09:05:28 +00:00
|
|
|
exe = executable(vscale_test_name, 'elements/videoscale.c',
|
|
|
|
include_directories : [configinc],
|
|
|
|
c_args : ['-DHAVE_CONFIG_H=1', '-DVSCALE_TEST_GROUP=@0@'.format(group) ] + test_defines,
|
|
|
|
dependencies : [libm] + test_deps + extra_deps)
|
|
|
|
|
2016-10-04 20:44:51 +00:00
|
|
|
# TODO Use env.copy when it is in meson
|
|
|
|
env = environment()
|
2017-03-24 20:16:26 +00:00
|
|
|
env.set('GST_PLUGIN_PATH_1_0',
|
2017-03-24 21:00:23 +00:00
|
|
|
meson.build_root(), '@0@/@1@'.format(get_option('prefix'), plugins_install_dir),
|
2017-03-24 21:51:12 +00:00
|
|
|
pluginsdirs)
|
2016-10-04 20:44:51 +00:00
|
|
|
env.set('GST_PLUGIN_SYSTEM_PATH_1_0', '')
|
|
|
|
env.set('GST_STATE_IGNORE_ELEMENTS', 'cdio cdparanoiasrc libvisual_ alsasrc alsasink')
|
|
|
|
env.set('CK_DEFAULT_TIMEOUT', '20')
|
|
|
|
env.set('GST_TAG_LICENSE_TRANSLATIONS_DICT', gst_tag_dir + '/license-translations.dict')
|
|
|
|
env.set('GST_PLUGIN_LOADING_WHITELIST', 'gstreamer',
|
2017-01-24 22:20:53 +00:00
|
|
|
'gst-plugins-base@' + meson.build_root(), separator: ':')
|
2016-10-04 20:44:51 +00:00
|
|
|
env.set('GST_REGISTRY', '@0@/@1@.registry'.format(meson.current_build_dir(), test_name))
|
|
|
|
|
|
|
|
test(vscale_test_name, exe, env: env, timeout: 3 * 60)
|
|
|
|
endforeach
|