| OLD | NEW |
| 1 # Copyright 2016 The Chromium Authors. All rights reserved. | 1 # Copyright 2016 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 | 5 |
| 6 # Recipe module for Skia Swarming trigger. | 6 # Recipe module for Skia Swarming trigger. |
| 7 | 7 |
| 8 | 8 |
| 9 import json | 9 import json |
| 10 | 10 |
| (...skipping 382 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 393 api.skia.rmtree(perf_data_dir) | 393 api.skia.rmtree(perf_data_dir) |
| 394 api.file.makedirs('perf_dir', perf_data_dir, infra_step=True) | 394 api.file.makedirs('perf_dir', perf_data_dir, infra_step=True) |
| 395 src_results_file = task.task_output_dir.join( | 395 src_results_file = task.task_output_dir.join( |
| 396 '0', 'perfdata', api.properties['buildername'], 'data', | 396 '0', 'perfdata', api.properties['buildername'], 'data', |
| 397 'nanobench_%s.json' % got_revision) | 397 'nanobench_%s.json' % got_revision) |
| 398 dst_results_file = perf_data_dir.join( | 398 dst_results_file = perf_data_dir.join( |
| 399 'nanobench_%s_%s.json' % (got_revision, git_timestamp)) | 399 'nanobench_%s_%s.json' % (got_revision, git_timestamp)) |
| 400 api.file.copy('perf_results', src_results_file, dst_results_file, | 400 api.file.copy('perf_results', src_results_file, dst_results_file, |
| 401 infra_step=True) | 401 infra_step=True) |
| 402 | 402 |
| 403 gsutil_path = api.depot_tools.gsutil_py_path | 403 gsutil_path = api.path['slave_build'].join( |
| 404 'skia', 'infra', 'bots', '.recipe_deps', 'depot_tools', 'third_party', |
| 405 'gsutil', 'gsutil') |
| 404 upload_args = [api.properties['buildername'], api.properties['buildnumber'], | 406 upload_args = [api.properties['buildername'], api.properties['buildnumber'], |
| 405 perf_data_dir, got_revision, gsutil_path] | 407 perf_data_dir, got_revision, gsutil_path] |
| 406 if is_trybot: | 408 if is_trybot: |
| 407 upload_args.append(api.properties['issue']) | 409 upload_args.append(api.properties['issue']) |
| 408 api.python( | 410 api.python( |
| 409 'Upload perf results', | 411 'Upload perf results', |
| 410 script=api.skia.resource('upload_bench_results.py'), | 412 script=api.skia.resource('upload_bench_results.py'), |
| 411 args=upload_args, | 413 args=upload_args, |
| 412 cwd=api.path['checkout'], | 414 cwd=api.path['checkout'], |
| 413 env=api.skia.gsutil_env('chromium-skia-gm.boto'), | 415 env=api.skia.gsutil_env('chromium-skia-gm.boto'), |
| (...skipping 264 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 678 test += api.path.exists(*paths) | 680 test += api.path.exists(*paths) |
| 679 | 681 |
| 680 return test | 682 return test |
| 681 | 683 |
| 682 | 684 |
| 683 def GenTests(api): | 685 def GenTests(api): |
| 684 for mastername, slaves in TEST_BUILDERS.iteritems(): | 686 for mastername, slaves in TEST_BUILDERS.iteritems(): |
| 685 for slavename, builders_by_slave in slaves.iteritems(): | 687 for slavename, builders_by_slave in slaves.iteritems(): |
| 686 for builder in builders_by_slave: | 688 for builder in builders_by_slave: |
| 687 yield test_for_bot(api, builder, mastername, slavename) | 689 yield test_for_bot(api, builder, mastername, slavename) |
| OLD | NEW |