Commit bc64fa74 authored by Yoland Yan's avatar Yoland Yan Committed by Commit Bot

Fix recover device before last retry when 0 retries is specified

This fix the attempt to recover device when `--num_retries=0` is
specified locally

Change-Id: Ie73a62afd13835dbdd3f18716bc3a2ea0ca59434
Reviewed-on: https://chromium-review.googlesource.com/726848
Commit-Queue: Yoland Yan <yolandyan@chromium.org>
Reviewed-by: default avatarBenjamin Pastene <bpastene@chromium.org>
Reviewed-by: default avatarJohn Budorick <jbudorick@chromium.org>
Cr-Commit-Position: refs/heads/master@{#509935}
parent a1bff011
...@@ -105,7 +105,7 @@ class LocalDeviceTestRun(test_run.TestRun): ...@@ -105,7 +105,7 @@ class LocalDeviceTestRun(test_run.TestRun):
results = [] results = []
while tries < self._env.max_tries and tests: while tries < self._env.max_tries and tests:
logging.info('STARTING TRY #%d/%d', tries + 1, self._env.max_tries) logging.info('STARTING TRY #%d/%d', tries + 1, self._env.max_tries)
if tries + 1 == self._env.max_tries: if tries > 0 and tries + 1 == self._env.max_tries:
logging.info( logging.info(
'Attempting to recover devices prior to last test attempt.') 'Attempting to recover devices prior to last test attempt.')
self._env.parallel_devices.pMap(device_recovery.RecoverDevice, None) self._env.parallel_devices.pMap(device_recovery.RecoverDevice, None)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment