validate:launcher: Force clock sync for some protocols

In HLS for example, not having clock sync might lead to races and failures
do not test that for now
This commit is contained in:
Thibault Saunier 2014-11-20 11:55:45 +01:00
parent 057a864223
commit 36a2d61068
4 changed files with 14 additions and 3 deletions

View file

@ -177,7 +177,8 @@ class GstValidatePlaybinTestsGenerator(GstValidatePipelineTestsGenerator):
continue
if self.test_manager.options.mute:
if scenario.needs_clock_sync():
if scenario.needs_clock_sync() or \
minfo.media_descriptor.need_clock_sync():
fakesink = "'fakesink sync=true'"
else:
fakesink = "'fakesink'"

View file

@ -1202,6 +1202,9 @@ class GstValidateMediaDescriptor(MediaDescriptor):
def get_path(self):
return self._xml_path
def need_clock_sync(self):
return Protocols.needs_clock_sync(self.get_protocol())
def get_media_filepath(self):
if self.get_protocol() == Protocols.FILE:
return self._xml_path.replace("." + self.MEDIA_INFO_EXT, "")

View file

@ -125,7 +125,8 @@ http://wiki.pitivi.org/wiki/Bug_reporting#Debug_logs).
),
DEFAULT_MAIN_DIR,
"\n * ".join([getattr(Protocols, att) for att in
dir(Protocols) if not att.startswith("_")]))
dir(Protocols) if isinstance(getattr(Protocols, att), str)
and not att.startswith("_")]))
QA_ASSETS = "gst-qa-assets"
MEDIAS_FOLDER = "medias"

View file

@ -44,13 +44,19 @@ class Result(object):
PASSED = "Passed"
KNOWN_ERROR = "Known error"
class Protocols(object):
HTTP = "http"
FILE = "file"
HLS = "hls"
DASH = "dash"
@staticmethod
def needs_clock_sync(protocol):
if protocol == Protocols.HLS:
return True
return False
class Colors(object):
HEADER = '\033[95m'