| OLD | NEW |
| 1 # Copyright 2015 The Chromium Authors. All rights reserved. | 1 # Copyright 2015 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 import base64 | 5 import base64 |
| 6 import collections | 6 import collections |
| 7 import json | 7 import json |
| 8 | 8 |
| 9 | 9 |
| 10 def perform_bisect(api): # pragma: no cover | 10 def perform_bisect(api): # pragma: no cover |
| (...skipping 17 matching lines...) Expand all Loading... |
| 28 bisector.bisect_over = True | 28 bisector.bisect_over = True |
| 29 bisector.print_result_debug_info() | 29 bisector.print_result_debug_info() |
| 30 bisector.print_result() | 30 bisector.print_result() |
| 31 | 31 |
| 32 | 32 |
| 33 def _ensure_checkout(api): # pragma: no cover | 33 def _ensure_checkout(api): # pragma: no cover |
| 34 mastername = api.m.properties.get('mastername') | 34 mastername = api.m.properties.get('mastername') |
| 35 buildername = api.m.properties.get('buildername') | 35 buildername = api.m.properties.get('buildername') |
| 36 # TODO(akuegel): Explicitly load the configs for the builders and don't rely | 36 # TODO(akuegel): Explicitly load the configs for the builders and don't rely |
| 37 # on builders.py in chromium_tests recipe module. | 37 # on builders.py in chromium_tests recipe module. |
| 38 api.m.chromium_tests.configure_build(mastername, buildername) | 38 bot_desc = api.m.chromium_tests.create_bot_desc(mastername, buildername) |
| 39 api.m.chromium_tests.prepare_checkout(mastername, buildername) | 39 api.m.chromium_tests.configure_build(bot_desc) |
| 40 api.m.chromium_tests.prepare_checkout(bot_desc) |
| 40 | 41 |
| 41 | 42 |
| 42 def _gather_reference_range(api, bisector): # pragma: no cover | 43 def _gather_reference_range(api, bisector): # pragma: no cover |
| 43 bisector.good_rev.start_job() | 44 bisector.good_rev.start_job() |
| 44 bisector.bad_rev.start_job() | 45 bisector.bad_rev.start_job() |
| 45 bisector.wait_for_all([bisector.good_rev, bisector.bad_rev]) | 46 bisector.wait_for_all([bisector.good_rev, bisector.bad_rev]) |
| 46 if bisector.good_rev.failed: | 47 if bisector.good_rev.failed: |
| 47 bisector.surface_result('REF_RANGE_FAIL') | 48 bisector.surface_result('REF_RANGE_FAIL') |
| 48 api.m.halt('Testing the "good" revision failed') | 49 api.m.halt('Testing the "good" revision failed') |
| 49 bisector.failed = True | 50 bisector.failed = True |
| (...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 108 revisions_to_check.remove(completed_revision) | 109 revisions_to_check.remove(completed_revision) |
| 109 else: | 110 else: |
| 110 bisector.api.m.step.active_result.presentation.status = ( | 111 bisector.api.m.step.active_result.presentation.status = ( |
| 111 bisector.api.m.step.WARNING) | 112 bisector.api.m.step.WARNING) |
| 112 bisector.api.m.step.active_result.presentation.logs['WARNING'] = ( | 113 bisector.api.m.step.active_result.presentation.logs['WARNING'] = ( |
| 113 ['Tried to remove revision not in list']) | 114 ['Tried to remove revision not in list']) |
| 114 if not (completed_revision.aborted or completed_revision.failed): | 115 if not (completed_revision.aborted or completed_revision.failed): |
| 115 completed_revisions.append(completed_revision) | 116 completed_revisions.append(completed_revision) |
| 116 bisector.abort_unnecessary_jobs() | 117 bisector.abort_unnecessary_jobs() |
| 117 return completed_revisions | 118 return completed_revisions |
| OLD | NEW |