Commit 6e202f90 authored by Thibault Saunier's avatar Thibault Saunier 🌵
Browse files

testsuites: Pass through autopep8

parent 6710ba4b
......@@ -28,6 +28,7 @@ import tempfile
SERVER = "gstreamer.freedesktop.org"
MEDIA_BASE = "/srv/gstreamer.freedesktop.org/www/data/media/gst-integration-testsuite"
def call(cmd, options, msg=None):
if options.upload:
if not msg:
......@@ -65,6 +66,7 @@ def is_binary(fpath):
except UnicodeDecodeError:
return True
if __name__ == "__main__":
parser = argparse.ArgumentParser()
parser.add_argument("-u", "--upload", dest="upload",
......@@ -93,7 +95,6 @@ if __name__ == "__main__":
except FileNotFoundError:
res = []
from_file = tempfile.NamedTemporaryFile('w')
for root, dirs, files in os.walk(cdir):
for f in files:
......
......@@ -35,13 +35,14 @@ BLACKLIST = [
'https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/issues/545'),
]
def setup_tests(test_manager, options):
print("Setting up GstValidate Adaptive Streaming test-vectors tests")
assets_dir = os.path.abspath(os.path.join(os.path.dirname(__file__), "..", "medias", "adaptivecontent"))
options.add_paths(assets_dir)
test_manager.set_default_blacklist(BLACKLIST)
#test_manager.add_expected_issues(EXPECTED_ISSUES)
# test_manager.add_expected_issues(EXPECTED_ISSUES)
test_manager.register_defaults()
scenarios = test_manager.get_scenarios()
# Don't test generic tests that are already covered by the base validate runner
......@@ -57,4 +58,3 @@ def setup_tests(test_manager, options):
test_manager.set_scenarios(scenarios)
return True
......@@ -23,12 +23,14 @@
The GstValidate DASH-IF test-vectors testsuite
"""
import json, requests
import json
import requests
import sys
import xml.etree.ElementTree as ET
TESTVECTOR_URL = "http://testassets.dashif.org:3000/v1/testvectors"
def cleanup_entries(data):
# we need to do some minor cleanup of the entries:
# * Replace <a href=..>something</a>
......@@ -50,6 +52,7 @@ def cleanup_entries(data):
_url = url.split("<a href=")[1].split(">Link<")[0]
entry["url"] = _url
def update_testvector_list(outputfile=None):
# download and cleanup testvector json
resp = requests.get(url=TESTVECTOR_URL)
......@@ -60,9 +63,9 @@ def update_testvector_list(outputfile=None):
else:
json.dump(data["data"], fp=open(outputfile, "w"), indent=4, sort_keys=True)
if __name__ == "__main__":
if len(sys.argv) > 1:
update_testvector_list(sys.argv[1])
else:
update_testvector_list()
......@@ -28,7 +28,6 @@ TEST_MANAGER = "ges"
def setup_tests(test_manager, options):
print("Setting up GES default tests")
assets_dir = os.path.abspath(os.path.join(os.path.dirname(__file__), "..", "medias", "defaults"))
if options.sync:
if not update_assets(options, assets_dir):
......
......@@ -22,18 +22,18 @@ The GES GstValidate testsuite with bigger and more complex projects
"""
import os
TEST_MANAGER = "ges"
TEST_MANAGER = "ges"
def setup_tests(test_manager, options):
print("Setting up GES extra tests")
extra_projects_path = os.path.abspath(os.path.join(
os.path.dirname(__file__),
"..",
"ges",
"ges-extra-projects"))
"..",
"ges",
"ges-extra-projects"))
options.add_paths(os.path.abspath(os.path.join(os.path.dirname(__file__),
"..", "medias")))
test_manager.register_defaults(extra_projects_path)
return True
......@@ -98,7 +98,7 @@ def download_files(assets_dir):
hook = None
try:
urlretrieve(URL, fname, hook)
except:
except BaseException:
print("\nCould not retieved %s" % URL)
raise
......
......@@ -48,12 +48,10 @@ BLACKLIST = [('validate.file.transcode.to_vorbis_and_vp8_in_webm.GH1_00094_1920x
' (Deactivating as it is not very important.)'),
("(?!.*.media_check.qtdemux-test-frag-basic_zero_dur_no_mehd_mp4).*.qtdemux-test-frag-basic_zero_dur_no_mehd_mp4",
'`qtdemux-test-frag-basic_zero_dur_no_mehd_mp4` is there only for media_check tests.'),
]
]
def setup_tests(test_manager, options):
print("Setting up GstValidate default tests")
testsuite_dir = os.path.realpath(os.path.join(os.path.dirname(__file__)))
assets_dir = os.path.realpath(os.path.join(testsuite_dir, os.path.pardir, "medias", "defaults"))
......@@ -88,20 +86,20 @@ def setup_tests(test_manager, options):
"scrub_forward_seeking"]
for compositor in ["compositor", "glvideomixer"]:
test_manager.add_generators(
test_manager.GstValidateMixerTestsGenerator(compositor + ".simple", test_manager,
compositor,
"video",
converter="deinterlace ! videoconvert",
mixed_srcs={
"synchronized": {"mixer_props": "sink_1::alpha=0.5 sink_1::xpos=50 sink_1::ypos=50", # noqa
"sources":
("videotestsrc pattern=snow timestamp-offset=3000000000 ! 'video/x-raw,format=AYUV,width=640,height=480,framerate=(fraction)30/1' ! timeoverlay", # noqa
"videotestsrc pattern=smpte ! 'video/x-raw,format=AYUV,width=800,height=600,framerate=(fraction)10/1' ! timeoverlay")}, # noqa
"bgra": ("videotestsrc ! video/x-raw, framerate=\(fraction\)10/1, width=100, height=100", # noqa
"videotestsrc ! video/x-raw, framerate=\(fraction\)5/1, width=320, height=240")
},
valid_scenarios=valid_mixing_scenarios))
test_manager.add_generators(
test_manager.GstValidateMixerTestsGenerator(compositor + ".simple", test_manager,
compositor,
"video",
converter="deinterlace ! videoconvert",
mixed_srcs={
"synchronized": {"mixer_props": "sink_1::alpha=0.5 sink_1::xpos=50 sink_1::ypos=50", # noqa
"sources":
("videotestsrc pattern=snow timestamp-offset=3000000000 ! 'video/x-raw,format=AYUV,width=640,height=480,framerate=(fraction)30/1' ! timeoverlay", # noqa
"videotestsrc pattern=smpte ! 'video/x-raw,format=AYUV,width=800,height=600,framerate=(fraction)10/1' ! timeoverlay")}, # noqa
"bgra": ("videotestsrc ! video/x-raw, framerate=\(fraction\)10/1, width=100, height=100", # noqa
"videotestsrc ! video/x-raw, framerate=\(fraction\)5/1, width=320, height=240")
},
valid_scenarios=valid_mixing_scenarios))
test_manager.add_generators(
test_manager.GstValidateMixerTestsGenerator("audiomixer.simple", test_manager,
......
......@@ -80,4 +80,4 @@ KNOWN_ISSUES = {
"sometimes": True
}
],
}
\ No newline at end of file
}
......@@ -25,9 +25,9 @@ import os
from testsuiteutils import update_assets
TEST_MANAGER = "validate"
TEST_MANAGER = "validate"
BLACKLIST =[("validateextra.*reverse.*Sintel_2010_720p_mkv",
BLACKLIST = [("validateextra.*reverse.*Sintel_2010_720p_mkv",
"TODO in matroskademux: FIXME: We should build an index during playback or "
"when scanning that can be used here. The reverse playback code requires "
" seek_index and seek_entry to be set!"),
......@@ -35,7 +35,8 @@ BLACKLIST =[("validateextra.*reverse.*Sintel_2010_720p_mkv",
# Subtitles known issues
("validateextra.file.playback.switch_subtitle_track.Sintel_2010_720p_mkv",
"https://bugzilla.gnome.org/show_bug.cgi?id=734051"),
]
]
def setup_tests(test_manager, options):
print("Setting up GstValidate default tests")
......
validateextra.file.media_check.Sintel_2010_720p_mkv
validateextra.file.playback.change_state_intensive.Sintel_2010_720p_mkv
validateextra.file.playback.disable_subtitle_track_while_paused.Sintel_2010_720p_mkv
validateextra.file.playback.fast_forward.Sintel_2010_720p_mkv
validateextra.file.playback.play_15s.Sintel_2010_720p_mkv
validateextra.file.playback.scrub_forward_seeking.Sintel_2010_720p_mkv
validateextra.file.playback.seek_backward.Sintel_2010_720p_mkv
validateextra.file.playback.seek_forward.Sintel_2010_720p_mkv
validateextra.file.playback.seek_with_stop.Sintel_2010_720p_mkv
validateextra.file.playback.set_subtitles.Sintel_2010_720p_mkv
validateextra.file.playback.switch_subtitle_track_while_paused.Sintel_2010_720p_mkv
validateextra.file.playback.switch_subtitles.Sintel_2010_720p_mkv
~validateextra.rtsp.playback.change_state_intensive.Sintel_2010_720p_mkv
~validateextra.rtsp.playback.fast_forward.Sintel_2010_720p_mkv
~validateextra.rtsp.playback.play_15s.Sintel_2010_720p_mkv
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment