Bug 808410 - Ensure non-zero return values for robocop tests aren't overwritten by later success; r=gbrown
authorEd Morley <emorley@mozilla.com>
Tue, 20 Nov 2012 15:24:28 +0000
changeset 122879 0ed85ba08942d771fbe1049421ddaf6d4386e964
parent 122878 f0a6c0c3cd8db7ecfd527c418456473291d59493
child 122880 55ea556dffb9d3fbaa489e8a6e7984d2e6645492
push id2151
push userlsblakk@mozilla.com
push dateTue, 19 Feb 2013 18:06:57 +0000
treeherdermozilla-beta@4952e88741ec [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersgbrown
bugs808410
milestone20.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 808410 - Ensure non-zero return values for robocop tests aren't overwritten by later success; r=gbrown
testing/mochitest/runtestsremote.py
--- a/testing/mochitest/runtestsremote.py
+++ b/testing/mochitest/runtestsremote.py
@@ -491,17 +491,20 @@ def main():
 
             options.app = "am"
             options.browserArgs = ["instrument", "-w", "-e", "deviceroot", deviceRoot, "-e", "class"]
             options.browserArgs.append("%s.tests.%s" % (appname, test['name']))
             options.browserArgs.append("org.mozilla.roboexample.test/%s.FennecInstrumentationTestRunner" % appname)
 
             try:
                 dm.recordLogcat()
-                retVal = mochitest.runTests(options)
+                result = mochitest.runTests(options)
+                # Ensure earlier failures aren't overwritten by success on this run
+                if retVal is None or retVal == 0:
+                    retVal = result
                 mochitest.addLogData()
             except:
                 print "Automation Error: Exception caught while running tests"
                 traceback.print_exc()
                 mochitest.stopWebServer(options)
                 mochitest.stopWebSocketServer(options)
                 try:
                     mochitest.cleanup(None, options)