aboutsummaryrefslogtreecommitdiff
path: root/binary_search_tool
diff options
context:
space:
mode:
authorCaroline Tice <cmtice@google.com>2016-09-27 10:54:16 -0700
committerchrome-bot <chrome-bot@chromium.org>2016-09-28 15:49:55 -0700
commit0a6266710aa7133cb8ef105575b8fb9e74f7896d (patch)
treef64d39f1e47b74cd98b8f9db57c09da43ef14dd4 /binary_search_tool
parent33b6586b464e590d85781f63bd6bca9518deeaf4 (diff)
downloadtoolchain-utils-0a6266710aa7133cb8ef105575b8fb9e74f7896d.tar.gz
[bisection tool] Don't make failure to flash bad image fatal error.
Currently during initial setup, if the known 'bad' image fails to flash onto the device, the user is given the option to 'skip'. This causes the entire bisection to fail/stop. This CL changes the skip to allow bisection to continue (it is not unreasonable for a bad image to fail to flash). BUG=chromium:641539 TEST=None Change-Id: Iddc5312ecf593192d563766d677e8d401824ae7d Reviewed-on: https://chrome-internal-review.googlesource.com/290617 Commit-Ready: Caroline Tice <cmtice@google.com> Tested-by: Caroline Tice <cmtice@google.com> Reviewed-by: Yunlian Jiang <yunlian@google.com> Reviewed-by: Ting-Yuan Huang <laszio@google.com>
Diffstat (limited to 'binary_search_tool')
-rwxr-xr-xbinary_search_tool/binary_search_state.py7
1 files changed, 5 insertions, 2 deletions
diff --git a/binary_search_tool/binary_search_state.py b/binary_search_tool/binary_search_state.py
index a04d04da..8356d93e 100755
--- a/binary_search_tool/binary_search_state.py
+++ b/binary_search_tool/binary_search_state.py
@@ -209,8 +209,11 @@ class BinarySearchState(object):
self.l.LogOutput('Resetting all items to bad to verify.')
self.SwitchToBad(self.all_items)
status = self.TestSetupScript()
- assert status == 0, 'When reset_to_bad, test setup should succeed.'
- status = self.TestScript()
+ # The following assumption is not true; a bad image might not
+ # successfully push onto a device.
+ # assert status == 0, 'When reset_to_bad, test setup should succeed.'
+ if status == 0:
+ status = self.TestScript()
assert status == 1, 'When reset_to_bad, status should be 1.'
def DoSearch(self):