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