From 7e12beb5510f30793061545be8918a68f67b5413 Mon Sep 17 00:00:00 2001 From: buildbot Date: Thu, 19 Mar 2015 23:48:41 +0000 Subject: [PATCH] Tweaked the UnitTest description of buildbot master.cfg. - Legacy-Id: 9261 --- buildbot/masters/datatracker/master.cfg | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) 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: