зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1503687 - Avoid python attribute errors for some infrequent xpcshell timeouts; r=jmaher
This commit is contained in:
Родитель
531924a924
Коммит
e3b449c2d6
|
@ -227,7 +227,9 @@ class XPCShellTestThread(Thread):
|
||||||
Simple wrapper to get the return code for a given process.
|
Simple wrapper to get the return code for a given process.
|
||||||
On a remote system we overload this to work with the remote process management.
|
On a remote system we overload this to work with the remote process management.
|
||||||
"""
|
"""
|
||||||
|
if proc is not None and hasattr(proc, "returncode"):
|
||||||
return proc.returncode
|
return proc.returncode
|
||||||
|
return -1
|
||||||
|
|
||||||
def communicate(self, proc):
|
def communicate(self, proc):
|
||||||
"""
|
"""
|
||||||
|
@ -284,7 +286,10 @@ class XPCShellTestThread(Thread):
|
||||||
self.log.info("%s | environment: %s" % (name, list(changedEnv)))
|
self.log.info("%s | environment: %s" % (name, list(changedEnv)))
|
||||||
|
|
||||||
def killTimeout(self, proc):
|
def killTimeout(self, proc):
|
||||||
|
if proc is not None and hasattr(proc, "pid"):
|
||||||
mozcrash.kill_and_get_minidump(proc.pid, self.tempDir, utility_path=self.utility_path)
|
mozcrash.kill_and_get_minidump(proc.pid, self.tempDir, utility_path=self.utility_path)
|
||||||
|
else:
|
||||||
|
self.log.info("not killing -- proc or pid unknown")
|
||||||
|
|
||||||
def postCheck(self, proc):
|
def postCheck(self, proc):
|
||||||
"""Checks for a still-running test process, kills it and fails the test if found.
|
"""Checks for a still-running test process, kills it and fails the test if found.
|
||||||
|
|
Загрузка…
Ссылка в новой задаче