aboutsummaryrefslogtreecommitdiff
path: root/image_chromeos.py
diff options
context:
space:
mode:
authorcmtice <cmtice@google.com>2014-01-13 13:22:37 -0800
committerchrome-internal-fetch <chrome-internal-fetch@google.com>2014-01-15 03:32:29 +0000
commitb134008563f05bc3595f5b22f2a5e0b866e43c15 (patch)
tree53c2652546ddf21b18e6d4f0fb758c47d95c3dc3 /image_chromeos.py
parenta6255d058ecf1fe6e9983bb5acf7bec5213c1317 (diff)
downloadtoolchain-utils-b134008563f05bc3595f5b22f2a5e0b866e43c15.tar.gz
Add timeout to image_chromeos call to bin/cros_image_to_target.py, to
handle flaky hangs by that script. Also add 2 retries. BUG=None TEST=Ran image_chromeos.py with modification and it worked. Change-Id: Ib9f772b34862704255018bb68b563f721eb4fe3e Reviewed-on: https://chrome-internal-review.googlesource.com/151776 Reviewed-by: Luis Lozano <llozano@chromium.org> Commit-Queue: Caroline Tice <cmtice@google.com> Tested-by: Caroline Tice <cmtice@google.com>
Diffstat (limited to 'image_chromeos.py')
-rwxr-xr-ximage_chromeos.py9
1 files changed, 8 insertions, 1 deletions
diff --git a/image_chromeos.py b/image_chromeos.py
index d5d5f7fe..1e061cdd 100755
--- a/image_chromeos.py
+++ b/image_chromeos.py
@@ -147,7 +147,14 @@ def DoImage(argv):
# Workaround for crosbug.com/35684.
os.chmod(misc.GetChromeOSKeyFile(options.chromeos_root), 0600)
retval = cmd_executer.ChrootRunCommand(options.chromeos_root,
- command)
+ command, command_timeout=600)
+
+ retries = 0
+ while retval != 0 and retries < 2:
+ retries += 1
+ retval = cmd_executer.ChrootRunCommand(options.chromeos_root,
+ command, command_timeout=600)
+
if found == False:
temp_dir = os.path.dirname(located_image)
l.LogOutput("Deleting temp image dir: %s" % temp_dir)