From 65cb7733405f7c52f0d6f832d7a6b3c090991222 Mon Sep 17 00:00:00 2001 From: Shing Lyu Date: Wed, 10 May 2017 10:38:48 +0800 Subject: [PATCH] Bug 1359288 - Enable Android reftest to resume from crashes. r=jmaher MozReview-Commit-ID: EqTOdEwfTWi --HG-- extra : rebase_source : 36837b43159f484f911cf5183d81c3440d59736a --- build/automation.py.in | 2 +- layout/tools/reftest/remotereftest.py | 20 ++++++++++---------- testing/mochitest/runrobocop.py | 2 +- testing/mochitest/runtests.py | 4 ++-- testing/mochitest/runtestsremote.py | 3 ++- 5 files changed, 16 insertions(+), 15 deletions(-) diff --git a/build/automation.py.in b/build/automation.py.in index 234bc54fa334..8e7afcfeecab 100644 --- a/build/automation.py.in +++ b/build/automation.py.in @@ -585,7 +585,7 @@ class Automation(object): if os.path.exists(processLog): os.unlink(processLog) - return status + return status, self.lastTestSeen def elf_arm(self, filename): data = open(filename, 'rb').read(20) diff --git a/layout/tools/reftest/remotereftest.py b/layout/tools/reftest/remotereftest.py index c58d57cb58d2..549ab295d074 100644 --- a/layout/tools/reftest/remotereftest.py +++ b/layout/tools/reftest/remotereftest.py @@ -312,16 +312,16 @@ class RemoteReftest(RefTest): timeout=None, debuggerInfo=None, symbolsPath=None, options=None, valgrindPath=None, valgrindArgs=None, valgrindSuppFiles=None): - status = self.automation.runApp(None, env, - binary, - profile.profile, - cmdargs, - utilityPath=options.utilityPath, - xrePath=options.xrePath, - debuggerInfo=debuggerInfo, - symbolsPath=symbolsPath, - timeout=timeout) - return status, None + status, lastTestSeen = self.automation.runApp(None, env, + binary, + profile.profile, + cmdargs, + utilityPath=options.utilityPath, + xrePath=options.xrePath, + debuggerInfo=debuggerInfo, + symbolsPath=symbolsPath, + timeout=timeout) + return status, lastTestSeen def cleanup(self, profileDir): # Pull results back from device diff --git a/testing/mochitest/runrobocop.py b/testing/mochitest/runrobocop.py index 60f9939089ac..6099955401da 100644 --- a/testing/mochitest/runrobocop.py +++ b/testing/mochitest/runrobocop.py @@ -459,7 +459,7 @@ class RobocopTestRunner(MochitestDesktop): timeout = self.options.timeout if not timeout: timeout = self.NO_OUTPUT_TIMEOUT - result = self.auto.runApp( + result, _ = self.auto.runApp( None, browserEnv, "am", self.localProfile, browserArgs, timeout=timeout, symbolsPath=self.options.symbolsPath) self.log.debug("runApp completes with status %d" % result) diff --git a/testing/mochitest/runtests.py b/testing/mochitest/runtests.py index 5281cabe551a..66ca39267102 100644 --- a/testing/mochitest/runtests.py +++ b/testing/mochitest/runtests.py @@ -2168,7 +2168,7 @@ toolbar#nav-bar { os.remove(processLog) self.urlOpts = [] - return status + return status, self.lastTestSeen def initializeLooping(self, options): """ @@ -2489,7 +2489,7 @@ toolbar#nav-bar { self.log.info("runtests.py | Running with e10s: {}".format(options.e10s)) self.log.info("runtests.py | Running tests: start.\n") - ret = self.runApp( + ret, _ = self.runApp( testURL, self.browserEnv, options.app, diff --git a/testing/mochitest/runtestsremote.py b/testing/mochitest/runtestsremote.py index 0de585675c1d..4fc58f6a1e12 100644 --- a/testing/mochitest/runtestsremote.py +++ b/testing/mochitest/runtestsremote.py @@ -286,7 +286,8 @@ class MochiRemote(MochitestDesktop): # remove args not supported by automation.py kwargs.pop('marionette_args', None) - return self._automation.runApp(*args, **kwargs) + ret, _ = self._automation.runApp(*args, **kwargs) + return ret, None def run_test_harness(parser, options):