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

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

Issue 1775163003: Force RevisionState.commit_hash to be a str. (Closed) Base URL: https://chromium.googlesource.com/chromium/tools/build.git@master
Patch Set: Created 4 years, 9 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 | no next file » | 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 """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 52 matching lines...) Expand 10 before | Expand all | Expand 10 after
63 self.test_results_url = None 63 self.test_results_url = None
64 self.build_archived = False 64 self.build_archived = False
65 self.status = RevisionState.NEW 65 self.status = RevisionState.NEW
66 self.next_revision = None 66 self.next_revision = None
67 self.previous_revision = None 67 self.previous_revision = None
68 self.job_name = None 68 self.job_name = None
69 self.patch_file = None 69 self.patch_file = None
70 self.deps_revision = None 70 self.deps_revision = None
71 self.depot_name = depot_name or self.bisector.base_depot 71 self.depot_name = depot_name or self.bisector.base_depot
72 self.depot = depot_config.DEPOT_DEPS_NAME[self.depot_name] 72 self.depot = depot_config.DEPOT_DEPS_NAME[self.depot_name]
73 self.commit_hash = commit_hash 73 self.commit_hash = str(commit_hash)
74 self._rev_str = None 74 self._rev_str = None
75 self.base_revision = base_revision 75 self.base_revision = base_revision
76 if self.base_revision: 76 if self.base_revision:
77 assert self.base_revision.deps_file_contents 77 assert self.base_revision.deps_file_contents
78 self.needs_patch = True 78 self.needs_patch = True
79 self.deps_patch, self.deps_file_contents = self.bisector.make_deps_patch( 79 self.deps_patch, self.deps_file_contents = self.bisector.make_deps_patch(
80 self.base_revision, self.base_revision.deps_file_contents, 80 self.base_revision, self.base_revision.deps_file_contents,
81 self.depot, self.commit_hash) 81 self.depot, self.commit_hash)
82 self.deps_sha = hashlib.sha1(self.deps_patch).hexdigest() 82 self.deps_sha = hashlib.sha1(self.deps_patch).hexdigest()
83 self.deps_sha_patch = self.bisector.make_deps_sha_file(self.deps_sha) 83 self.deps_sha_patch = self.bisector.make_deps_sha_file(self.deps_sha)
(...skipping 429 matching lines...) Expand 10 before | Expand all | Expand 10 after
513 key=lambda x: len(x.values)) 513 key=lambda x: len(x.values))
514 if (len(self.bisector.last_tested_revision.values) == 514 if (len(self.bisector.last_tested_revision.values) ==
515 next_revision_to_test.values): 515 next_revision_to_test.values):
516 self.bisector.last_tested_revision.retest() 516 self.bisector.last_tested_revision.retest()
517 else: 517 else:
518 next_revision_to_test.retest() 518 next_revision_to_test.retest()
519 519
520 def __repr__(self): 520 def __repr__(self):
521 return ('RevisionState(rev=%s, values=%r, mean_value=%r, std_dev=%r)' % ( 521 return ('RevisionState(rev=%s, values=%r, mean_value=%r, std_dev=%r)' % (
522 self.revision_string(), self.values, self.mean_value, self.std_dev)) 522 self.revision_string(), self.values, self.mean_value, self.std_dev))
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698