summaryrefslogtreecommitdiff
path: root/selftest/format-subunit
diff options
context:
space:
mode:
authorJelmer Vernooij <jelmer@samba.org>2010-03-30 14:42:23 +0200
committerJelmer Vernooij <jelmer@samba.org>2010-03-31 02:20:08 +0200
commit6c299d28b56dd237792cc80c15c6169e701b4a97 (patch)
tree3667bfdb69a8b7d9f9dc513f11335be4767cd5f3 /selftest/format-subunit
parent7f1360db5123b61cd4473f54d4fb55746c5d8245 (diff)
downloadsamba-6c299d28b56dd237792cc80c15c6169e701b4a97.tar.gz
samba-6c299d28b56dd237792cc80c15c6169e701b4a97.tar.bz2
samba-6c299d28b56dd237792cc80c15c6169e701b4a97.zip
selftest: Use standard subunit command for progress reporting.
Diffstat (limited to 'selftest/format-subunit')
-rwxr-xr-xselftest/format-subunit15
1 files changed, 11 insertions, 4 deletions
diff --git a/selftest/format-subunit b/selftest/format-subunit
index eba8c31682..6d2ceb1047 100755
--- a/selftest/format-subunit
+++ b/selftest/format-subunit
@@ -9,6 +9,7 @@ import os
import signal
import sys
import subunithelper
+import subunit
class PlainFormatter(object):
@@ -25,13 +26,19 @@ class PlainFormatter(object):
self.summaryfile = summaryfile
self.index = 0
self.name = None
+ self._progress_level = 0
self.totalsuites = totaltests
- def testsuite_count(self, count):
- self.totalsuites = count
-
def progress(self, offset, whence):
- pass
+ if whence == subunit.PROGRESS_POP:
+ self._progress_level -= 1
+ elif whence == subunit.PROGRESS_PUSH:
+ self._progress_level += 1
+ elif whence == subunit.PROGRESS_SET:
+ if self._progress_level == 0:
+ self.totalsuites = offset
+ elif whence == subunit.PROGRESS_CUR:
+ raise NotImplementedError
def report_time(self, time):
if self.start_time is None: