fuchsia: Fix qemu script return code on failure

https://build.chromium.org/p/client.crashpad/builders/crashpad_fuchsia_x64_dbg/builds/6
failed in "start qemu", but it wasn't clear that it did because the
script returned 0 when it did so.

Bug: crashpad:196
Change-Id: I7b8f42bc58c273b5b8e9a64e52288b32e9f9addf
Reviewed-on: https://chromium-review.googlesource.com/862990
Commit-Queue: Scott Graham <scottmg@chromium.org>
Reviewed-by: Mark Mentovai <mark@chromium.org>
This commit is contained in:
Scott Graham 2018-01-11 17:36:12 -08:00 committed by Commit Bot
parent 3a07faf171
commit 3bc4156c1e

View File

@ -112,6 +112,8 @@ def _Start(pid_file):
print('instance did not respond after start', file=sys.stderr)
return 1
return 0
def main(args):
if len(args) != 1 or args[0] not in ('start', 'stop'):
@ -123,7 +125,7 @@ def main(args):
pid_file = os.path.join(tempfile.gettempdir(), 'crashpad_fuchsia_qemu_pid')
_Stop(pid_file)
if command == 'start':
_Start(pid_file)
return _Start(pid_file)
return 0