| 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 import json | 5 import json |
| 6 | 6 |
| 7 DEPS = [ | 7 DEPS = [ |
| 8 'auto_bisect', | 8 'auto_bisect', |
| 9 'chromium_tests', | 9 'chromium_tests', |
| 10 'recipe_engine/json', | 10 'recipe_engine/json', |
| (...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 83 invalid_config_test += api.properties( | 83 invalid_config_test += api.properties( |
| 84 bisect_config=_get_config({'good_revision': 'not a valid revision'})) | 84 bisect_config=_get_config({'good_revision': 'not a valid revision'})) |
| 85 yield invalid_config_test | 85 yield invalid_config_test |
| 86 | 86 |
| 87 failed_build_test = _make_test( | 87 failed_build_test = _make_test( |
| 88 api, _get_ref_range_only_test_data(), 'failed_build_test', | 88 api, _get_ref_range_only_test_data(), 'failed_build_test', |
| 89 extra_config={'dummy_builds': None}) | 89 extra_config={'dummy_builds': None}) |
| 90 failed_build_test += api.step_data('gsutil ls', retcode=1) | 90 failed_build_test += api.step_data('gsutil ls', retcode=1) |
| 91 failed_build_test += api.step_data('gsutil ls (2)' , retcode=1) | 91 failed_build_test += api.step_data('gsutil ls (2)' , retcode=1) |
| 92 failed_build_test += api.step_data('gsutil ls (3)' , retcode=1) | 92 failed_build_test += api.step_data('gsutil ls (3)' , retcode=1) |
| 93 failed_build_test += api.step_data( | 93 failed_build_test += api.override_step_data( |
| 94 'fetch builder state', | 94 'buildbucket.get', stdout=api.json.output( |
| 95 api.raw_io.output(json.dumps({'cachedBuilds': ['2106']}))) | 95 {'results':[{'build':{'status': 'COMPLETED', 'result': 'FAILED'}}]})) |
| 96 failed_build_test += api.step_data( | |
| 97 'fetch build details', | |
| 98 api.raw_io.output(json.dumps({ | |
| 99 'results': 2, | |
| 100 'properties': [('build_archive_url', | |
| 101 ('gs://chrome-perf/Linux Builder/full-build-linux_' | |
| 102 'a6298e4afedbf2cd461755ea6f45b0ad64222222.zip'))] | |
| 103 }))) | |
| 104 yield failed_build_test | 96 yield failed_build_test |
| 105 | 97 |
| 106 | 98 |
| 107 delayed_build_test = _make_test( | 99 delayed_build_test = _make_test( |
| 108 api, _get_ref_range_only_test_data(), 'delayed_build_test', | 100 api, _get_ref_range_only_test_data(), 'delayed_build_test', |
| 109 extra_config={'dummy_builds': None}) | 101 extra_config={'dummy_builds': None}) |
| 110 delayed_build_test += api.step_data('gsutil ls', retcode=1) | 102 delayed_build_test += api.step_data('gsutil ls', retcode=1) |
| 111 delayed_build_test += api.step_data('gsutil ls (2)', retcode=1) | 103 delayed_build_test += api.step_data('gsutil ls (2)', retcode=1) |
| 112 delayed_build_test += api.step_data('gsutil ls (3)', retcode=1) | 104 delayed_build_test += api.step_data('gsutil ls (3)', retcode=1) |
| 113 delayed_build_test += api.step_data('gsutil ls (4)', retcode=1) | 105 delayed_build_test += api.step_data('gsutil ls (4)', retcode=1) |
| 114 delayed_build_test += api.step_data('gsutil ls (5)', retcode=1) | 106 delayed_build_test += api.step_data('gsutil ls (5)', retcode=1) |
| 115 delayed_build_test += api.step_data('gsutil ls (6)', retcode=1) | 107 delayed_build_test += api.step_data('gsutil ls (6)', retcode=1) |
| 116 delayed_build_test += api.step_data( | 108 delayed_build_test += api.step_data( |
| 117 'fetch builder state', | 109 'buildbucket.get', stdout=api.json.output( |
| 118 api.raw_io.output(json.dumps({'cachedBuilds': []}))) | 110 {'results':[{'build':{'status': 'PENDING'}}]})) |
| 119 delayed_build_test += api.step_data( | |
| 120 'fetch builder state (2)', | |
| 121 api.raw_io.output(json.dumps({'cachedBuilds': ['2106']}))) | |
| 122 delayed_build_test += api.step_data( | |
| 123 'fetch build details', | |
| 124 api.raw_io.output(json.dumps({ | |
| 125 'properties': [('build_archive_url', | |
| 126 ('gs://chrome-perf/Linux Builder/full-build-linux_' | |
| 127 'a6298e4afedbf2cd461755ea6f45b0ad64222222.zip'))] | |
| 128 }))) | |
| 129 delayed_build_test += api.step_data( | |
| 130 'fetch build details (2)', | |
| 131 api.raw_io.output(json.dumps({ | |
| 132 'results': 2, | |
| 133 'properties': [('build_archive_url', | |
| 134 ('gs://chrome-perf/Linux Builder/full-build-linux_' | |
| 135 'a6298e4afedbf2cd461755ea6f45b0ad64222222.zip'))] | |
| 136 }))) | |
| 137 yield delayed_build_test | 111 yield delayed_build_test |
| 138 | 112 |
| 139 missing_metric_test = _make_test( | 113 missing_metric_test = _make_test( |
| 140 api, _get_ref_range_only_missing_metric_test_data(), | 114 api, _get_ref_range_only_missing_metric_test_data(), |
| 141 'missing_metric_test') | 115 'missing_metric_test') |
| 142 yield missing_metric_test | 116 yield missing_metric_test |
| 143 | 117 |
| 144 windows_test = _make_test( | 118 windows_test = _make_test( |
| 145 api, _get_basic_test_data(), 'windows_bisector', platform='windows') | 119 api, _get_basic_test_data(), 'windows_bisector', platform='windows') |
| 146 yield windows_test | 120 yield windows_test |
| (...skipping 310 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 457 yield api.step_data(step_name, stdout=api.raw_io.output(file_hash)) | 431 yield api.step_data(step_name, stdout=api.raw_io.output(file_hash)) |
| 458 step_name = 'Expanding revision range for revision %s on depot %s' | 432 step_name = 'Expanding revision range for revision %s on depot %s' |
| 459 step_name %= (interval[-1], depot_name) | 433 step_name %= (interval[-1], depot_name) |
| 460 stdout = api.json.output([(r, 0) for r in interval[:-1]]) | 434 stdout = api.json.output([(r, 0) for r in interval[:-1]]) |
| 461 yield api.step_data(step_name, stdout=stdout) | 435 yield api.step_data(step_name, stdout=stdout) |
| 462 | 436 |
| 463 if 'cl_info' in revision_data: | 437 if 'cl_info' in revision_data: |
| 464 step_name = 'Reading culprit cl information.' | 438 step_name = 'Reading culprit cl information.' |
| 465 stdout = api.json.output(revision_data['cl_info']) | 439 stdout = api.json.output(revision_data['cl_info']) |
| 466 yield api.step_data(step_name, stdout=stdout) | 440 yield api.step_data(step_name, stdout=stdout) |
| OLD | NEW |