提交 97ad798d 编写于 作者: O openharmony_ci 提交者: Gitee

!8 covert notrun to ignored for the status of test report

Merge pull request !8 from Hanwb/master
......@@ -73,6 +73,7 @@ class ReportConstant:
blocked = "blocked"
ignored = "ignored"
unavailable = "unavailable"
not_run = "notrun"
message = "message"
# case result constants
......@@ -401,7 +402,7 @@ class Case:
return self.status in [ReportConstant.unavailable]
def is_ignored(self):
return self.status in [ReportConstant.skip]
return self.status in [ReportConstant.skip, ReportConstant.not_run]
def get_result(self):
if self.is_failed():
......
......@@ -164,6 +164,12 @@ class ResultReporter(IReporter):
ReportConstant.empty_name:
child.set(ReportConstant.module_name, module_name)
self._check_tests_and_unavailable(child)
# covert "notrun" to "ignored" for the test case status
for element in child:
if element.get(ReportConstant.status, "") == \
ReportConstant.not_run:
ignored = int(child.get(ReportConstant.ignored, 0)) + 1
child.set(ReportConstant.ignored, "%s" % ignored)
test_suite_elements.append(child)
for update_attribute in need_update_attributes:
update_value = child.get(update_attribute, 0)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册