Display total number of tests in format-subunit, not just number of test suites.
authorJelmer Vernooij <jelmer@samba.org>
Sat, 1 Nov 2014 19:51:31 +0000 (12:51 -0700)
committerJelmer Vernooij <jelmer@samba.org>
Wed, 19 Nov 2014 01:46:03 +0000 (02:46 +0100)
Change-Id: Iae17df773f380b13d2b3f69e83593139c01c4a6d
Signed-Off-By: Jelmer Vernooij <jelmer@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
selftest/subunithelper.py

index dcea5a8..3a96843 100644 (file)
@@ -485,7 +485,13 @@ class PlainFormatter(TestsuiteEnabledTestResult):
         if not self.verbose:
             self.test_output[name] = ""
 
-        out = "[%d" % self.index
+        total_tests = (self.statistics['TESTS_EXPECTED_OK'] +
+                       self.statistics['TESTS_EXPECTED_FAIL'] +
+                       self.statistics['TESTS_ERROR'] +
+                       self.statistics['TESTS_UNEXPECTED_FAIL'] +
+                       self.statistics['TESTS_UNEXPECTED_OK'])
+
+        out = "[%d(%d)" % (self.index, total_tests)
         if self.totalsuites is not None:
             out += "/%d" % self.totalsuites
         if self.start_time is not None: