| 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 69 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 80 | 80 |
| 81 invalid_config_test = api.test('invalid_config') | 81 invalid_config_test = api.test('invalid_config') |
| 82 invalid_config_test += api.properties( | 82 invalid_config_test += api.properties( |
| 83 bisect_config=_get_config({'good_revision': 'not a valid revision'})) | 83 bisect_config=_get_config({'good_revision': 'not a valid revision'})) |
| 84 yield invalid_config_test | 84 yield invalid_config_test |
| 85 | 85 |
| 86 failed_build_test = _make_test( | 86 failed_build_test = _make_test( |
| 87 api, _get_ref_range_only_test_data(), 'failed_build_test', | 87 api, _get_ref_range_only_test_data(), 'failed_build_test', |
| 88 extra_config={'dummy_builds': None}) | 88 extra_config={'dummy_builds': None}) |
| 89 failed_build_test += api.step_data('gsutil ls', retcode=1) | 89 failed_build_test += api.step_data('gsutil ls', retcode=1) |
| 90 failed_build_test += api.step_data('gsutil ls (2)' , retcode=1) | |
| 91 failed_build_test += api.step_data('gsutil ls (3)' , retcode=1) | |
| 92 failed_build_test += api.step_data( | 90 failed_build_test += api.step_data( |
| 93 'fetch builder state', | 91 'Waiting for chromium@a6298e4afe.gsutil ls' , retcode=1) |
| 92 failed_build_test += api.step_data( |
| 93 'Waiting for chromium@a6298e4afe.fetch builder state', |
| 94 api.raw_io.output(json.dumps({'cachedBuilds': ['2106']}))) | 94 api.raw_io.output(json.dumps({'cachedBuilds': ['2106']}))) |
| 95 failed_build_test += api.step_data( | 95 failed_build_test += api.step_data( |
| 96 'fetch build details', | 96 'Waiting for chromium@a6298e4afe.fetch build details', |
| 97 api.raw_io.output(json.dumps({ | 97 api.raw_io.output(json.dumps({ |
| 98 'results': 2, | 98 'results': 2, |
| 99 'properties': [('build_archive_url', | 99 'properties': [('build_archive_url', |
| 100 ('gs://chrome-perf/Linux Builder/full-build-linux_' | 100 ('gs://chrome-perf/Linux Builder/full-build-linux_' |
| 101 'a6298e4afedbf2cd461755ea6f45b0ad64222222.zip'))] | 101 'a6298e4afedbf2cd461755ea6f45b0ad64222222.zip'))] |
| 102 }))) | 102 }))) |
| 103 yield failed_build_test | 103 yield failed_build_test |
| 104 | 104 |
| 105 | 105 |
| 106 delayed_build_test = _make_test( | 106 delayed_build_test = _make_test( |
| 107 api, _get_ref_range_only_test_data(), 'delayed_build_test', | 107 api, _get_ref_range_only_test_data(), 'delayed_build_test', |
| 108 extra_config={'dummy_builds': None}) | 108 extra_config={'dummy_builds': None}) |
| 109 delayed_build_test += api.step_data('gsutil ls', retcode=1) | 109 delayed_build_test += api.step_data('gsutil ls', retcode=1) |
| 110 delayed_build_test += api.step_data('gsutil ls (2)', retcode=1) | |
| 111 delayed_build_test += api.step_data('gsutil ls (3)', retcode=1) | |
| 112 delayed_build_test += api.step_data('gsutil ls (4)', retcode=1) | |
| 113 delayed_build_test += api.step_data('gsutil ls (5)', retcode=1) | |
| 114 delayed_build_test += api.step_data('gsutil ls (6)', retcode=1) | |
| 115 delayed_build_test += api.step_data( | 110 delayed_build_test += api.step_data( |
| 116 'fetch builder state', | 111 'Waiting for chromium@a6298e4afe.gsutil ls', retcode=1) |
| 112 delayed_build_test += api.step_data( |
| 113 'Waiting for chromium@a6298e4afe.gsutil ls (2)', retcode=1) |
| 114 delayed_build_test += api.step_data( |
| 115 'Waiting for chromium@a6298e4afe.gsutil ls (3)', retcode=1) |
| 116 delayed_build_test += api.step_data( |
| 117 'Waiting for chromium@a6298e4afe.fetch builder state', |
| 117 api.raw_io.output(json.dumps({'cachedBuilds': []}))) | 118 api.raw_io.output(json.dumps({'cachedBuilds': []}))) |
| 118 delayed_build_test += api.step_data( | 119 delayed_build_test += api.step_data( |
| 119 'fetch builder state (2)', | 120 'Waiting for chromium@a6298e4afe.fetch builder state (2)', |
| 120 api.raw_io.output(json.dumps({'cachedBuilds': ['2106']}))) | 121 api.raw_io.output(json.dumps({'cachedBuilds': ['2106']}))) |
| 121 delayed_build_test += api.step_data( | 122 delayed_build_test += api.step_data( |
| 122 'fetch build details', | 123 'Waiting for chromium@a6298e4afe.fetch build details', |
| 123 api.raw_io.output(json.dumps({ | 124 api.raw_io.output(json.dumps({ |
| 124 'properties': [('build_archive_url', | 125 'properties': [('build_archive_url', |
| 125 ('gs://chrome-perf/Linux Builder/full-build-linux_' | 126 ('gs://chrome-perf/Linux Builder/full-build-linux_' |
| 126 'a6298e4afedbf2cd461755ea6f45b0ad64222222.zip'))] | 127 'a6298e4afedbf2cd461755ea6f45b0ad64222222.zip'))] |
| 127 }))) | 128 }))) |
| 128 delayed_build_test += api.step_data( | 129 delayed_build_test += api.step_data( |
| 129 'fetch build details (2)', | 130 'Waiting for chromium@a6298e4afe.fetch build details (2)', |
| 130 api.raw_io.output(json.dumps({ | 131 api.raw_io.output(json.dumps({ |
| 131 'results': 2, | 132 'results': 2, |
| 132 'properties': [('build_archive_url', | 133 'properties': [('build_archive_url', |
| 133 ('gs://chrome-perf/Linux Builder/full-build-linux_' | 134 ('gs://chrome-perf/Linux Builder/full-build-linux_' |
| 134 'a6298e4afedbf2cd461755ea6f45b0ad64222222.zip'))] | 135 'a6298e4afedbf2cd461755ea6f45b0ad64222222.zip'))] |
| 135 }))) | 136 }))) |
| 136 yield delayed_build_test | 137 yield delayed_build_test |
| 137 | 138 |
| 138 missing_metric_test = _make_test( | 139 missing_metric_test = _make_test( |
| 139 api, _get_ref_range_only_missing_metric_test_data(), | 140 api, _get_ref_range_only_missing_metric_test_data(), |
| (...skipping 282 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 422 if 'refrange' in revision_data: | 423 if 'refrange' in revision_data: |
| 423 parent_step = 'Resolving reference range.' | 424 parent_step = 'Resolving reference range.' |
| 424 commit_pos = 'refs/heads/master@{#%s}' % commit_pos_number | 425 commit_pos = 'refs/heads/master@{#%s}' % commit_pos_number |
| 425 step_name = parent_step + 'crrev get commit hash for ' + commit_pos | 426 step_name = parent_step + 'crrev get commit hash for ' + commit_pos |
| 426 yield api.step_data( | 427 yield api.step_data( |
| 427 step_name, | 428 step_name, |
| 428 stdout=api.json.output({'git_sha': commit_hash})) | 429 stdout=api.json.output({'git_sha': commit_hash})) |
| 429 | 430 |
| 430 if include_build_steps: | 431 if include_build_steps: |
| 431 if test_results: | 432 if test_results: |
| 432 step_name = ('gsutil Get test results for build %s') % commit_hash | 433 step_name = ('Waiting for chromium@%s.gsutil ' |
| 434 'Get test results for build %s') % (commit_hash[:10], |
| 435 commit_hash) |
| 433 yield api.step_data(step_name, stdout=api.json.output(test_results)) | 436 yield api.step_data(step_name, stdout=api.json.output(test_results)) |
| 434 | 437 |
| 435 if revision_data.get('DEPS', False): | 438 if revision_data.get('DEPS', False): |
| 436 step_name = 'fetch file %s:DEPS' % commit_hash | 439 step_name = 'fetch file %s:DEPS' % commit_hash |
| 437 yield api.step_data(step_name, stdout=api.raw_io.output( | 440 yield api.step_data(step_name, stdout=api.raw_io.output( |
| 438 revision_data['DEPS'])) | 441 revision_data['DEPS'])) |
| 439 | 442 |
| 440 if 'git_diff' in revision_data: | 443 if 'git_diff' in revision_data: |
| 441 for deps_rev, diff_file in revision_data['git_diff'].iteritems(): | 444 for deps_rev, diff_file in revision_data['git_diff'].iteritems(): |
| 442 step_name = 'Generating patch for %s:DEPS to %s' | 445 step_name = 'Generating patch for %s:DEPS to %s' |
| (...skipping 12 matching lines...) Expand all Loading... |
| 455 yield api.step_data(step_name, stdout=api.raw_io.output(file_hash)) | 458 yield api.step_data(step_name, stdout=api.raw_io.output(file_hash)) |
| 456 step_name = 'Expanding revision range for revision %s on depot %s' | 459 step_name = 'Expanding revision range for revision %s on depot %s' |
| 457 step_name %= (interval[-1], depot_name) | 460 step_name %= (interval[-1], depot_name) |
| 458 stdout = api.json.output([(r, 0) for r in interval[:-1]]) | 461 stdout = api.json.output([(r, 0) for r in interval[:-1]]) |
| 459 yield api.step_data(step_name, stdout=stdout) | 462 yield api.step_data(step_name, stdout=stdout) |
| 460 | 463 |
| 461 if 'cl_info' in revision_data: | 464 if 'cl_info' in revision_data: |
| 462 step_name = 'Reading culprit cl information.' | 465 step_name = 'Reading culprit cl information.' |
| 463 stdout = api.json.output(revision_data['cl_info']) | 466 stdout = api.json.output(revision_data['cl_info']) |
| 464 yield api.step_data(step_name, stdout=stdout) | 467 yield api.step_data(step_name, stdout=stdout) |
| OLD | NEW |