Bug 908644 - Add a global result summary to cppunittest output;r=ted
authorDan Minor <dminor@mozilla.com>
Fri, 23 Aug 2013 09:28:50 -0400
changeset 144133 4c8d122d39dfc93742cff5dbabc88af91a89dd63
parent 144132 c619171e0070a16c517cda63efbe9370b67b4c8e
child 144134 819e821686a24ac3357604f9120c66e0f2e92fcf
push idunknown
push userunknown
push dateunknown
reviewersted
bugs908644
milestone26.0a1
Bug 908644 - Add a global result summary to cppunittest output;r=ted
testing/runcppunittests.py
--- a/testing/runcppunittests.py
+++ b/testing/runcppunittests.py
@@ -101,21 +101,29 @@ class CPPUnitTests(object):
         * symbols_path: A path to a directory containing Breakpad-formatted
                         symbol files for producing stack traces on crash.
 
         Returns True if all test programs exited with a zero status, False
         otherwise.
         """
         self.xre_path = xre_path
         env = self.build_environment()
-        result = True
+        pass_count = 0
+        fail_count = 0
         for prog in programs:
             single_result = self.run_one_test(prog, env, symbols_path)
-            result = result and single_result
-        return result
+            if single_result:
+                pass_count += 1
+            else:
+                fail_count += 1
+
+        log.info("Result summary:")
+        log.info("Passed: %d" % pass_count)
+        log.info("Failed: %d" % fail_count)
+        return fail_count == 0
 
 class CPPUnittestOptions(OptionParser):
     def __init__(self):
         OptionParser.__init__(self)
         self.add_option("--xre-path",
                         action = "store", type = "string", dest = "xre_path",
                         default = None,
                         help = "absolute path to directory containing XRE (probably xulrunner)")