diff --git a/buildbot/masters/datatracker/master.cfg b/buildbot/masters/datatracker/master.cfg index aefa18115..c8a2f0b43 100644 --- a/buildbot/masters/datatracker/master.cfg +++ b/buildbot/masters/datatracker/master.cfg @@ -94,7 +94,7 @@ class UnitTest(WarningCountingShellCommand): command = ["python", "-m", "unittest", "discover"] regexPatterns = { - "total": "Ran (\d+) tests in [0-9.]+s", + "tests": "Ran (\d+) tests in [0-9.]+s", "time": "Ran \d+ tests in ([0-9.]+)s", "skipped": "(?:OK|FAILED).*\skipped=(\d+)", "failed": "FAILED.*failures\=(\d+)", @@ -138,10 +138,15 @@ class UnitTest(WarningCountingShellCommand): description = WarningCountingShellCommand.describe(self, done) if done: description = description[:] # make a private copy - for name in ["time", "total", "skipped", "failed", "errors", "template_coverage", "url_coverage", "code_coverage", ]: + self.step_status.statistics["passed"] = ( + self.step_status.getStatistic("tests",0) - + self.step_status.getStatistic("skipped",0) - + self.step_status.getStatistic("failed",0) - + self.step_status.getStatistic("errors",0)) + for name in ["time", "tests", "passed", "skipped", "failed", "errors", "template_coverage", "url_coverage", "code_coverage", ]: if name in self.step_status.statistics: value = self.step_status.getStatistic(name) - displayName = name.replace('_', ' ').capitalize() + displayName = name.replace('_', ' ') if type(value) is float: # this is run-time description.append('%s: %.2fs' % (displayName, value)) elif type(value) is int: