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

Unified Diff: tools/auto_bisect/bisect_printer.py

Issue 697713003: Aborting bisect early when the bug specified in the bisect config is closed. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Removing type=str since it's the default and rebasing Created 6 years, 1 month 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « tools/auto_bisect/bisect_perf_regression.py ('k') | tools/auto_bisect/bisect_results.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/auto_bisect/bisect_printer.py
diff --git a/tools/auto_bisect/bisect_printer.py b/tools/auto_bisect/bisect_printer.py
index ecac6eb29dbda47715db3109ef7b9502db234c14..f58c28f324a8748537a34a266e176aa032aff21a 100644
--- a/tools/auto_bisect/bisect_printer.py
+++ b/tools/auto_bisect/bisect_printer.py
@@ -24,6 +24,20 @@ Test Metric: %(metrics)s
Relative Change: %(change)s
Estimated Confidence: %(confidence).02f%%"""
+# When the bisect was aborted without a bisect failure the following template
+# is used.
+ABORT_REASON_TEMPLATE = """
+===== BISECTION ABORTED =====
+The bisect was aborted because %(abort_reason)s
+Please contact the the team (see below) if you believe this is in error.
+
+Bug ID: %(bug_id)s
+
+Test Command: %(command)s
+Test Metric: %(metric)s
+Good revision: %(good_revision)s
+Bad revision: %(bad_revision)s """
+
# The perf dashboard specifically looks for the string
# "Author : " to parse out who to cc on a bug. If you change the
# formatting here, please update the perf dashboard as well.
@@ -87,6 +101,10 @@ class BisectPrinter(object):
Args:
bisect_results: BisectResult object containing results to be printed.
"""
+ if bisect_results.abort_reason:
+ self._PrintAbortResults(bisect_results.abort_reason)
+ return
+
if self.opts.output_buildbot_annotations:
bisect_utils.OutputAnnotationStepStart('Build Status Per Revision')
@@ -137,6 +155,22 @@ class BisectPrinter(object):
self._PrintTestedCommitsTable(revision_states, first_working_rev,
last_broken_rev, 100, final_step=False)
+ def _PrintAbortResults(self, abort_reason):
+
+ if self.opts.output_buildbot_annotations:
+ bisect_utils.OutputAnnotationStepStart('Results')
+ print ABORT_REASON_TEMPLATE % {
+ 'abort_reason': abort_reason,
+ 'bug_id': self.opts.bug_id or 'NOT SPECIFIED',
+ 'command': self.opts.command,
+ 'metric': '/'.join(self.opts.metric),
+ 'good_revision': self.opts.good_revision,
+ 'bad_revision': self.opts.bad_revision,
+ }
+ self._PrintThankYou()
+ if self.opts.output_buildbot_annotations:
+ bisect_utils.OutputAnnotationStepClosed()
+
@staticmethod
def _PrintThankYou():
print RESULTS_THANKYOU
« no previous file with comments | « tools/auto_bisect/bisect_perf_regression.py ('k') | tools/auto_bisect/bisect_results.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698