subunithelper: Fix progress support.
authorJelmer Vernooij <jelmer@samba.org>
Sun, 14 Dec 2014 20:10:20 +0000 (20:10 +0000)
committerAndrew Bartlett <abartlet@samba.org>
Fri, 6 Mar 2015 03:41:47 +0000 (04:41 +0100)
Change-Id: I5dd2ca0f3bc02821d5c9e1dc878bba577667d162
Signed-off-by: Jelmer Vernooij <jelmer@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
selftest/subunithelper.py

index b07d51edad4dfb1f59863fdbc87505f867caff2d..a1d49fd51c41cb3dbe55e143692cd03572eb13d2 100644 (file)
@@ -194,7 +194,14 @@ def parse_results(msg_ops, statistics, fh):
 class SubunitOps(TestProtocolClient,TestsuiteEnabledTestResult):
 
     def progress(self, count, whence):
 class SubunitOps(TestProtocolClient,TestsuiteEnabledTestResult):
 
     def progress(self, count, whence):
-        pass
+        if whence == subunit.PROGRESS_POP:
+            self._stream.write("progress: pop\n")
+        elif whence == subunit.PROGRESS_PUSH:
+            self._stream.write("progress: push\n")
+        elif whence == subunit.PROGRESS_SET:
+            self._stream.write("progress: %d\n" % count)
+        elif whence == subunit.PROGRESS_CUR:
+            raise NotImplementedError
 
     # The following are Samba extensions:
     def start_testsuite(self, name):
 
     # The following are Samba extensions:
     def start_testsuite(self, name):