| OLD | NEW |
| 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 Loading... |
| 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 working_dir = api.working_dir or api.m.path['slave_build'] | 159 working_dir = api.working_dir |
| 160 cwd = working_dir.join( | 160 cwd = working_dir.join( |
| 161 depot_config.DEPOT_DEPS_NAME[self.depot_name]['src']) | 161 depot_config.DEPOT_DEPS_NAME[self.depot_name]['src']) |
| 162 name = 'Checking DEPS for ' + self.commit_hash | 162 name = 'Checking DEPS for ' + self.commit_hash |
| 163 step_result = api.m.git( | 163 step_result = api.m.git( |
| 164 'show', '--name-only', '--pretty=format:', | 164 'show', '--name-only', '--pretty=format:', |
| 165 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) |
| 166 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'): |
| 167 return False | 167 return False |
| 168 if 'DEPS' in step_result.stdout.splitlines(): # pragma: no cover | 168 if 'DEPS' in step_result.stdout.splitlines(): # pragma: no cover |
| 169 return True | 169 return True |
| (...skipping 418 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 588 else: | 588 else: |
| 589 next_revision_to_test.retest() | 589 next_revision_to_test.retest() |
| 590 | 590 |
| 591 def __repr__(self): | 591 def __repr__(self): |
| 592 if self.overall_return_code is not None: | 592 if self.overall_return_code is not None: |
| 593 return ('RevisionState(rev=%s, values=%r, overall_return_code=%r, ' | 593 return ('RevisionState(rev=%s, values=%r, overall_return_code=%r, ' |
| 594 'std_dev=%r)') % (self.revision_string(), self.values, | 594 'std_dev=%r)') % (self.revision_string(), self.values, |
| 595 self.overall_return_code, self.std_dev) | 595 self.overall_return_code, self.std_dev) |
| 596 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)' % ( |
| 597 self.revision_string(), self.values, self.mean_value, self.std_dev)) | 597 self.revision_string(), self.values, self.mean_value, self.std_dev)) |
| OLD | NEW |