| 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 341 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 352 'skip_gclient_ops': 'True', | 352 'skip_gclient_ops': 'True', |
| 353 'recipe_tester_name': 'linux_perf_tester' | 353 'recipe_tester_name': 'linux_perf_tester' |
| 354 } | 354 } |
| 355 if params: | 355 if params: |
| 356 example_config.update(params) | 356 example_config.update(params) |
| 357 return example_config | 357 return example_config |
| 358 | 358 |
| 359 | 359 |
| 360 def _get_step_data_for_revision(api, revision_data, include_build_steps=True): | 360 def _get_step_data_for_revision(api, revision_data, include_build_steps=True): |
| 361 """Generator that produces step patches for fake results.""" | 361 """Generator that produces step patches for fake results.""" |
| 362 commit_pos_number = revision_data['commit_pos'] | 362 commit_pos = revision_data['commit_pos'] |
| 363 commit_hash = revision_data['hash'] | 363 commit_hash = revision_data['hash'] |
| 364 test_results = revision_data.get('test_results') | 364 test_results = revision_data.get('test_results') |
| 365 | 365 |
| 366 if 'refrange' in revision_data: | 366 if 'refrange' in revision_data: |
| 367 parent_step = 'Resolving reference range.' | 367 parent_step = 'Resolving reference range.' |
| 368 commit_pos = 'refs/heads/master@{#%s}' % commit_pos_number | 368 step_name = parent_step + 'resolving commit_pos ' + commit_pos |
| 369 step_name = parent_step + 'crrev get commit hash for ' + commit_pos | 369 yield api.step_data(step_name, |
| 370 yield api.step_data( | 370 stdout=api.raw_io.output('hash:' + commit_hash)) |
| 371 step_name, | 371 |
| 372 stdout=api.json.output({'git_sha': commit_hash})) | |
| 373 | 372 |
| 374 if include_build_steps: | 373 if include_build_steps: |
| 375 if test_results: | 374 if test_results: |
| 376 step_name = ('Waiting for chromium@%s.gsutil ' | 375 step_name = ('Waiting for chromium@%s.gsutil ' |
| 377 'Get test results for build %s') % (commit_hash[:10], | 376 'Get test results for build %s') % (commit_hash[:10], |
| 378 commit_hash) | 377 commit_hash) |
| 379 yield api.step_data(step_name, stdout=api.json.output(test_results)) | 378 yield api.step_data(step_name, stdout=api.json.output(test_results)) |
| 380 | 379 |
| 381 if revision_data.get('DEPS', False): | 380 if revision_data.get('DEPS', False): |
| 382 step_name = 'fetch file %s:DEPS' % commit_hash | 381 step_name = 'fetch file %s:DEPS' % commit_hash |
| (...skipping 18 matching lines...) Expand all Loading... |
| 401 yield api.step_data(step_name, stdout=api.raw_io.output(file_hash)) | 400 yield api.step_data(step_name, stdout=api.raw_io.output(file_hash)) |
| 402 step_name = 'Expanding revision range for revision %s on depot %s' | 401 step_name = 'Expanding revision range for revision %s on depot %s' |
| 403 step_name %= (interval[-1], depot_name) | 402 step_name %= (interval[-1], depot_name) |
| 404 stdout = api.json.output([(r, 0) for r in interval[:-1]]) | 403 stdout = api.json.output([(r, 0) for r in interval[:-1]]) |
| 405 yield api.step_data(step_name, stdout=stdout) | 404 yield api.step_data(step_name, stdout=stdout) |
| 406 | 405 |
| 407 if 'cl_info' in revision_data: | 406 if 'cl_info' in revision_data: |
| 408 step_name = 'Reading culprit cl information.' | 407 step_name = 'Reading culprit cl information.' |
| 409 stdout = api.json.output(revision_data['cl_info']) | 408 stdout = api.json.output(revision_data['cl_info']) |
| 410 yield api.step_data(step_name, stdout=stdout) | 409 yield api.step_data(step_name, stdout=stdout) |
| OLD | NEW |