validate: launcher: Take the timeout as ref timeout to compute hard_timeout

when it is provided.
This commit is contained in:
Thibault Saunier 2014-12-08 18:23:10 +01:00
parent 5beaf5dfa8
commit 1e39db18ad

View file

@ -296,15 +296,18 @@ class GstValidateTest(Test):
timeout=DEFAULT_TIMEOUT, scenario=None, hard_timeout=None): timeout=DEFAULT_TIMEOUT, scenario=None, hard_timeout=None):
if not hard_timeout and self.HARD_TIMEOUT_FACTOR: if not hard_timeout and self.HARD_TIMEOUT_FACTOR:
if duration: if timeout:
hard_timeout = timeout * self.HARD_TIMEOUT_FACTOR
elif duration:
hard_timeout = duration * self.HARD_TIMEOUT_FACTOR hard_timeout = duration * self.HARD_TIMEOUT_FACTOR
else: else:
hard_timeout = None hard_timeout = None
super( super(GstValidateTest, self).__init__(application_name, classname,
GstValidateTest, self).__init__(application_name, classname, options, options, reporter,
reporter, duration=duration, duration=duration,
timeout=timeout, hard_timeout=hard_timeout) timeout=timeout,
hard_timeout=hard_timeout)
# defines how much the process can be outside of the configured # defines how much the process can be outside of the configured
# segment / seek # segment / seek