зеркало из https://github.com/mozilla/gecko-dev.git
Bug 958897 - ssltunnel lives if mochitest killed. r=jmaher
[PATCH] Made Mochitest.runApp() clean up after itself in case of exception
This commit is contained in:
Родитель
b253190ddb
Коммит
a844a7ae48
|
@ -907,6 +907,8 @@ class Mochitest(MochitestUtilsMixin):
|
|||
# copy env so we don't munge the caller's environment
|
||||
env = env.copy()
|
||||
|
||||
# make sure we clean up after ourselves.
|
||||
try:
|
||||
# set process log environment variable
|
||||
tmpfd, processLog = tempfile.mkstemp(suffix='pidlog')
|
||||
os.close(tmpfd)
|
||||
|
@ -1045,6 +1047,7 @@ class Mochitest(MochitestUtilsMixin):
|
|||
if crashed or zombieProcesses:
|
||||
status = 1
|
||||
|
||||
finally:
|
||||
# cleanup
|
||||
if os.path.exists(processLog):
|
||||
os.remove(processLog)
|
||||
|
|
Загрузка…
Ссылка в новой задаче