Chromium Code Reviews| Index: scripts/slave/recipe_modules/auto_bisect/local_bisect.py |
| diff --git a/scripts/slave/recipe_modules/auto_bisect/local_bisect.py b/scripts/slave/recipe_modules/auto_bisect/local_bisect.py |
| index c5fb2cc8d93d65c0d111a9420be62228f68ddc0e..713c4a1c96da57add25cbf2fbe287972563c8297 100644 |
| --- a/scripts/slave/recipe_modules/auto_bisect/local_bisect.py |
| +++ b/scripts/slave/recipe_modules/auto_bisect/local_bisect.py |
| @@ -8,25 +8,38 @@ import json |
| def perform_bisect(api, **flags): # pragma: no cover |
| - bisect_config = api.m.properties.get('bisect_config') |
| - assert isinstance(bisect_config, collections.Mapping) |
| - bisector = api.create_bisector(bisect_config, **flags) |
| - with api.m.step.nest('Gathering reference values'): |
| - _gather_reference_range(api, bisector) |
| - if (not bisector.failed and bisector.check_improvement_direction() and |
| - bisector.check_initial_confidence()): |
| - if bisector.check_reach_adjacent_revision(bisector.good_rev): |
| - # Only show this step if bisect has reached adjacent revisions. |
| - with api.m.step.nest(str('Check bisect finished on revision ' + |
| - bisector.good_rev.revision_string())): |
| - if bisector.check_bisect_finished(bisector.good_rev): |
| - bisector.bisect_over = True |
| - if not bisector.bisect_over: |
| - _bisect_main_loop(bisector) |
| - else: |
| - bisector.bisect_over = True |
| - bisector.print_result_debug_info() |
| - bisector.post_result(halt_on_failure=True) |
| + try: |
| + bisect_config = api.m.properties.get('bisect_config') |
| + assert isinstance(bisect_config, collections.Mapping) |
| + bisector = api.create_bisector(bisect_config, **flags) |
| + with api.m.step.nest('Gathering reference values'): |
| + _gather_reference_range(api, bisector) |
| + if (not bisector.failed and bisector.check_improvement_direction() and |
| + bisector.check_initial_confidence()): |
| + if bisector.check_reach_adjacent_revision(bisector.good_rev): |
| + # Only show this step if bisect has reached adjacent revisions. |
| + with api.m.step.nest(str('Check bisect finished on revision ' + |
| + bisector.good_rev.revision_string())): |
| + if bisector.check_bisect_finished(bisector.good_rev): |
| + bisector.bisect_over = True |
| + if not bisector.bisect_over: |
| + _bisect_main_loop(bisector) |
| + else: |
| + bisector.bisect_over = True |
| + bisector.print_result_debug_info() |
| + bisector.post_result(halt_on_failure=True) |
| + except api.m.step.StepFailure: |
|
RobertoCN
2016/06/07 22:00:39
Eventually we'd want to make this more specific th
Ziqi Xiong
2016/06/22 17:38:21
Done.
|
| + if api.m.chromium.c.TARGET_PLATFORM == 'android': |
| + api.m.chromium_android.device_status_check() |
| + available_devices = api.m.chromium_android.devices() |
| + if available_devices: |
| + serial_number = available_devices[0] |
|
RobertoCN
2016/06/07 22:00:39
Since we do not know for a fact that the StepFailu
Ziqi Xiong
2016/06/22 17:38:21
Done.
|
| + api.m.chromium_android.test_device = serial_number |
| + perform_bisect(api,**flags) |
| + else: |
| + raise |
| + else: |
| + raise |
| def _gather_reference_range(api, bisector): # pragma: no cover |