mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-01-13 10:55:34 +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:
|
if self.scenario:
|
||||||
sent_eos = self.sent_eos_position()
|
sent_eos = self.sent_eos_position()
|
||||||
if sent_eos is not None:
|
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:
|
if self.file_infos.get("file-info", "protocol") == Protocols.HLS:
|
||||||
self.set_result(Result.PASSED,
|
self.set_result(Result.PASSED,
|
||||||
"""Got no EOS 30 seconds after sending EOS,
|
"""Got no EOS 30 seconds after sending EOS,
|
||||||
|
@ -241,7 +242,8 @@ class GstValidateTranscodingTest(GstValidateTest):
|
||||||
if self.scenario:
|
if self.scenario:
|
||||||
sent_eos = self.sent_eos_position()
|
sent_eos = self.sent_eos_position()
|
||||||
if sent_eos is not None:
|
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:
|
if self.file_infos.get("file-info", "protocol") == Protocols.HLS:
|
||||||
self.set_result(Result.PASSED,
|
self.set_result(Result.PASSED,
|
||||||
"""Got no EOS 30 seconds after sending EOS,
|
"""Got no EOS 30 seconds after sending EOS,
|
||||||
|
@ -249,6 +251,7 @@ class GstValidateTranscodingTest(GstValidateTest):
|
||||||
https://bugzilla.gnome.org/show_bug.cgi?id=723868""")
|
https://bugzilla.gnome.org/show_bug.cgi?id=723868""")
|
||||||
return Result.KNOWN_ERROR
|
return Result.KNOWN_ERROR
|
||||||
|
|
||||||
|
|
||||||
return Result.FAILED
|
return Result.FAILED
|
||||||
|
|
||||||
return self.get_current_size()
|
return self.get_current_size()
|
||||||
|
|
|
@ -54,6 +54,9 @@ class Test(Loggable):
|
||||||
self.reporter = reporter
|
self.reporter = reporter
|
||||||
self.process = None
|
self.process = None
|
||||||
|
|
||||||
|
self.clean()
|
||||||
|
|
||||||
|
def clean(self):
|
||||||
self.message = ""
|
self.message = ""
|
||||||
self.error_str = ""
|
self.error_str = ""
|
||||||
self.time_taken = 0.0
|
self.time_taken = 0.0
|
||||||
|
@ -224,6 +227,10 @@ class GstValidateTest(Test):
|
||||||
else:
|
else:
|
||||||
self.scenario = scenario
|
self.scenario = scenario
|
||||||
|
|
||||||
|
def clean(self):
|
||||||
|
Test.clean(self)
|
||||||
|
self._sent_eos_pos = None
|
||||||
|
|
||||||
def build_arguments(self):
|
def build_arguments(self):
|
||||||
if self.scenario is not None:
|
if self.scenario is not None:
|
||||||
self.add_arguments("--set-scenario", self.scenario.name)
|
self.add_arguments("--set-scenario", self.scenario.name)
|
||||||
|
@ -458,6 +465,10 @@ class TestsManager(Loggable):
|
||||||
|
|
||||||
return Result.PASSED
|
return Result.PASSED
|
||||||
|
|
||||||
|
def clean_tests(self):
|
||||||
|
for test in self.tests:
|
||||||
|
test.clean()
|
||||||
|
|
||||||
def needs_http_server(self):
|
def needs_http_server(self):
|
||||||
return False
|
return False
|
||||||
|
|
||||||
|
@ -543,10 +554,14 @@ class _TestsLauncher(Loggable):
|
||||||
|
|
||||||
return True
|
return True
|
||||||
|
|
||||||
|
def _clean_tests(self):
|
||||||
|
for tester in self.testers:
|
||||||
|
tester.clean_tests()
|
||||||
|
|
||||||
def run_tests(self):
|
def run_tests(self):
|
||||||
if self.options.forever:
|
if self.options.forever:
|
||||||
while self._run_tests():
|
while self._run_tests():
|
||||||
continue
|
self._clean_tests()
|
||||||
|
|
||||||
return False
|
return False
|
||||||
else:
|
else:
|
||||||
|
|
Loading…
Reference in a new issue