avocado: Fix bug where an exception.TestError reports PASS

An oversight happened when writing the output plugins made
the ERROR status to be ignored and reported as PASS.
This patch fixes this problem.
Signed-off-by: NLucas Meneghel Rodrigues <lmr@redhat.com>
上级 54c74757
......@@ -232,6 +232,17 @@ class OutputManager(object):
" (%.2f s)" % t_elapsed)
self.info(normal_pass_msg)
def log_error(self, label, t_elapsed):
"""
Log a test ERROR message.
:param label: Label for the FAIL message (test name + index).
:param t_elapsed: Time it took for test to complete.
"""
normal_error_msg = (label + " " + colors.error_str() +
" (%.2f s)" % t_elapsed)
self.error(normal_error_msg)
def log_fail(self, label, t_elapsed):
"""
Log a test FAIL message.
......
......@@ -184,7 +184,7 @@ class HumanTestResult(TestResult):
:param test: :class:`avocado.test.Test` instance.
"""
TestResult.add_error(self, test)
self.stream.log_pass(self.test_label, test.time_elapsed)
self.stream.log_error(self.test_label, test.time_elapsed)
def add_fail(self, test):
"""
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册