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

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

Issue 1062583003: Adding config step to output the bisect config dictionary. (Closed) Base URL: https://chromium.googlesource.com/chromium/tools/build.git@hax
Patch Set: Improving formatting of the output. Created 5 years, 8 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
« no previous file with comments | « no previous file | scripts/slave/recipe_modules/auto_bisect/example.expected/bad_deps_syntax.json » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 json
5 import re 6 import re
6 7
7 from . import bisect_results 8 from . import bisect_results
8 from . import depot_config 9 from . import depot_config
9 10
10 _DEPS_SHA_PATCH = """ 11 _DEPS_SHA_PATCH = """
11 diff --git DEPS.sha DEPS.sha 12 diff --git DEPS.sha DEPS.sha
12 new file mode 100644 13 new file mode 100644
13 --- /dev/null 14 --- /dev/null
14 +++ DEPS.sha 15 +++ DEPS.sha
15 @@ -0,0 +1 @@ 16 @@ -0,0 +1 @@
16 +%(deps_sha)s 17 +%(deps_sha)s
17 """ 18 """
18 19
19 20
20 ZERO_TO_NON_ZERO = 'Zero to non-zero' 21 ZERO_TO_NON_ZERO = 'Zero to non-zero'
21 22
22 23
23 class Bisector(object): 24 class Bisector(object):
24 """This class abstracts an ongoing bisect (or n-sect) job.""" 25 """This class abstracts an ongoing bisect (or n-sect) job."""
25 26
26 def __init__(self, api, bisect_config, revision_class, init_revisions=True): 27 def __init__(self, api, bisect_config, revision_class, init_revisions=True):
27 """Initializes the state of a new bisect job from a dictionary. 28 """Initializes the state of a new bisect job from a dictionary.
28 29
29 Note that the initial good_rev and bad_rev MUST resolve to a commit position 30 Note that the initial good_rev and bad_rev MUST resolve to a commit position
30 in the chromium repo. 31 in the chromium repo.
31 """ 32 """
33 api.m.step('config', ['echo', json.dumps(dict(bisect_config), indent=2)])
qyearsley 2015/04/03 23:47:48 Would it make any difference if you remove dict(),
RobertoCN 2015/04/04 00:40:48 The cast is needed because data is passed as a non
32 super(Bisector, self).__init__() 34 super(Bisector, self).__init__()
33 self._api = api 35 self._api = api
34 self.bisect_config = bisect_config 36 self.bisect_config = bisect_config
35 self.revision_class = revision_class 37 self.revision_class = revision_class
36 38
37 # Test-only properties. 39 # Test-only properties.
38 # TODO: Replace these with proper mod_test_data 40 # TODO: Replace these with proper mod_test_data
39 self.dummy_regression_confidence = bisect_config.get( 41 self.dummy_regression_confidence = bisect_config.get(
40 'dummy_regression_confidence') 42 'dummy_regression_confidence')
41 self.dummy_builds = bisect_config.get('dummy_builds', False) 43 self.dummy_builds = bisect_config.get('dummy_builds', False)
(...skipping 439 matching lines...) Expand 10 before | Expand all | Expand 10 after
481 return 'linux_perf_tester' 483 return 'linux_perf_tester'
482 484
483 def get_builder_bot_for_this_platform(self): 485 def get_builder_bot_for_this_platform(self):
484 # TODO: Actually look at the current platform. 486 # TODO: Actually look at the current platform.
485 return 'linux_perf_bisect_builder' 487 return 'linux_perf_bisect_builder'
486 488
487 def get_platform_gs_prefix(self): 489 def get_platform_gs_prefix(self):
488 # TODO: Actually check the current platform 490 # TODO: Actually check the current platform
489 return 'gs://chrome-perf/Linux Builder/full-build-linux_' 491 return 'gs://chrome-perf/Linux Builder/full-build-linux_'
490 492
OLDNEW
« no previous file with comments | « no previous file | scripts/slave/recipe_modules/auto_bisect/example.expected/bad_deps_syntax.json » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698