Skip to content

Commit 7e12beb

Browse files
author
buildbot
committed
Tweaked the UnitTest description of buildbot master.cfg.
- Legacy-Id: 9261
1 parent 5fd5e56 commit 7e12beb

1 file changed

Lines changed: 8 additions & 3 deletions

File tree

buildbot/masters/datatracker/master.cfg

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ class UnitTest(WarningCountingShellCommand):
9494
command = ["python", "-m", "unittest", "discover"]
9595

9696
regexPatterns = {
97-
"total": "Ran (\d+) tests in [0-9.]+s",
97+
"tests": "Ran (\d+) tests in [0-9.]+s",
9898
"time": "Ran \d+ tests in ([0-9.]+)s",
9999
"skipped": "(?:OK|FAILED).*\skipped=(\d+)",
100100
"failed": "FAILED.*failures\=(\d+)",
@@ -138,10 +138,15 @@ class UnitTest(WarningCountingShellCommand):
138138
description = WarningCountingShellCommand.describe(self, done)
139139
if done:
140140
description = description[:] # make a private copy
141-
for name in ["time", "total", "skipped", "failed", "errors", "template_coverage", "url_coverage", "code_coverage", ]:
141+
self.step_status.statistics["passed"] = (
142+
self.step_status.getStatistic("tests",0) -
143+
self.step_status.getStatistic("skipped",0) -
144+
self.step_status.getStatistic("failed",0) -
145+
self.step_status.getStatistic("errors",0))
146+
for name in ["time", "tests", "passed", "skipped", "failed", "errors", "template_coverage", "url_coverage", "code_coverage", ]:
142147
if name in self.step_status.statistics:
143148
value = self.step_status.getStatistic(name)
144-
displayName = name.replace('_', ' ').capitalize()
149+
displayName = name.replace('_', ' ')
145150
if type(value) is float: # this is run-time
146151
description.append('%s: %.2fs' % (displayName, value))
147152
elif type(value) is int:

0 commit comments

Comments
 (0)