aboutsummaryrefslogtreecommitdiff
path: root/binary_search_tool
diff options
context:
space:
mode:
authorCassidy Burden <cburden@google.com>2016-06-14 15:23:53 -0700
committerchrome-bot <chrome-bot@chromium.org>2016-06-14 17:07:29 -0700
commit51ba54f3375c17e2a33c1854b635b144802457a4 (patch)
tree92bbf248b279059ae0fc8c2c6faa7481f235af37 /binary_search_tool
parent4ddf846fc0f8f3ea261b608e473cbd781aad1109 (diff)
downloadtoolchain-utils-51ba54f3375c17e2a33c1854b635b144802457a4.tar.gz
Fix binary search tool tester to process output correctly
Fix the unit tests so that they run tail on the correct logs. Also fix edge case when only one bad item is found. Change-Id: I31f34755440af51a8a2310d9393aa87dc852c31d Reviewed-on: https://chrome-internal-review.googlesource.com/264695 Commit-Ready: Cassidy Burden <cburden@google.com> Tested-by: Cassidy Burden <cburden@google.com> Reviewed-by: Luis Lozano <llozano@chromium.org>
Diffstat (limited to 'binary_search_tool')
-rwxr-xr-xbinary_search_tool/binary_search_state.py2
-rwxr-xr-xbinary_search_tool/test/binary_search_tool_tester.py2
2 files changed, 2 insertions, 2 deletions
diff --git a/binary_search_tool/binary_search_state.py b/binary_search_tool/binary_search_state.py
index a05bb60b..ecb3dd7e 100755
--- a/binary_search_tool/binary_search_state.py
+++ b/binary_search_tool/binary_search_state.py
@@ -163,7 +163,7 @@ class BinarySearchState(object):
if prune_index == len(self.all_items) - 1:
self.l.LogOutput('First bad item is the last item. Breaking.')
- self.l.LogOutput('Only bad item is: %s' % self.all_items[-1])
+ self.l.LogOutput('Bad items are: %s' % self.all_items[-1])
break
num_bad_items = len(self.all_items) - prune_index
diff --git a/binary_search_tool/test/binary_search_tool_tester.py b/binary_search_tool/test/binary_search_tool_tester.py
index effa1369..73ea4d13 100755
--- a/binary_search_tool/test/binary_search_tool_tester.py
+++ b/binary_search_tool/test/binary_search_tool_tester.py
@@ -101,7 +101,7 @@ class BisectingUtilsTest(unittest.TestCase):
def check_output(self):
_, out, _ = command_executer.GetCommandExecuter().RunCommandWOutput(
- 'tail -n 10 logs/binary_search_state.py.out')
+ 'tail -n 10 logs/binary_search_tool_tester.py.out')
ls = out.splitlines()
for l in ls:
t = l.find('Bad items are: ')