diff options
author | 2017-10-09 15:26:19 -0400 | |
---|---|---|
committer | 2017-10-09 19:58:34 +0000 | |
commit | c795a4c8862dbab914561fadf7a3567c55362ae4 (patch) | |
tree | 725e0fc4209029005230fdd4db48035d3aebd52a /infra/bots/recipes/upload_dm_results.py | |
parent | df007e1a7ae808ad41eb2bd01f6a658c5b438285 (diff) |
Add Linux CPU Coverage Bot
This simply uploads the results of an LLVM coverage to GCS
for later ingestion/display.
Bug: skia:7080
Change-Id: I7dcfa2307a239734a614990aca899ea37129126b
Reviewed-on: https://skia-review.googlesource.com/53880
Commit-Queue: Kevin Lubick <kjlubick@google.com>
Reviewed-by: Eric Boren <borenet@google.com>
Diffstat (limited to 'infra/bots/recipes/upload_dm_results.py')
-rw-r--r-- | infra/bots/recipes/upload_dm_results.py | 28 |
1 files changed, 5 insertions, 23 deletions
diff --git a/infra/bots/recipes/upload_dm_results.py b/infra/bots/recipes/upload_dm_results.py index 3ec2828e5d..a46c787d26 100644 --- a/infra/bots/recipes/upload_dm_results.py +++ b/infra/bots/recipes/upload_dm_results.py @@ -16,34 +16,15 @@ DEPS = [ 'recipe_engine/properties', 'recipe_engine/step', 'recipe_engine/time', + 'gsutil', ] GS_BUCKET_IMAGES = 'skia-infra-gm' DM_JSON = 'dm.json' -UPLOAD_ATTEMPTS = 5 VERBOSE_LOG = 'verbose.log' -def cp(api, name, src, dst, extra_args=None): - cmd = ['gsutil', 'cp'] - if extra_args: - cmd.extend(extra_args) - cmd.extend([src, dst]) - - name = 'upload %s' % name - for i in xrange(UPLOAD_ATTEMPTS): - step_name = name - if i > 0: - step_name += ' (attempt %d)' % (i+1) - try: - api.step(step_name, cmd=cmd) - break - except api.step.StepFailure: - if i == UPLOAD_ATTEMPTS - 1: - raise - - def RunSteps(api): builder_name = api.properties['buildername'] revision = api.properties['revision'] @@ -71,7 +52,8 @@ def RunSteps(api): # For some reason, glob returns results_dir when it should return nothing. files_to_upload = [f for f in files_to_upload if str(f).endswith(ext)] if len(files_to_upload) > 0: - cp(api, 'images', results_dir.join('*%s' % ext), image_dest_path) + api.gsutil.cp('images', results_dir.join('*%s' % ext), + image_dest_path) # Upload the JSON summary and verbose.log. now = api.time.utcnow() @@ -95,8 +77,8 @@ def RunSteps(api): summary_dest_path = 'gs://%s/%s' % (api.properties['gs_bucket'], summary_dest_path) - cp(api, 'JSON and logs', tmp_dir.join('*'), summary_dest_path, - ['-z', 'json,log']) + api.gsutil.cp('JSON and logs', tmp_dir.join('*'), summary_dest_path, + ['-z', 'json,log']) def GenTests(api): |