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

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

Issue 1339613005: Refactoring scripts that wait for buildbot jobs to complete. (Closed) Base URL: https://chromium.googlesource.com/chromium/tools/build.git@hax
Patch Set: removing blank line Created 5 years, 2 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 """An interface for holding state and result of revisions in a bisect job. 5 """An interface for holding state and result of revisions in a bisect job.
6 6
7 When implementing support for tests other than perf, one should extend this 7 When implementing support for tests other than perf, one should extend this
8 class so that the bisect module and recipe can use it. 8 class so that the bisect module and recipe can use it.
9 9
10 See perf_revision_state for an example. 10 See perf_revision_state for an example.
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after
64 self.bisector = bisector 64 self.bisector = bisector
65 self._good = None 65 self._good = None
66 self.deps = None 66 self.deps = None
67 self.build_status_url = None 67 self.build_status_url = None
68 self.test_results_url = None 68 self.test_results_url = None
69 self.build_archived = False 69 self.build_archived = False
70 self.status = RevisionState.NEW 70 self.status = RevisionState.NEW
71 self.next_revision = None 71 self.next_revision = None
72 self.previous_revision = None 72 self.previous_revision = None
73 self.revision_string = revision_string 73 self.revision_string = revision_string
74 self.build_job_name = None 74 self.job_name = None
75 self.test_job_name = None
76 self.patch_file = None 75 self.patch_file = None
77 self.deps_revision = None 76 self.deps_revision = None
78 if not self.revision_string: 77 if not self.revision_string:
79 assert base_revision 78 assert base_revision
80 assert base_revision.deps_file_contents 79 assert base_revision.deps_file_contents
81 assert depot != 'chromium' 80 assert depot != 'chromium'
82 assert deps_revision 81 assert deps_revision
83 self.needs_patch = True 82 self.needs_patch = True
84 self.depot = depot 83 self.depot = depot
85 self.revision_string = (base_revision.revision_string + ',' + 84 self.revision_string = (base_revision.revision_string + ',' +
(...skipping 223 matching lines...) Expand 10 before | Expand all | Expand 10 after
309 return result 308 return result
310 309
311 def _get_hash_from_pos(self, pos): 310 def _get_hash_from_pos(self, pos):
312 api = self.bisector.api 311 api = self.bisector.api
313 try: 312 try:
314 result = api.m.commit_position.chromium_hash_from_commit_position(pos) 313 result = api.m.commit_position.chromium_hash_from_commit_position(pos)
315 except api.m.step.StepFailure as sf: 314 except api.m.step.StepFailure as sf:
316 api.m.halt('Failed to resolve commit position - ' + sf.reason) 315 api.m.halt('Failed to resolve commit position - ' + sf.reason)
317 raise 316 raise
318 return result 317 return result
OLDNEW
« no previous file with comments | « scripts/slave/recipe_modules/auto_bisect/resources/wait_for_any.py ('k') | scripts/slave/recipes/bisect.expected/basic.json » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698