validate:launcher: Move get_current_position from GstValidatePipelineTest to GstValidateTest

This is where it belongs

Reviewers: Mathieu_Du

Differential Revision: http://phabricator.freedesktop.org/D69
This commit is contained in:
Thibault Saunier 2015-02-27 13:16:01 +00:00 committed by Thibault Saunier
parent 058d5c6b12
commit 2fe03f1993
2 changed files with 20 additions and 20 deletions

View file

@ -396,26 +396,6 @@ class GstValidateLaunchTest(GstValidateTest):
self.add_arguments( self.add_arguments(
"--set-media-info", self.media_descriptor.get_path()) "--set-media-info", self.media_descriptor.get_path())
def get_current_value(self):
if self.scenario:
sent_eos = self.sent_eos_position()
if sent_eos is not None:
t = time.time()
if ((t - sent_eos)) > 30:
if self.media_descriptor.get_protocol() == Protocols.HLS:
self.set_result(Result.PASSED,
"""Got no EOS 30 seconds after sending EOS,
in HLS known and tolerated issue:
https://bugzilla.gnome.org/show_bug.cgi?id=723868""")
return Result.KNOWN_ERROR
self.set_result(
Result.FAILED, "Pipeline did not stop 30 Seconds after sending EOS")
return Result.FAILED
return self.get_current_position()
class GstValidateMediaCheckTest(GstValidateTest): class GstValidateMediaCheckTest(GstValidateTest):

View file

@ -407,6 +407,26 @@ class GstValidateTest(Test):
else: else:
self.scenario = scenario self.scenario = scenario
def get_current_value(self):
if self.scenario:
sent_eos = self.sent_eos_position()
if sent_eos is not None:
t = time.time()
if ((t - sent_eos)) > 30:
if self.media_descriptor.get_protocol() == Protocols.HLS:
self.set_result(Result.PASSED,
"""Got no EOS 30 seconds after sending EOS,
in HLS known and tolerated issue:
https://bugzilla.gnome.org/show_bug.cgi?id=723868""")
return Result.KNOWN_ERROR
self.set_result(
Result.FAILED, "Pipeline did not stop 30 Seconds after sending EOS")
return Result.FAILED
return self.get_current_position()
def get_subproc_env(self): def get_subproc_env(self):
self.validatelogs = self.logfile + '.validate.logs' self.validatelogs = self.logfile + '.validate.logs'
logfiles = self.validatelogs logfiles = self.validatelogs