| 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 """This example file is meant to provide coverage to bisect_results.""" | 5 """This example file is meant to provide coverage to bisect_results.""" |
| 6 | 6 |
| 7 DEPS = [ | 7 DEPS = [ |
| 8 'auto_bisect', | 8 'auto_bisect', |
| 9 'recipe_engine/json', | 9 'recipe_engine/json', |
| 10 'recipe_engine/path', | 10 'recipe_engine/path', |
| (...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 84 """ | 84 """ |
| 85 for k, v in attributes.iteritems(): | 85 for k, v in attributes.iteritems(): |
| 86 if '.' in k: | 86 if '.' in k: |
| 87 sub_target = getattr(target, k.split('.')[0]) | 87 sub_target = getattr(target, k.split('.')[0]) |
| 88 setattr(sub_target, k.split('.')[1], v) | 88 setattr(sub_target, k.split('.')[1], v) |
| 89 else: | 89 else: |
| 90 setattr(target, k, v) | 90 setattr(target, k, v) |
| 91 | 91 |
| 92 | 92 |
| 93 def add_revision_mapping(api, test, pos, sha): | 93 def add_revision_mapping(api, test, pos, sha): |
| 94 step_name = 'Resolving reference range.resolving commit_pos ' + pos | 94 step_name = ('Resolving reference range.crrev get commit hash for ' + |
| 95 stdout = api.raw_io.output('hash:' + sha) | 95 'refs/heads/master@{#%s}' % pos) |
| 96 stdout = api.json.output({'git_sha': sha}) |
| 96 test += api.step_data(step_name, stdout=stdout) | 97 test += api.step_data(step_name, stdout=stdout) |
| 98 |
| 97 step_name = 'Resolving reference range.resolving hash ' + sha | 99 step_name = 'Resolving reference range.resolving hash ' + sha |
| 98 pos = 'refs/heads/master@{#%s}' % pos | 100 pos = 'refs/heads/master@{#%s}' % pos |
| 99 stdout = api.raw_io.output(pos) | 101 stdout = api.raw_io.output(pos) |
| 100 return test | 102 return test |
| 101 | 103 |
| 102 | 104 |
| 103 def add_revision_info(api, test): | 105 def add_revision_info(api, test): |
| 104 step_name = 'Reading culprit cl information.' | 106 step_name = 'Reading culprit cl information.' |
| 105 rev_info = { | 107 rev_info = { |
| 106 'author': 'DummyAuthor', | 108 'author': 'DummyAuthor', |
| (...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 167 aborted_bisect_test = api.test('aborted_non_telemetry_test') | 169 aborted_bisect_test = api.test('aborted_non_telemetry_test') |
| 168 aborted_bisect_test = get_post_bisect_step_data(api, aborted_bisect_test) | 170 aborted_bisect_test = get_post_bisect_step_data(api, aborted_bisect_test) |
| 169 aborted_bisect_test = add_revision_mapping(api, aborted_bisect_test, '314015', | 171 aborted_bisect_test = add_revision_mapping(api, aborted_bisect_test, '314015', |
| 170 'c001c0de') | 172 'c001c0de') |
| 171 aborted_bisect_test = add_revision_mapping(api, aborted_bisect_test, '314017', | 173 aborted_bisect_test = add_revision_mapping(api, aborted_bisect_test, '314017', |
| 172 'deadbeef') | 174 'deadbeef') |
| 173 aborted_bisect_test += api.properties( | 175 aborted_bisect_test += api.properties( |
| 174 bisect_config = NON_TELEMETRY_TEST_CONFIG, | 176 bisect_config = NON_TELEMETRY_TEST_CONFIG, |
| 175 dummy_bisector_attributes = ABORTED_BISECT_ATTRIBUTES) | 177 dummy_bisector_attributes = ABORTED_BISECT_ATTRIBUTES) |
| 176 yield aborted_bisect_test | 178 yield aborted_bisect_test |
| OLD | NEW |