提交 ded88e73 编写于 作者: R Rudá Moura

avocado.job: Introduce job timeout.

Allows to specify the total amount of time (in seconds)
that a test suite is allow to execute in a job execution.

When the timeout happens in a running test, then the test
is marked as error and the following test cases are marked
as skipped.
Signed-off-by: NRudá Moura <rmoura@redhat.com>
上级 6ea6de39
......@@ -109,6 +109,7 @@ class Job(object):
self.status = "RUNNING"
self.result_proxy = result.TestResultProxy()
self.sysinfo = None
self.timeout = getattr(self.args, 'job_timeout', 0)
def _setup_job_results(self):
logdir = getattr(self.args, 'logdir', None)
......@@ -320,7 +321,8 @@ class Job(object):
_TEST_LOGGER.info('')
self.view.logfile = self.logfile
failures = self.test_runner.run_suite(test_suite, mux)
failures = self.test_runner.run_suite(test_suite, mux,
timeout=self.timeout)
self.view.stop_file_logging()
if not self.standalone:
self._update_latest_link()
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册