diff options
author | Eric Boren <borenet@google.com> | 2017-01-12 08:15:38 -0500 |
---|---|---|
committer | Skia Commit-Bot <skia-commit-bot@chromium.org> | 2017-01-12 13:45:08 +0000 |
commit | 2b861d3a391f2a9c93f97163d783c78935b7e72d (patch) | |
tree | 78d584d44ec4e8f85a58e4b92aa638914599cfd7 /infra/bots/recipes/upload_nano_results.py | |
parent | 621ea115e0b14467ae8f410ed6ad7a31bbe224e2 (diff) |
Move most recipes into modules
The modules will eventually move into a shared repository.
BUG=skia:6070
Change-Id: I622265d98a5446f9f3ebf2c6a197770398623769
Reviewed-on: https://skia-review.googlesource.com/6942
Reviewed-by: Ravi Mistry <rmistry@google.com>
Commit-Queue: Eric Boren <borenet@google.com>
Diffstat (limited to 'infra/bots/recipes/upload_nano_results.py')
-rw-r--r-- | infra/bots/recipes/upload_nano_results.py | 41 |
1 files changed, 2 insertions, 39 deletions
diff --git a/infra/bots/recipes/upload_nano_results.py b/infra/bots/recipes/upload_nano_results.py index f55fbce1be..8894ce3053 100644 --- a/infra/bots/recipes/upload_nano_results.py +++ b/infra/bots/recipes/upload_nano_results.py @@ -7,50 +7,13 @@ DEPS = [ - 'build/file', - 'recipe_engine/path', 'recipe_engine/properties', - 'recipe_engine/step', - 'recipe_engine/time', + 'upload_nano_results', ] def RunSteps(api): - # Upload the nanobench resuls. - builder_name = api.properties['buildername'] - - now = api.time.utcnow() - src_path = api.path['start_dir'].join( - 'perfdata', builder_name, 'data') - results = api.file.glob( - 'find results', - '*.json', - cwd=src_path, - test_data=['nanobench_abc123.json'], - infra_step=True) - if len(results) != 1: # pragma: nocover - raise Exception('Unable to find nanobench or skpbench JSON file!') - - src = src_path.join(results[0]) - basename = api.path.basename(src) - gs_path = '/'.join(( - 'nano-json-v1', str(now.year).zfill(4), - str(now.month).zfill(2), str(now.day).zfill(2), str(now.hour).zfill(2), - builder_name)) - - issue = str(api.properties.get('issue', '')) - patchset = str(api.properties.get('patchset', '')) - if api.properties.get('patch_storage', '') == 'gerrit': - issue = str(api.properties['patch_issue']) - patchset = str(api.properties['patch_set']) - if issue and patchset: - gs_path = '/'.join(('trybot', gs_path, issue, patchset)) - - dst = '/'.join(('gs://skia-perf', gs_path, basename)) - - api.step('upload', - cmd=['gsutil', 'cp', '-a', 'public-read', '-z', 'json', src, dst], - infra_step=True) + api.upload_nano_results.run() def GenTests(api): |