summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rwxr-xr-xtests/check/media/download-media11
-rw-r--r--tests/check/media/meson.build19
-rw-r--r--tests/check/meson.build22
3 files changed, 52 insertions, 0 deletions
diff --git a/tests/check/media/download-media b/tests/check/media/download-media
new file mode 100755
index 000000000..f522ff00e
--- /dev/null
+++ b/tests/check/media/download-media
@@ -0,0 +1,11 @@
+#!/usr/bin/env python3
+
+import urllib.request
+import shutil
+import sys
+import os
+
+os.makedirs(os.path.dirname(sys.argv[2]), exist_ok=True)
+
+with urllib.request.urlopen(sys.argv[1]) as response, open(sys.argv[2], 'wb') as out_file:
+ shutil.copyfileobj(response, out_file)
diff --git a/tests/check/media/meson.build b/tests/check/media/meson.build
new file mode 100644
index 000000000..7094d2dfc
--- /dev/null
+++ b/tests/check/media/meson.build
@@ -0,0 +1,19 @@
+test_media = [
+ 'audio.ogg',
+ 'audio-video.ogg',
+ 'audio-short.ogg',
+ 'audio-video-short.ogg',
+ 'sintel.mkv',
+ 'test_sub.srt',
+]
+
+download_media = find_program('download-media')
+
+foreach m: test_media
+ downloaded_media = custom_target(m,
+ input : [],
+ output : m,
+ command: [download_media, 'http://gstreamer.freedesktop.org/data/media/small/' + m, '@OUTPUT@'],
+ build_by_default: true,
+ install: false)
+endforeach
diff --git a/tests/check/meson.build b/tests/check/meson.build
index f0a8ec120..d2c7a0dc6 100644
--- a/tests/check/meson.build
+++ b/tests/check/meson.build
@@ -11,6 +11,8 @@ libparser_dep = declare_dependency(link_with: libparser,
exif_dep = dependency('libexif', version : '>= 0.6.16', required : false)
+enable_gst_player_tests = get_option('enable_gst_player_tests')
+
# name, condition when to skip the test and extra dependencies
base_tests = [
[['elements/aiffparse.c']],
@@ -55,7 +57,22 @@ base_tests = [
[['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]],
+ [['libs/gstglcolorconvert.c'], not build_gstgl, [gstgl_dep]],
+ [['libs/gstglcontext.c'], not build_gstgl, [gstgl_dep]],
+ [['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/gstglsl.c'], not build_gstgl, [gstgl_dep]],
+ [['libs/gstglupload.c'], not build_gstgl, [gstgl_dep]],
+ [['libs/h264parser.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/player.c'], not enable_gst_player_tests, [gstplayer_dep]],
+ [['libs/vc1parser.c'], false, [gstcodecparsers_dep]],
+ [['libs/vp8parser.c'], false, [gstcodecparsers_dep]],
]
test_defines = [
@@ -63,6 +80,7 @@ test_defines = [
'-UG_DISABLE_CAST_CHECKS',
'-DGST_CHECK_TEST_ENVIRONMENT_BEACON="GST_STATE_IGNORE_ELEMENTS"',
'-DGST_TEST_FILES_PATH="' + meson.current_source_dir() + '/../files"',
+ '-DTEST_PATH="' + meson.current_build_dir() + '/media"',
'-DDASH_MPD_DATADIR=' + meson.current_source_dir() + '/elements/dash_mpd_data',
'-DGST_USE_UNSTABLE_API',
]
@@ -113,3 +131,7 @@ foreach t : base_tests
test(test_name, exe, env: env, timeout: 3 * 60)
endif
endforeach
+
+if enable_gst_player_tests
+ subdir ('media')
+endif