修复JS测试套运行异常时报告无法收集测试用例结果的bug

Signed-off-by: deveco_xdevice <liguangjie1@huawei.com>
This commit is contained in:
deveco_xdevice 2022-11-29 11:34:09 +08:00
parent f64699aa78
commit ba390df233

View File

@ -1214,8 +1214,8 @@ class OHJSUnitTestParser(IParser):
def handle_suites_end(self):
suite_result = self.state_machine.suite()
suite_result.run_time = self.test_time
suite_result.is_completed = True
if not suite_result.is_completed:
self.handle_suite_end()
for listener in self.get_listeners():
if listener.__class__.__name__ == "ReportListener":
self._cal_result(listener)