Bug 997244 - Move emulator.py out of marionette and into mozrunner, r=wlach,mdas,jgriffin

This commit is contained in:
Andrew Halberstadt
2014-06-19 14:17:26 -04:00
parent 09caaa3584
commit df364bfcf8
69 changed files with 1842 additions and 1927 deletions

View File

@@ -232,11 +232,13 @@ class XPCShellTestThread(Thread):
return proc.communicate()
def launchProcess(self, cmd, stdout, stderr, env, cwd):
def launchProcess(self, cmd, stdout, stderr, env, cwd, timeout=None):
"""
Simple wrapper to launch a process.
On a remote system, this is more complex and we need to overload this function.
"""
# timeout is needed by remote and b2g xpcshell to extend the
# devicemanager.shell() timeout. It is not used in this function.
if HAVE_PSUTIL:
popen_func = psutil.Popen
else:
@@ -623,7 +625,7 @@ class XPCShellTestThread(Thread):
startTime = time.time()
proc = self.launchProcess(completeCmd,
stdout=self.pStdout, stderr=self.pStderr, env=self.env, cwd=test_dir)
stdout=self.pStdout, stderr=self.pStderr, env=self.env, cwd=test_dir, timeout=testTimeoutInterval)
if self.interactive:
self.log.info("TEST-INFO | %s | Process ID: %d" % (name, proc.pid))