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:
Kevin Cox 2014-03-23 10:20:32 -04:00
Родитель b253190ddb
Коммит a844a7ae48
1 изменённых файлов: 124 добавлений и 121 удалений

Просмотреть файл

@ -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)