mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-25 17:50:36 +00:00
validate:tools: Clean test between runs when running forever
This commit is contained in:
parent
f6bf92cbc9
commit
07b968a4f6
2 changed files with 21 additions and 3 deletions
|
@ -155,7 +155,8 @@ class GstValidateLaunchTest(GstValidateTest):
|
|||
if self.scenario:
|
||||
sent_eos = self.sent_eos_position()
|
||||
if sent_eos is not None:
|
||||
if ((time.time() - sent_eos)) > 30:
|
||||
t = time.time()
|
||||
if ((t - sent_eos)) > 30:
|
||||
if self.file_infos.get("file-info", "protocol") == Protocols.HLS:
|
||||
self.set_result(Result.PASSED,
|
||||
"""Got no EOS 30 seconds after sending EOS,
|
||||
|
@ -241,7 +242,8 @@ class GstValidateTranscodingTest(GstValidateTest):
|
|||
if self.scenario:
|
||||
sent_eos = self.sent_eos_position()
|
||||
if sent_eos is not None:
|
||||
if ((time.time() - sent_eos)) > 30:
|
||||
t = time.time()
|
||||
if ((t - sent_eos)) > 30:
|
||||
if self.file_infos.get("file-info", "protocol") == Protocols.HLS:
|
||||
self.set_result(Result.PASSED,
|
||||
"""Got no EOS 30 seconds after sending EOS,
|
||||
|
@ -249,6 +251,7 @@ class GstValidateTranscodingTest(GstValidateTest):
|
|||
https://bugzilla.gnome.org/show_bug.cgi?id=723868""")
|
||||
return Result.KNOWN_ERROR
|
||||
|
||||
|
||||
return Result.FAILED
|
||||
|
||||
return self.get_current_size()
|
||||
|
|
|
@ -54,6 +54,9 @@ class Test(Loggable):
|
|||
self.reporter = reporter
|
||||
self.process = None
|
||||
|
||||
self.clean()
|
||||
|
||||
def clean(self):
|
||||
self.message = ""
|
||||
self.error_str = ""
|
||||
self.time_taken = 0.0
|
||||
|
@ -224,6 +227,10 @@ class GstValidateTest(Test):
|
|||
else:
|
||||
self.scenario = scenario
|
||||
|
||||
def clean(self):
|
||||
Test.clean(self)
|
||||
self._sent_eos_pos = None
|
||||
|
||||
def build_arguments(self):
|
||||
if self.scenario is not None:
|
||||
self.add_arguments("--set-scenario", self.scenario.name)
|
||||
|
@ -458,6 +465,10 @@ class TestsManager(Loggable):
|
|||
|
||||
return Result.PASSED
|
||||
|
||||
def clean_tests(self):
|
||||
for test in self.tests:
|
||||
test.clean()
|
||||
|
||||
def needs_http_server(self):
|
||||
return False
|
||||
|
||||
|
@ -543,10 +554,14 @@ class _TestsLauncher(Loggable):
|
|||
|
||||
return True
|
||||
|
||||
def _clean_tests(self):
|
||||
for tester in self.testers:
|
||||
tester.clean_tests()
|
||||
|
||||
def run_tests(self):
|
||||
if self.options.forever:
|
||||
while self._run_tests():
|
||||
continue
|
||||
self._clean_tests()
|
||||
|
||||
return False
|
||||
else:
|
||||
|
|
Loading…
Reference in a new issue