提交 2c074ed8 编写于 作者: A Amador Pahim

html: add warn in success rate

Count WARN in to calculate the success rate in the HTML report.
Signed-off-by: NAmador Pahim <apahim@redhat.com>
上级 da338600
......@@ -78,11 +78,14 @@ class ReportModel(object):
def passed(self):
return self.result.passed
def pass_rate(self):
def warned(self):
return self.result.warned
def rate(self):
total = float(self.result.tests_total)
passed = float(self.result.passed)
succeeded = float(self.result.passed + self.result.warned)
if total > 0:
pr = 100 * (passed / total)
pr = 100 * (succeeded / total)
else:
pr = 0
return "%.2f" % pr
......
......@@ -736,7 +736,7 @@
<td>Cumulative test time</td><td>{{tests_total_time}} s</td>
</tr>
<tr>
<td>Stats</td><td>From {{tests_total}} tests executed, {{passed}} passed (pass rate of {{pass_rate}}%)</td>
<td>Stats</td><td>From {{tests_total}} tests executed, {{passed}} passed and {{warned}} warned (success rate of {{rate}}%)</td>
</tr>
</table>
</div>
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册