提交 784f3040 编写于 作者: A Amador Pahim

remote: improve error handling from remote executions

A remote job can fail for a number of reasons other than remote access
timeout (the only error handled so far).

This patch makes the job to exit nicely, showing the message from
remote job, in case we cannot parse the json output from the remote job.
Signed-off-by: NAmador Pahim <apahim@redhat.com>
上级 357cebf0
......@@ -209,7 +209,12 @@ class RemoteTestRunner(TestRunner):
"specified timeout (%s). Interrupting."
% (timeout))
json_result = self._parse_json_response(result.stdout)
try:
json_result = self._parse_json_response(result.stdout)
except:
stacktrace.log_exc_info(sys.exc_info(), logger='avocado.debug')
raise exceptions.JobError(result.stdout)
for t_dict in json_result['tests']:
logdir = os.path.join(self.job.logdir, 'test-results')
relative_path = astring.string_to_safe_path(t_dict['test'])
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册