Chromium Code Reviews| OLD | NEW |
|---|---|
| 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 Loading... | |
| 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') |
| 130 print ABORT_REASON_TEMPLATE % { | 129 print ABORT_REASON_TEMPLATE % { |
| 131 'abort_reason': abort_reason, | 130 'abort_reason': abort_reason, |
| 132 'bug_id': self.opts.bug_id or 'NOT SPECIFIED', | 131 'bug_id': self.opts.bug_id or 'NOT SPECIFIED', |
| 133 'command': self.opts.command, | 132 'command': self.opts.command, |
| 134 'metric': '/'.join(self.opts.metric), | 133 'metric': ('/'.join(self.opts.metric) |
| 134 if self.opts.metric else 'NOT SPECIFIED'), | |
|
qyearsley
2015/06/23 20:47:45
This change could also potentially go in a separat
prasadv
2015/06/23 21:37:48
I think this should be a part of this CL itself
| |
| 135 'good_revision': self.opts.good_revision, | 135 'good_revision': self.opts.good_revision, |
| 136 'bad_revision': self.opts.bad_revision, | 136 'bad_revision': self.opts.bad_revision, |
| 137 } | 137 } |
| 138 self._PrintThankYou() | 138 self._PrintThankYou() |
| 139 if self.opts.output_buildbot_annotations: | 139 if self.opts.output_buildbot_annotations: |
| 140 bisect_utils.OutputAnnotationStepClosed() | 140 bisect_utils.OutputAnnotationStepClosed() |
| 141 | 141 |
| 142 @staticmethod | 142 @staticmethod |
| 143 def _PrintThankYou(): | 143 def _PrintThankYou(): |
| 144 print RESULTS_THANKYOU | 144 print RESULTS_THANKYOU |
| (...skipping 181 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 326 | 326 |
| 327 @staticmethod | 327 @staticmethod |
| 328 def _PrintWarnings(warnings): | 328 def _PrintWarnings(warnings): |
| 329 """Prints a list of warning strings if there are any.""" | 329 """Prints a list of warning strings if there are any.""" |
| 330 if not warnings: | 330 if not warnings: |
| 331 return | 331 return |
| 332 print | 332 print |
| 333 print 'WARNINGS:' | 333 print 'WARNINGS:' |
| 334 for w in set(warnings): | 334 for w in set(warnings): |
| 335 print ' ! %s' % w | 335 print ' ! %s' % w |
| OLD | NEW |