mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-26 19:51:11 +00:00
tests: Enable unit test on Windows
Allow run some unit tests on Windows. * Add dependency explicitly for some test cases, otherwise plugins couldn't be loaded on uninstalled environment of Windows. * Add missing GST_PLUGIN_LOADING_WHITELIST on meson build.
This commit is contained in:
parent
5b372a9707
commit
f74ad82ddc
3 changed files with 53 additions and 41 deletions
|
@ -405,11 +405,9 @@ gsttag_dep = dependency('gstreamer-tag-1.0', version : gst_req,
|
|||
fallback : ['gst-plugins-base', 'tag_dep'])
|
||||
gstvideo_dep = dependency('gstreamer-video-1.0', version : gst_req,
|
||||
fallback : ['gst-plugins-base', 'video_dep'])
|
||||
if host_machine.system() != 'windows'
|
||||
gstcheck_dep = dependency('gstreamer-check-1.0', version : gst_req,
|
||||
gstcheck_dep = dependency('gstreamer-check-1.0', version : gst_req,
|
||||
required : get_option('tests'),
|
||||
fallback : ['gstreamer', 'gst_check_dep'])
|
||||
endif
|
||||
|
||||
# GStreamer OpenGL
|
||||
gstgl_dep = dependency('gstreamer-gl-1.0', version : gst_req,
|
||||
|
|
|
@ -17,54 +17,26 @@ enable_gst_player_tests = get_option('gst_player_tests')
|
|||
# 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/autoconvert.c']],
|
||||
[['elements/autovideoconvert.c']],
|
||||
[['elements/avwait.c']],
|
||||
[['elements/camerabin.c']],
|
||||
[['elements/cccombiner.c']],
|
||||
[['elements/ccextractor.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/dtls.c'], not libcrypto_dep.found(), [libcrypto_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']],
|
||||
[['elements/h263parse.c'], false, [libparser_dep]],
|
||||
[['elements/h264parse.c'], false, [libparser_dep]],
|
||||
[['elements/h263parse.c'], false, [libparser_dep, gstcodecparsers_dep]],
|
||||
[['elements/h264parse.c'], false, [libparser_dep, gstcodecparsers_dep]],
|
||||
[['elements/id3mux.c']],
|
||||
[['elements/jifmux.c'], not exif_dep.found(), [exif_dep]],
|
||||
[['elements/jpegparse.c']],
|
||||
[['elements/kate.c'], not kate_dep.found(), [kate_dep]],
|
||||
[['elements/mpeg4videoparse.c'], false, [libparser_dep]],
|
||||
[['elements/mpegtsmux.c']],
|
||||
[['elements/mpegvideoparse.c'], false, [libparser_dep]],
|
||||
[['elements/mpegtsmux.c'], false, [gstmpegts_dep]],
|
||||
[['elements/mpeg4videoparse.c'], false, [libparser_dep, gstcodecparsers_dep]],
|
||||
[['elements/mpegvideoparse.c'], false, [libparser_dep, gstcodecparsers_dep]],
|
||||
[['elements/mxfdemux.c']],
|
||||
[['elements/mxfmux.c']],
|
||||
[['elements/netsim.c']],
|
||||
[['elements/pcapparse.c'], false, [libparser_dep]],
|
||||
[['elements/pnm.c']],
|
||||
[['elements/shm.c'], not shm_enabled, shm_deps],
|
||||
[['elements/rtponvifparse.c']],
|
||||
[['elements/rtponviftimestamp.c']],
|
||||
[['elements/videoframe-audiolevel.c']],
|
||||
[['elements/viewfinderbin.c']],
|
||||
[['elements/voaacenc.c'], not voaac_dep.found(), [voaac_dep]],
|
||||
[['elements/webrtcbin.c'], not libnice_dep.found(), [gstwebrtc_dep]],
|
||||
[['elements/x265enc.c'], not x265_dep.found(), [x265_dep]],
|
||||
[['elements/zbar.c'], not zbar_dep.found(), [zbar_dep]],
|
||||
[['elements/msdkh264enc.c'], not have_msdk, [msdk_dep]],
|
||||
[['libs/h264parser.c'], false, [gstcodecparsers_dep]],
|
||||
[['libs/h265parser.c'], false, [gstcodecparsers_dep]],
|
||||
[['libs/insertbin.c'], false, [gstinsertbin_dep]],
|
||||
[['libs/isoff.c'], not xml2_dep.found(), [gstisoff_dep, xml2_dep]],
|
||||
[['libs/mpegts.c'], false, [gstmpegts_dep]],
|
||||
[['libs/mpegvideoparser.c'], false, [gstcodecparsers_dep]],
|
||||
[['libs/planaraudioadapter.c'], false, [gstbadaudio_dep]],
|
||||
[['libs/player.c'], not enable_gst_player_tests, [gstplayer_dep]],
|
||||
|
@ -72,6 +44,48 @@ base_tests = [
|
|||
[['libs/vp8parser.c'], false, [gstcodecparsers_dep]],
|
||||
]
|
||||
|
||||
# FIXME: unistd dependency, unstable or not tested yet on windows
|
||||
if host_machine.system() != 'windows'
|
||||
base_tests += [
|
||||
[['elements/asfmux.c'], not cdata.has('HAVE_UNISTD_H')],
|
||||
[['elements/assrender.c'], not ass_dep.found(), [ass_dep]],
|
||||
[['elements/camerabin.c'], not cdata.has('HAVE_UNISTD_H')],
|
||||
[['elements/cccombiner.c']],
|
||||
[['elements/ccextractor.c']],
|
||||
[['elements/compositor.c'], not cdata.has('HAVE_UNISTD_H')],
|
||||
[['elements/curlhttpsink.c'], not curl_dep.found(), [curl_dep]],
|
||||
[['elements/curlfilesink.c'],
|
||||
not curl_dep.found() or not cdata.has('HAVE_UNISTD_H'), [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/dtls.c'], not libcrypto_dep.found(), [libcrypto_dep]],
|
||||
[['elements/faac.c'],
|
||||
not faac_dep.found() or not cc.has_header_symbol('faac.h', 'faacEncOpen') or not cdata.has('HAVE_UNISTD_H'),
|
||||
[faac_dep]],
|
||||
[['elements/faad.c'],
|
||||
not faad_dep.found() or not have_faad_2_7 or not cdata.has('HAVE_UNISTD_H'),
|
||||
[faad_dep]],
|
||||
[['elements/gdpdepay.c'], not cdata.has('HAVE_UNISTD_H')],
|
||||
[['elements/gdppay.c'], not cdata.has('HAVE_UNISTD_H')],
|
||||
[['elements/jifmux.c'],
|
||||
not exif_dep.found() or not cdata.has('HAVE_UNISTD_H'), [exif_dep]],
|
||||
[['elements/jpegparse.c'], not cdata.has('HAVE_UNISTD_H')],
|
||||
[['elements/kate.c'],
|
||||
not kate_dep.found() or not cdata.has('HAVE_UNISTD_H'), [kate_dep]],
|
||||
[['elements/netsim.c']],
|
||||
[['elements/shm.c'], not shm_enabled, shm_deps],
|
||||
[['elements/voaacenc.c'],
|
||||
not voaac_dep.found() or not cdata.has('HAVE_UNISTD_H'), [voaac_dep]],
|
||||
[['elements/webrtcbin.c'], not libnice_dep.found(), [gstwebrtc_dep]],
|
||||
[['elements/x265enc.c'], not x265_dep.found(), [x265_dep]],
|
||||
[['elements/zbar.c'], not zbar_dep.found(), [zbar_dep]],
|
||||
[['elements/msdkh264enc.c'], not have_msdk, [msdk_dep]],
|
||||
[['libs/isoff.c'], not xml2_dep.found(), [gstisoff_dep, xml2_dep]],
|
||||
[['libs/mpegts.c'], false, [gstmpegts_dep]],
|
||||
]
|
||||
endif
|
||||
|
||||
test_defines = [
|
||||
'-UG_DISABLE_ASSERT',
|
||||
'-UG_DISABLE_CAST_CHECKS',
|
||||
|
@ -125,6 +139,9 @@ foreach t : base_tests
|
|||
env.set('GST_STATE_IGNORE_ELEMENTS', '')
|
||||
env.set('GST_PLUGIN_PATH_1_0', [meson.build_root()] + pluginsdirs)
|
||||
env.set('GST_REGISTRY', '@0@/@1@.registry'.format(meson.current_build_dir(), test_name))
|
||||
env.set('GST_PLUGIN_LOADING_WHITELIST', 'gstreamer', 'gst-plugins-base',
|
||||
'gst-plugins-good', 'gst-plugins-ugly','gst-libav',
|
||||
'gst-plugins-bad@' + meson.build_root())
|
||||
test(test_name, exe, env: env, timeout: 3 * 60)
|
||||
endif
|
||||
endforeach
|
||||
|
|
|
@ -1,8 +1,5 @@
|
|||
# FIXME: make check work on windows
|
||||
if host_system != 'windows'
|
||||
if not get_option('tests').disabled() and gstcheck_dep.found()
|
||||
subdir('check')
|
||||
endif
|
||||
if not get_option('tests').disabled() and gstcheck_dep.found()
|
||||
subdir('check')
|
||||
endif
|
||||
if not get_option('examples').disabled()
|
||||
subdir('examples')
|
||||
|
|
Loading…
Reference in a new issue