未验证 提交 2983aeb1 编写于 作者: C Cleber Rosa

Revert "Test: report state on each phase"

Some aspects of the test runner, including how it applies timeouts and
the specific type of timeout, relies on the absence of a status to
determine that a test process may or may be alive.

At least one test, test_kill_stopped_sleep fom
selftests.functional.test_basic.RunnerSimpleTest will fail because the
runner applies a different type of timeout on TestStatus.finish().

This is far from ideal, but it's how a lot of the current runner
implementation works, and given the current timing, it's better
to keep the behavior consistent, tests passing, and disrupt the
internals on a new development cycle.

This reverts commit ac776472.
Signed-off-by: NCleber Rosa <crosa@redhat.com>
上级 e5e37ca1
......@@ -830,7 +830,6 @@ class Test(unittest.TestCase, TestData):
try:
if skip_test is False:
self.__phase = 'SETUP'
self.report_state()
self.setUp()
except exceptions.TestSkipError as details:
skip_test = True
......@@ -846,7 +845,6 @@ class Test(unittest.TestCase, TestData):
else:
try:
self.__phase = 'TEST'
self.report_state()
testMethod()
except exceptions.TestCancel as details:
stacktrace.log_exc_info(sys.exc_info(), logger=LOG_JOB)
......@@ -865,7 +863,6 @@ class Test(unittest.TestCase, TestData):
try:
if skip_test is False:
self.__phase = 'TEARDOWN'
self.report_state()
self.tearDown()
except exceptions.TestSkipError as details:
stacktrace.log_exc_info(sys.exc_info(), logger=LOG_JOB)
......
......@@ -306,9 +306,7 @@ class RunnerOperationTest(unittest.TestCase):
self.assertEqual(results["tests"][0]["status"], "ERROR",
"%s != %s\n%s" % (results["tests"][0]["status"],
"ERROR", res))
self.assertIn("Test reports unsupported test status",
results["tests"][0]["fail_reason"])
self.assertIn("status: None",
self.assertIn("Test died without reporting the status",
results["tests"][0]["fail_reason"])
def test_runner_tests_fail(self):
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册