From e05ad4400c41dd49e4f61d5a00c6145109a244eb Mon Sep 17 00:00:00 2001 From: Andrew Halberstadt Date: Fri, 7 Dec 2012 11:37:16 -0500 Subject: [PATCH] Bug 818638 - B2G xpcshell shouldn't abort entire test run on single test timeout, r=jgriffin, DONTBUILD a=NPOTB,test-only --- testing/xpcshell/runtestsb2g.py | 20 ++++++++++++-------- 1 file changed, 12 insertions(+), 8 deletions(-) diff --git a/testing/xpcshell/runtestsb2g.py b/testing/xpcshell/runtestsb2g.py index fca41ccc83f..063f07f877e 100644 --- a/testing/xpcshell/runtestsb2g.py +++ b/testing/xpcshell/runtestsb2g.py @@ -65,14 +65,18 @@ class B2GXPCShellRemote(XPCShellRemote): XPCShellRemote.setLD_LIBRARY_PATH(self, env) # Overridden - # This returns 1 even when tests pass - this is why it's switched to 0 - # https://bugzilla.mozilla.org/show_bug.cgi?id=773703 - def getReturnCode(self, proc): -# if self.shellReturnCode is not None: -# return self.shellReturnCode -# return -1 - return 0 - + def launchProcess(self, cmd, stdout, stderr, env, cwd): + try: + # This returns 1 even when tests pass - hardcode returncode to 0 (bug 773703) + outputFile = XPCShellRemote.launchProcess(self, cmd, stdout, stderr, env, cwd) + self.shellReturnCode = 0 + except DMError: + self.shellReturnCode = -1 + outputFile = "xpcshelloutput" + f = open(outputFile, "a") + f.write("\n%s" % traceback.format_exc()) + f.close() + return outputFile class B2GOptions(RemoteXPCShellOptions):