Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(3)

Side by Side Diff: tools/auto_bisect/bisect_printer.py

Issue 1205663002: Make bisect to abort early when the return codes for known good and known bad revisions are same. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 # Copyright 2014 The Chromium Authors. All rights reserved. 1 # Copyright 2014 The Chromium Authors. All rights reserved.
2 # Use of this source code is governed by a BSD-style license that can be 2 # Use of this source code is governed by a BSD-style license that can be
3 # found in the LICENSE file. 3 # found in the LICENSE file.
4 4
5 """This file contains printing-related functionality of the bisect.""" 5 """This file contains printing-related functionality of the bisect."""
6 6
7 import datetime 7 import datetime
8 import re 8 import re
9 9
10 from bisect_results import BisectResults 10 from bisect_results import BisectResults
(...skipping 106 matching lines...) Expand 10 before | Expand all | Expand 10 after
117 bisect_utils.OutputAnnotationStepClosed() 117 bisect_utils.OutputAnnotationStepClosed()
118 118
119 def PrintPartialResults(self, bisect_state): 119 def PrintPartialResults(self, bisect_state):
120 revision_states = bisect_state.GetRevisionStates() 120 revision_states = bisect_state.GetRevisionStates()
121 first_working_rev, last_broken_rev = BisectResults.FindBreakingRevRange( 121 first_working_rev, last_broken_rev = BisectResults.FindBreakingRevRange(
122 revision_states) 122 revision_states)
123 self._PrintTestedCommitsTable(revision_states, first_working_rev, 123 self._PrintTestedCommitsTable(revision_states, first_working_rev,
124 last_broken_rev, 100, final_step=False) 124 last_broken_rev, 100, final_step=False)
125 125
126 def _PrintAbortResults(self, abort_reason): 126 def _PrintAbortResults(self, abort_reason):
127
128 if self.opts.output_buildbot_annotations: 127 if self.opts.output_buildbot_annotations:
129 bisect_utils.OutputAnnotationStepStart('Results') 128 bisect_utils.OutputAnnotationStepStart('Results')
129
130 # Metric string in config is not split in case of return code mode.
131 if (self.opts.metric and
132 self.opts.bisect_mode != bisect_utils.BISECT_MODE_RETURN_CODE):
133 metric = '/'.join(self.opts.metric)
134 else:
135 metric = self.opts.metric
136
130 print ABORT_REASON_TEMPLATE % { 137 print ABORT_REASON_TEMPLATE % {
131 'abort_reason': abort_reason, 138 'abort_reason': abort_reason,
132 'bug_id': self.opts.bug_id or 'NOT SPECIFIED', 139 'bug_id': self.opts.bug_id or 'NOT SPECIFIED',
133 'command': self.opts.command, 140 'command': self.opts.command,
134 'metric': '/'.join(self.opts.metric), 141 'metric': metric,
135 'good_revision': self.opts.good_revision, 142 'good_revision': self.opts.good_revision,
136 'bad_revision': self.opts.bad_revision, 143 'bad_revision': self.opts.bad_revision,
137 } 144 }
138 self._PrintThankYou() 145 self._PrintThankYou()
139 if self.opts.output_buildbot_annotations: 146 if self.opts.output_buildbot_annotations:
140 bisect_utils.OutputAnnotationStepClosed() 147 bisect_utils.OutputAnnotationStepClosed()
141 148
142 @staticmethod 149 @staticmethod
143 def _PrintThankYou(): 150 def _PrintThankYou():
144 print RESULTS_THANKYOU 151 print RESULTS_THANKYOU
(...skipping 181 matching lines...) Expand 10 before | Expand all | Expand 10 after
326 333
327 @staticmethod 334 @staticmethod
328 def _PrintWarnings(warnings): 335 def _PrintWarnings(warnings):
329 """Prints a list of warning strings if there are any.""" 336 """Prints a list of warning strings if there are any."""
330 if not warnings: 337 if not warnings:
331 return 338 return
332 print 339 print
333 print 'WARNINGS:' 340 print 'WARNINGS:'
334 for w in set(warnings): 341 for w in set(warnings):
335 print ' ! %s' % w 342 print ' ! %s' % w
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698