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

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

Issue 2227783002: auto_bisect: fix path for checking DEPS (Closed) Base URL: https://chromium.googlesource.com/chromium/tools/build.git@master
Patch Set: Created 4 years, 4 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 138 matching lines...) Expand 10 before | Expand all | Expand 10 after
149 self._do_test() 149 self._do_test()
150 self.status = RevisionState.TESTING 150 self.status = RevisionState.TESTING
151 151
152 def deps_change(self): 152 def deps_change(self):
153 """Uses `git show` to see if a given commit contains a DEPS change.""" 153 """Uses `git show` to see if a given commit contains a DEPS change."""
154 # Avoid checking DEPS changes for dependency repo revisions. 154 # Avoid checking DEPS changes for dependency repo revisions.
155 # crbug.com/580681 155 # crbug.com/580681
156 if self.needs_patch: # pragma: no cover 156 if self.needs_patch: # pragma: no cover
157 return False 157 return False
158 api = self.bisector.api 158 api = self.bisector.api
159 cwd = api.m.path['slave_build'].join( 159 working_dir = api.working_dir or api.m.path['slave_build']
160 cwd = working_dir.join(
160 depot_config.DEPOT_DEPS_NAME[self.depot_name]['src']) 161 depot_config.DEPOT_DEPS_NAME[self.depot_name]['src'])
161 name = 'Checking DEPS for ' + self.commit_hash 162 name = 'Checking DEPS for ' + self.commit_hash
162 step_result = api.m.git( 163 step_result = api.m.git(
163 'show', '--name-only', '--pretty=format:', 164 'show', '--name-only', '--pretty=format:',
164 self.commit_hash, cwd=cwd, stdout=api.m.raw_io.output(), name=name) 165 self.commit_hash, cwd=cwd, stdout=api.m.raw_io.output(), name=name)
165 if self.bisector.dummy_builds and not self.commit_hash.startswith('dcdc'): 166 if self.bisector.dummy_builds and not self.commit_hash.startswith('dcdc'):
166 return False 167 return False
167 if 'DEPS' in step_result.stdout.splitlines(): # pragma: no cover 168 if 'DEPS' in step_result.stdout.splitlines(): # pragma: no cover
168 return True 169 return True
169 return False # pragma: no cover 170 return False # pragma: no cover
(...skipping 417 matching lines...) Expand 10 before | Expand all | Expand 10 after
587 else: 588 else:
588 next_revision_to_test.retest() 589 next_revision_to_test.retest()
589 590
590 def __repr__(self): 591 def __repr__(self):
591 if self.overall_return_code is not None: 592 if self.overall_return_code is not None:
592 return ('RevisionState(rev=%s, values=%r, overall_return_code=%r, ' 593 return ('RevisionState(rev=%s, values=%r, overall_return_code=%r, '
593 'std_dev=%r)') % (self.revision_string(), self.values, 594 'std_dev=%r)') % (self.revision_string(), self.values,
594 self.overall_return_code, self.std_dev) 595 self.overall_return_code, self.std_dev)
595 return ('RevisionState(rev=%s, values=%r, mean_value=%r, std_dev=%r)' % ( 596 return ('RevisionState(rev=%s, values=%r, mean_value=%r, std_dev=%r)' % (
596 self.revision_string(), self.values, self.mean_value, self.std_dev)) 597 self.revision_string(), self.values, self.mean_value, self.std_dev))
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698