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 157040 4c8d122d39dfc93742cff5dbabc88af91a89dd63
parent 157039 c619171e0070a16c517cda63efbe9370b67b4c8e
child 157041 819e821686a24ac3357604f9120c66e0f2e92fcf
push id2961
push userlsblakk@mozilla.com
push dateMon, 28 Oct 2013 21:59:28 +0000
treeherdermozilla-beta@73ef4f13486f [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersted
bugs908644
milestone26.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
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)")