autotest: deploy_server should exit with error code when it fails
Previously, when deploy_server script fails to update lab servers, it
just prints out the fail servers, and exits the program without errors.
It has no issue when we run deploy_server directly to update the
servers, but now we use automated_deploy script to wrap up the manual
steps, deploy_server script should exit with error code when it fails to
break the automated_deploy process and print out the correct error
message.
BUG=chromium:673591
TEST=unittest and test locally
Change-Id: I313d47b0d64886956e60e7c0b53eac0f758590c7
Reviewed-on: https://chromium-review.googlesource.com/419356
Commit-Ready: Aviv Keshet <akeshet@chromium.org>
Tested-by: Shuqian Zhao <shuqianz@chromium.org>
Reviewed-by: Shuqian Zhao <shuqianz@chromium.org>
diff --git a/site_utils/deploy_server.py b/site_utils/deploy_server.py
index 91c949b..4dbd4e6 100755
--- a/site_utils/deploy_server.py
+++ b/site_utils/deploy_server.py
@@ -267,6 +267,8 @@
print('To retry:')
print(' %s <options> %s' %
(str(args[0]), str(' '.join(failed + skipped))))
+ # Exit with error.
+ return 1
if __name__ == '__main__':