diff options
author | Jelmer Vernooij <jelmer@samba.org> | 2010-09-13 23:56:26 +0200 |
---|---|---|
committer | Jelmer Vernooij <jelmer@samba.org> | 2010-09-14 10:54:28 +0200 |
commit | d3960f6b406272cc37820fad04aed6ddfd4e6cce (patch) | |
tree | eb80110d759fa3db8f07688933e2492eece7c29a /selftest/format-subunit | |
parent | 49411fa1079fc78cba4751d57a3c76096fc1b772 (diff) | |
download | samba-d3960f6b406272cc37820fad04aed6ddfd4e6cce.tar.gz samba-d3960f6b406272cc37820fad04aed6ddfd4e6cce.tar.bz2 samba-d3960f6b406272cc37820fad04aed6ddfd4e6cce.zip |
subunit.pm: Simplify subunit handling in perl.
Diffstat (limited to 'selftest/format-subunit')
-rwxr-xr-x | selftest/format-subunit | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/selftest/format-subunit b/selftest/format-subunit index 067fb06610..43cdf096f2 100755 --- a/selftest/format-subunit +++ b/selftest/format-subunit @@ -45,6 +45,7 @@ class PlainFormatter(subunithelper.TestsuiteEnabledTestResult): self.name = None self._progress_level = 0 self.totalsuites = totaltests + self.last_time = None def progress(self, offset, whence): if whence == subunit.PROGRESS_POP: @@ -65,9 +66,6 @@ class PlainFormatter(subunithelper.TestsuiteEnabledTestResult): def start_testsuite(self, name): self.index += 1 self.name = name - testsuite_start_time = self.last_time - - duration = testsuite_start_time - self.start_time if not self.verbose: self.test_output[name] = "" @@ -75,7 +73,8 @@ class PlainFormatter(subunithelper.TestsuiteEnabledTestResult): out = "[%d" % self.index if self.totalsuites is not None: out += "/%d" % self.totalsuites - out += " in " + format_time(duration) + if self.start_time is not None: + out += " in " + format_time(self.last_time - self.start_time) if self.suitesfailed: out += ", %d errors" % (len(self.suitesfailed),) out += "] %s" % name |