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

Side by Side Diff: scripts/slave/recipe_modules/auto_bisect/local_bisect.py

Issue 2013133002: Avoid nesting steps called under waiting for x: (Closed) Base URL: https://chromium.googlesource.com/chromium/tools/build.git@master
Patch Set: Hiding changes behind optional parameter Created 4 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 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, **flags): # pragma: no cover
11 bisect_config = api.m.properties.get('bisect_config') 11 bisect_config = api.m.properties.get('bisect_config')
12 assert isinstance(bisect_config, collections.Mapping) 12 assert isinstance(bisect_config, collections.Mapping)
13 bisector = api.create_bisector(bisect_config) 13 bisector = api.create_bisector(bisect_config, **flags)
14 with api.m.step.nest('Gathering reference values'): 14 with api.m.step.nest('Gathering reference values'):
15 _gather_reference_range(api, bisector) 15 _gather_reference_range(api, bisector)
16 if (not bisector.failed and bisector.check_improvement_direction() and 16 if (not bisector.failed and bisector.check_improvement_direction() and
17 bisector.check_initial_confidence()): 17 bisector.check_initial_confidence()):
18 if bisector.check_reach_adjacent_revision(bisector.good_rev): 18 if bisector.check_reach_adjacent_revision(bisector.good_rev):
19 # Only show this step if bisect has reached adjacent revisions. 19 # Only show this step if bisect has reached adjacent revisions.
20 with api.m.step.nest(str('Check bisect finished on revision ' + 20 with api.m.step.nest(str('Check bisect finished on revision ' +
21 bisector.good_rev.revision_string())): 21 bisector.good_rev.revision_string())):
22 if bisector.check_bisect_finished(bisector.good_rev): 22 if bisector.check_bisect_finished(bisector.good_rev):
23 bisector.bisect_over = True 23 bisector.bisect_over = True
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
64 revision_to_check.start_job() 64 revision_to_check.start_job()
65 bisector.wait_for(revision_to_check) 65 bisector.wait_for(revision_to_check)
66 66
67 if bisector.check_reach_adjacent_revision(revision_to_check): 67 if bisector.check_reach_adjacent_revision(revision_to_check):
68 # Only show this step if bisect has reached adjacent revisions. 68 # Only show this step if bisect has reached adjacent revisions.
69 with bisector.api.m.step.nest( 69 with bisector.api.m.step.nest(
70 str('Check bisect finished on revision ' + 70 str('Check bisect finished on revision ' +
71 revision_to_check.revision_string())): 71 revision_to_check.revision_string())):
72 if bisector.check_bisect_finished(revision_to_check): 72 if bisector.check_bisect_finished(revision_to_check):
73 bisector.bisect_over = True 73 bisector.bisect_over = True
OLDNEW
« no previous file with comments | « scripts/slave/recipe_modules/auto_bisect/example.expected/windows_x64_bisector.json ('k') | scripts/slave/recipes/bisect.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698