chrome-sdk: exit with the exit code of the command being run.
An error code from a command being executed in the chrome SDK
environment should be passed through by the SDK. So have the SDK exit
with the exit code of the command it is running.
BUG=None
TEST=Local
Change-Id: I31a100e06c775b22fc151fbb283b57e579819dd3
Reviewed-on: https://gerrit.chromium.org/gerrit/64799
Commit-Queue: Ryan Cui <rcui@chromium.org>
Reviewed-by: Ryan Cui <rcui@chromium.org>
Tested-by: Ryan Cui <rcui@chromium.org>
diff --git a/scripts/cros.py b/scripts/cros.py
index eb5ab76..39af59c 100644
--- a/scripts/cros.py
+++ b/scripts/cros.py
@@ -28,7 +28,7 @@
def _RunSubCommand(subcommand):
"""Helper function for testing purposes."""
- subcommand.Run()
+ return subcommand.Run()
def main(argv):
@@ -50,6 +50,8 @@
subcommand.upload_stats_timeout])
# TODO: to make command completion faster, send an interrupt signal to the
# stats uploader task after the subcommand completes.
- _RunSubCommand(subcommand)
+ code = _RunSubCommand(subcommand)
+ if code is not None:
+ return code
return 0