avocado.core.test: Fix SimpleTest

With the d6abdcd4 Test methods changed
but for SimpleTest the wrong method was chosed and only the test
execution is performed now, the post-process class is completelly
ignored. This changes the method to the correct one and adjusts
ExternalRunner to not run this postprocess.
Signed-off-by: NLukáš Doktor <ldoktor@redhat.com>
上级 249d4061
......@@ -671,7 +671,7 @@ class SimpleTest(Test):
self.log.info("Exit status: %s", result.exit_status)
self.log.info("Duration: %s", result.duration)
def test(self):
def execute_cmd(self):
"""
Run the executable, and log its detailed execution.
"""
......@@ -688,8 +688,11 @@ class SimpleTest(Test):
self._log_detailed_cmd_info(details.result)
raise exceptions.TestFail(details)
def run(self, result=None):
super(SimpleTest, self).run(result)
def test(self):
"""
Run the test and postprocess the results
"""
self.execute_cmd()
for line in open(self.logfile):
if self.re_avocado_log.match(line):
raise exceptions.TestWarn("Test passed but there were warnings"
......@@ -732,7 +735,7 @@ class ExternalRunnerTest(SimpleTest):
new_cwd)
os.chdir(new_cwd)
super(ExternalRunnerTest, self).test()
self.execute_cmd()
finally:
if new_cwd is not None:
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册