Bug 1252556 - Make profileserver.py fail when running Firefox fails. r=chmanchester

Currently, when Firefox crashes when running the PGO profile, the error
is ignored, and the result is a build that is not optimized as expected.
So instead of such things going unnoticed, we make profileserver.py
return an error code, further failing the build.

Unfortunately, this does not make the output useful to know what went
wrong exactly, but the most important thing is that the build fails
instead of going through and leading to bad results.
This commit is contained in:
Mike Hommey 2017-11-02 08:59:23 +09:00
Родитель ecdcceaf6a
Коммит 1e64a78760
1 изменённых файлов: 11 добавлений и 2 удалений

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

@ -6,6 +6,7 @@
import json
import os
import sys
from buildconfig import substs
from mozbuild.base import MozbuildObject
@ -96,7 +97,12 @@ if __name__ == '__main__':
cmdargs=['data:text/html,<script>Quitter.quit()</script>'],
env=env)
runner.start()
runner.wait()
ret = runner.wait()
if ret:
print("Firefox exited with code %d during profile initialization"
% ret)
httpd.stop()
sys.exit(ret)
jarlog = os.getenv("JARLOG_FILE")
if jarlog:
@ -109,5 +115,8 @@ if __name__ == '__main__':
cmdargs=cmdargs,
env=env)
runner.start(debug_args=debug_args, interactive=interactive)
runner.wait()
ret = runner.wait()
httpd.stop()
if ret:
print("Firefox exited with code %d during profiling" % ret)
sys.exit(ret)