diff --git a/infra/bots/recipes/upload_dm_results.expected/alternate_bucket.json b/infra/bots/recipes/upload_dm_results.expected/alternate_bucket.json index 84ab65a431..5271ef19b2 100644 --- a/infra/bots/recipes/upload_dm_results.expected/alternate_bucket.json +++ b/infra/bots/recipes/upload_dm_results.expected/alternate_bucket.json @@ -1,92 +1,4 @@ [ - { - "cmd": [ - "python", - "-u", - "RECIPE_MODULE[recipe_engine::file]/resources/fileutil.py", - "--json-output", - "/path/to/tmp/json", - "ensure-directory", - "--mode", - "0777", - "[START_DIR]/tmp_upload" - ], - "infra_step": true, - "name": "makedirs tmp dir" - }, - { - "cmd": [ - "python", - "-u", - "RECIPE_MODULE[recipe_engine::file]/resources/fileutil.py", - "--json-output", - "/path/to/tmp/json", - "copy", - "[START_DIR]/test/dm.json", - "[START_DIR]/tmp_upload" - ], - "infra_step": true, - "name": "copy dm.json" - }, - { - "cmd": [ - "python", - "-u", - "RECIPE_MODULE[recipe_engine::file]/resources/fileutil.py", - "--json-output", - "/path/to/tmp/json", - "remove", - "[START_DIR]/test/dm.json" - ], - "infra_step": true, - "name": "rm old dm.json" - }, - { - "cmd": [ - "python", - "-u", - "RECIPE_MODULE[recipe_engine::file]/resources/fileutil.py", - "--json-output", - "/path/to/tmp/json", - "listdir", - "[START_DIR]/test" - ], - "infra_step": true, - "name": "check for optional verbose.log file", - "stdout": "/path/to/tmp/", - "~followup_annotations": [ - "@@@STEP_LOG_LINE@listdir@[START_DIR]/test/dm.json@@@", - "@@@STEP_LOG_LINE@listdir@[START_DIR]/test/verbose.log@@@", - "@@@STEP_LOG_END@listdir@@@" - ] - }, - { - "cmd": [ - "python", - "-u", - "RECIPE_MODULE[recipe_engine::file]/resources/fileutil.py", - "--json-output", - "/path/to/tmp/json", - "copy", - "[START_DIR]/test/verbose.log", - "[START_DIR]/tmp_upload" - ], - "infra_step": true, - "name": "copy verbose.log" - }, - { - "cmd": [ - "python", - "-u", - "RECIPE_MODULE[recipe_engine::file]/resources/fileutil.py", - "--json-output", - "/path/to/tmp/json", - "remove", - "[START_DIR]/test/verbose.log" - ], - "infra_step": true, - "name": "rm old verbose.log" - }, { "cmd": [ "python", @@ -114,7 +26,7 @@ "[START_DIR]/test/*.png", "gs://skia-infra-gm-alt/dm-images-v1" ], - "name": "upload images" + "name": "upload .png images" }, { "cmd": [ @@ -139,12 +51,40 @@ "cmd": [ "gsutil", "cp", - "-z", - "json,log", - "[START_DIR]/tmp_upload/*", - "gs://skia-infra-gm-alt/dm-json-v1/2012/05/14/12/abc123/Test-Debian9-GCC-GCE-CPU-AVX2-x86_64-Debug/1337000001" + "-Z", + "[START_DIR]/test/dm.json", + "gs://skia-infra-gm-alt/dm-json-v1/2012/05/14/12/abc123/Test-Debian9-GCC-GCE-CPU-AVX2-x86_64-Debug/1337000001/dm.json" ], - "name": "upload JSON and logs" + "name": "upload dm.json" + }, + { + "cmd": [ + "python", + "-u", + "RECIPE_MODULE[recipe_engine::file]/resources/fileutil.py", + "--json-output", + "/path/to/tmp/json", + "listdir", + "[START_DIR]/test" + ], + "infra_step": true, + "name": "check for optional verbose.log file", + "stdout": "/path/to/tmp/", + "~followup_annotations": [ + "@@@STEP_LOG_LINE@listdir@[START_DIR]/test/dm.json@@@", + "@@@STEP_LOG_LINE@listdir@[START_DIR]/test/verbose.log@@@", + "@@@STEP_LOG_END@listdir@@@" + ] + }, + { + "cmd": [ + "gsutil", + "cp", + "-Z", + "[START_DIR]/test/verbose.log", + "gs://skia-infra-gm-alt/dm-json-v1/2012/05/14/12/abc123/Test-Debian9-GCC-GCE-CPU-AVX2-x86_64-Debug/1337000001/verbose.log" + ], + "name": "upload verbose.log" }, { "name": "$result", diff --git a/infra/bots/recipes/upload_dm_results.expected/failed_all.json b/infra/bots/recipes/upload_dm_results.expected/failed_all.json index a4f7c0eb3c..b49a85b5d6 100644 --- a/infra/bots/recipes/upload_dm_results.expected/failed_all.json +++ b/infra/bots/recipes/upload_dm_results.expected/failed_all.json @@ -1,92 +1,4 @@ [ - { - "cmd": [ - "python", - "-u", - "RECIPE_MODULE[recipe_engine::file]/resources/fileutil.py", - "--json-output", - "/path/to/tmp/json", - "ensure-directory", - "--mode", - "0777", - "[START_DIR]/tmp_upload" - ], - "infra_step": true, - "name": "makedirs tmp dir" - }, - { - "cmd": [ - "python", - "-u", - "RECIPE_MODULE[recipe_engine::file]/resources/fileutil.py", - "--json-output", - "/path/to/tmp/json", - "copy", - "[START_DIR]/test/dm.json", - "[START_DIR]/tmp_upload" - ], - "infra_step": true, - "name": "copy dm.json" - }, - { - "cmd": [ - "python", - "-u", - "RECIPE_MODULE[recipe_engine::file]/resources/fileutil.py", - "--json-output", - "/path/to/tmp/json", - "remove", - "[START_DIR]/test/dm.json" - ], - "infra_step": true, - "name": "rm old dm.json" - }, - { - "cmd": [ - "python", - "-u", - "RECIPE_MODULE[recipe_engine::file]/resources/fileutil.py", - "--json-output", - "/path/to/tmp/json", - "listdir", - "[START_DIR]/test" - ], - "infra_step": true, - "name": "check for optional verbose.log file", - "stdout": "/path/to/tmp/", - "~followup_annotations": [ - "@@@STEP_LOG_LINE@listdir@[START_DIR]/test/dm.json@@@", - "@@@STEP_LOG_LINE@listdir@[START_DIR]/test/verbose.log@@@", - "@@@STEP_LOG_END@listdir@@@" - ] - }, - { - "cmd": [ - "python", - "-u", - "RECIPE_MODULE[recipe_engine::file]/resources/fileutil.py", - "--json-output", - "/path/to/tmp/json", - "copy", - "[START_DIR]/test/verbose.log", - "[START_DIR]/tmp_upload" - ], - "infra_step": true, - "name": "copy verbose.log" - }, - { - "cmd": [ - "python", - "-u", - "RECIPE_MODULE[recipe_engine::file]/resources/fileutil.py", - "--json-output", - "/path/to/tmp/json", - "remove", - "[START_DIR]/test/verbose.log" - ], - "infra_step": true, - "name": "rm old verbose.log" - }, { "cmd": [ "python", @@ -114,7 +26,7 @@ "[START_DIR]/test/*.png", "gs://skia-infra-gm/dm-images-v1" ], - "name": "upload images", + "name": "upload .png images", "~followup_annotations": [ "step returned non-zero exit code: 1", "@@@STEP_FAILURE@@@" @@ -128,7 +40,7 @@ "[START_DIR]/test/*.png", "gs://skia-infra-gm/dm-images-v1" ], - "name": "upload images (attempt 2)", + "name": "upload .png images (attempt 2)", "~followup_annotations": [ "step returned non-zero exit code: 1", "@@@STEP_FAILURE@@@" @@ -142,7 +54,7 @@ "[START_DIR]/test/*.png", "gs://skia-infra-gm/dm-images-v1" ], - "name": "upload images (attempt 3)", + "name": "upload .png images (attempt 3)", "~followup_annotations": [ "step returned non-zero exit code: 1", "@@@STEP_FAILURE@@@" @@ -156,7 +68,7 @@ "[START_DIR]/test/*.png", "gs://skia-infra-gm/dm-images-v1" ], - "name": "upload images (attempt 4)", + "name": "upload .png images (attempt 4)", "~followup_annotations": [ "step returned non-zero exit code: 1", "@@@STEP_FAILURE@@@" @@ -170,7 +82,7 @@ "[START_DIR]/test/*.png", "gs://skia-infra-gm/dm-images-v1" ], - "name": "upload images (attempt 5)", + "name": "upload .png images (attempt 5)", "~followup_annotations": [ "step returned non-zero exit code: 1", "@@@STEP_FAILURE@@@" @@ -178,7 +90,7 @@ }, { "name": "$result", - "reason": "Step('upload images (attempt 5)') failed with return_code 1", + "reason": "Step('upload .png images (attempt 5)') failed with return_code 1", "recipe_result": null, "status_code": 1 } diff --git a/infra/bots/recipes/upload_dm_results.expected/failed_once.json b/infra/bots/recipes/upload_dm_results.expected/failed_once.json index 6a88334583..8b1ad340d7 100644 --- a/infra/bots/recipes/upload_dm_results.expected/failed_once.json +++ b/infra/bots/recipes/upload_dm_results.expected/failed_once.json @@ -1,92 +1,4 @@ [ - { - "cmd": [ - "python", - "-u", - "RECIPE_MODULE[recipe_engine::file]/resources/fileutil.py", - "--json-output", - "/path/to/tmp/json", - "ensure-directory", - "--mode", - "0777", - "[START_DIR]/tmp_upload" - ], - "infra_step": true, - "name": "makedirs tmp dir" - }, - { - "cmd": [ - "python", - "-u", - "RECIPE_MODULE[recipe_engine::file]/resources/fileutil.py", - "--json-output", - "/path/to/tmp/json", - "copy", - "[START_DIR]/test/dm.json", - "[START_DIR]/tmp_upload" - ], - "infra_step": true, - "name": "copy dm.json" - }, - { - "cmd": [ - "python", - "-u", - "RECIPE_MODULE[recipe_engine::file]/resources/fileutil.py", - "--json-output", - "/path/to/tmp/json", - "remove", - "[START_DIR]/test/dm.json" - ], - "infra_step": true, - "name": "rm old dm.json" - }, - { - "cmd": [ - "python", - "-u", - "RECIPE_MODULE[recipe_engine::file]/resources/fileutil.py", - "--json-output", - "/path/to/tmp/json", - "listdir", - "[START_DIR]/test" - ], - "infra_step": true, - "name": "check for optional verbose.log file", - "stdout": "/path/to/tmp/", - "~followup_annotations": [ - "@@@STEP_LOG_LINE@listdir@[START_DIR]/test/dm.json@@@", - "@@@STEP_LOG_LINE@listdir@[START_DIR]/test/verbose.log@@@", - "@@@STEP_LOG_END@listdir@@@" - ] - }, - { - "cmd": [ - "python", - "-u", - "RECIPE_MODULE[recipe_engine::file]/resources/fileutil.py", - "--json-output", - "/path/to/tmp/json", - "copy", - "[START_DIR]/test/verbose.log", - "[START_DIR]/tmp_upload" - ], - "infra_step": true, - "name": "copy verbose.log" - }, - { - "cmd": [ - "python", - "-u", - "RECIPE_MODULE[recipe_engine::file]/resources/fileutil.py", - "--json-output", - "/path/to/tmp/json", - "remove", - "[START_DIR]/test/verbose.log" - ], - "infra_step": true, - "name": "rm old verbose.log" - }, { "cmd": [ "python", @@ -114,7 +26,7 @@ "[START_DIR]/test/*.png", "gs://skia-infra-gm/dm-images-v1" ], - "name": "upload images", + "name": "upload .png images", "~followup_annotations": [ "step returned non-zero exit code: 1", "@@@STEP_FAILURE@@@" @@ -128,7 +40,7 @@ "[START_DIR]/test/*.png", "gs://skia-infra-gm/dm-images-v1" ], - "name": "upload images (attempt 2)" + "name": "upload .png images (attempt 2)" }, { "cmd": [ @@ -153,12 +65,40 @@ "cmd": [ "gsutil", "cp", - "-z", - "json,log", - "[START_DIR]/tmp_upload/*", - "gs://skia-infra-gm/dm-json-v1/2012/05/14/12/abc123/Test-Debian9-GCC-GCE-CPU-AVX2-x86_64-Debug/1337000001" + "-Z", + "[START_DIR]/test/dm.json", + "gs://skia-infra-gm/dm-json-v1/2012/05/14/12/abc123/Test-Debian9-GCC-GCE-CPU-AVX2-x86_64-Debug/1337000001/dm.json" ], - "name": "upload JSON and logs" + "name": "upload dm.json" + }, + { + "cmd": [ + "python", + "-u", + "RECIPE_MODULE[recipe_engine::file]/resources/fileutil.py", + "--json-output", + "/path/to/tmp/json", + "listdir", + "[START_DIR]/test" + ], + "infra_step": true, + "name": "check for optional verbose.log file", + "stdout": "/path/to/tmp/", + "~followup_annotations": [ + "@@@STEP_LOG_LINE@listdir@[START_DIR]/test/dm.json@@@", + "@@@STEP_LOG_LINE@listdir@[START_DIR]/test/verbose.log@@@", + "@@@STEP_LOG_END@listdir@@@" + ] + }, + { + "cmd": [ + "gsutil", + "cp", + "-Z", + "[START_DIR]/test/verbose.log", + "gs://skia-infra-gm/dm-json-v1/2012/05/14/12/abc123/Test-Debian9-GCC-GCE-CPU-AVX2-x86_64-Debug/1337000001/verbose.log" + ], + "name": "upload verbose.log" }, { "name": "$result", diff --git a/infra/bots/recipes/upload_dm_results.expected/normal_bot.json b/infra/bots/recipes/upload_dm_results.expected/normal_bot.json index 2462af3b2c..314647f3b1 100644 --- a/infra/bots/recipes/upload_dm_results.expected/normal_bot.json +++ b/infra/bots/recipes/upload_dm_results.expected/normal_bot.json @@ -1,92 +1,4 @@ [ - { - "cmd": [ - "python", - "-u", - "RECIPE_MODULE[recipe_engine::file]/resources/fileutil.py", - "--json-output", - "/path/to/tmp/json", - "ensure-directory", - "--mode", - "0777", - "[START_DIR]/tmp_upload" - ], - "infra_step": true, - "name": "makedirs tmp dir" - }, - { - "cmd": [ - "python", - "-u", - "RECIPE_MODULE[recipe_engine::file]/resources/fileutil.py", - "--json-output", - "/path/to/tmp/json", - "copy", - "[START_DIR]/test/dm.json", - "[START_DIR]/tmp_upload" - ], - "infra_step": true, - "name": "copy dm.json" - }, - { - "cmd": [ - "python", - "-u", - "RECIPE_MODULE[recipe_engine::file]/resources/fileutil.py", - "--json-output", - "/path/to/tmp/json", - "remove", - "[START_DIR]/test/dm.json" - ], - "infra_step": true, - "name": "rm old dm.json" - }, - { - "cmd": [ - "python", - "-u", - "RECIPE_MODULE[recipe_engine::file]/resources/fileutil.py", - "--json-output", - "/path/to/tmp/json", - "listdir", - "[START_DIR]/test" - ], - "infra_step": true, - "name": "check for optional verbose.log file", - "stdout": "/path/to/tmp/", - "~followup_annotations": [ - "@@@STEP_LOG_LINE@listdir@[START_DIR]/test/dm.json@@@", - "@@@STEP_LOG_LINE@listdir@[START_DIR]/test/verbose.log@@@", - "@@@STEP_LOG_END@listdir@@@" - ] - }, - { - "cmd": [ - "python", - "-u", - "RECIPE_MODULE[recipe_engine::file]/resources/fileutil.py", - "--json-output", - "/path/to/tmp/json", - "copy", - "[START_DIR]/test/verbose.log", - "[START_DIR]/tmp_upload" - ], - "infra_step": true, - "name": "copy verbose.log" - }, - { - "cmd": [ - "python", - "-u", - "RECIPE_MODULE[recipe_engine::file]/resources/fileutil.py", - "--json-output", - "/path/to/tmp/json", - "remove", - "[START_DIR]/test/verbose.log" - ], - "infra_step": true, - "name": "rm old verbose.log" - }, { "cmd": [ "python", @@ -114,7 +26,7 @@ "[START_DIR]/test/*.png", "gs://skia-infra-gm/dm-images-v1" ], - "name": "upload images" + "name": "upload .png images" }, { "cmd": [ @@ -139,12 +51,40 @@ "cmd": [ "gsutil", "cp", - "-z", - "json,log", - "[START_DIR]/tmp_upload/*", - "gs://skia-infra-gm/dm-json-v1/2012/05/14/12/abc123/Test-Debian9-GCC-GCE-CPU-AVX2-x86_64-Debug/1337000001" + "-Z", + "[START_DIR]/test/dm.json", + "gs://skia-infra-gm/dm-json-v1/2012/05/14/12/abc123/Test-Debian9-GCC-GCE-CPU-AVX2-x86_64-Debug/1337000001/dm.json" ], - "name": "upload JSON and logs" + "name": "upload dm.json" + }, + { + "cmd": [ + "python", + "-u", + "RECIPE_MODULE[recipe_engine::file]/resources/fileutil.py", + "--json-output", + "/path/to/tmp/json", + "listdir", + "[START_DIR]/test" + ], + "infra_step": true, + "name": "check for optional verbose.log file", + "stdout": "/path/to/tmp/", + "~followup_annotations": [ + "@@@STEP_LOG_LINE@listdir@[START_DIR]/test/dm.json@@@", + "@@@STEP_LOG_LINE@listdir@[START_DIR]/test/verbose.log@@@", + "@@@STEP_LOG_END@listdir@@@" + ] + }, + { + "cmd": [ + "gsutil", + "cp", + "-Z", + "[START_DIR]/test/verbose.log", + "gs://skia-infra-gm/dm-json-v1/2012/05/14/12/abc123/Test-Debian9-GCC-GCE-CPU-AVX2-x86_64-Debug/1337000001/verbose.log" + ], + "name": "upload verbose.log" }, { "name": "$result", diff --git a/infra/bots/recipes/upload_dm_results.expected/trybot.json b/infra/bots/recipes/upload_dm_results.expected/trybot.json index 1885fe1adc..233cfe558b 100644 --- a/infra/bots/recipes/upload_dm_results.expected/trybot.json +++ b/infra/bots/recipes/upload_dm_results.expected/trybot.json @@ -1,92 +1,4 @@ [ - { - "cmd": [ - "python", - "-u", - "RECIPE_MODULE[recipe_engine::file]/resources/fileutil.py", - "--json-output", - "/path/to/tmp/json", - "ensure-directory", - "--mode", - "0777", - "[START_DIR]/tmp_upload" - ], - "infra_step": true, - "name": "makedirs tmp dir" - }, - { - "cmd": [ - "python", - "-u", - "RECIPE_MODULE[recipe_engine::file]/resources/fileutil.py", - "--json-output", - "/path/to/tmp/json", - "copy", - "[START_DIR]/test/dm.json", - "[START_DIR]/tmp_upload" - ], - "infra_step": true, - "name": "copy dm.json" - }, - { - "cmd": [ - "python", - "-u", - "RECIPE_MODULE[recipe_engine::file]/resources/fileutil.py", - "--json-output", - "/path/to/tmp/json", - "remove", - "[START_DIR]/test/dm.json" - ], - "infra_step": true, - "name": "rm old dm.json" - }, - { - "cmd": [ - "python", - "-u", - "RECIPE_MODULE[recipe_engine::file]/resources/fileutil.py", - "--json-output", - "/path/to/tmp/json", - "listdir", - "[START_DIR]/test" - ], - "infra_step": true, - "name": "check for optional verbose.log file", - "stdout": "/path/to/tmp/", - "~followup_annotations": [ - "@@@STEP_LOG_LINE@listdir@[START_DIR]/test/dm.json@@@", - "@@@STEP_LOG_LINE@listdir@[START_DIR]/test/verbose.log@@@", - "@@@STEP_LOG_END@listdir@@@" - ] - }, - { - "cmd": [ - "python", - "-u", - "RECIPE_MODULE[recipe_engine::file]/resources/fileutil.py", - "--json-output", - "/path/to/tmp/json", - "copy", - "[START_DIR]/test/verbose.log", - "[START_DIR]/tmp_upload" - ], - "infra_step": true, - "name": "copy verbose.log" - }, - { - "cmd": [ - "python", - "-u", - "RECIPE_MODULE[recipe_engine::file]/resources/fileutil.py", - "--json-output", - "/path/to/tmp/json", - "remove", - "[START_DIR]/test/verbose.log" - ], - "infra_step": true, - "name": "rm old verbose.log" - }, { "cmd": [ "python", @@ -114,7 +26,7 @@ "[START_DIR]/test/*.png", "gs://skia-infra-gm/dm-images-v1" ], - "name": "upload images" + "name": "upload .png images" }, { "cmd": [ @@ -139,12 +51,40 @@ "cmd": [ "gsutil", "cp", - "-z", - "json,log", - "[START_DIR]/tmp_upload/*", - "gs://skia-infra-gm/trybot/dm-json-v1/2012/05/14/12/abc123/Test-Debian9-GCC-GCE-CPU-AVX2-x86_64-Debug/1337000001/456789/12" + "-Z", + "[START_DIR]/test/dm.json", + "gs://skia-infra-gm/trybot/dm-json-v1/2012/05/14/12/abc123/Test-Debian9-GCC-GCE-CPU-AVX2-x86_64-Debug/1337000001/456789/12/dm.json" ], - "name": "upload JSON and logs" + "name": "upload dm.json" + }, + { + "cmd": [ + "python", + "-u", + "RECIPE_MODULE[recipe_engine::file]/resources/fileutil.py", + "--json-output", + "/path/to/tmp/json", + "listdir", + "[START_DIR]/test" + ], + "infra_step": true, + "name": "check for optional verbose.log file", + "stdout": "/path/to/tmp/", + "~followup_annotations": [ + "@@@STEP_LOG_LINE@listdir@[START_DIR]/test/dm.json@@@", + "@@@STEP_LOG_LINE@listdir@[START_DIR]/test/verbose.log@@@", + "@@@STEP_LOG_END@listdir@@@" + ] + }, + { + "cmd": [ + "gsutil", + "cp", + "-Z", + "[START_DIR]/test/verbose.log", + "gs://skia-infra-gm/trybot/dm-json-v1/2012/05/14/12/abc123/Test-Debian9-GCC-GCE-CPU-AVX2-x86_64-Debug/1337000001/456789/12/verbose.log" + ], + "name": "upload verbose.log" }, { "name": "$result", diff --git a/infra/bots/recipes/upload_dm_results.py b/infra/bots/recipes/upload_dm_results.py index ee1f671d95..28b2e16da9 100644 --- a/infra/bots/recipes/upload_dm_results.py +++ b/infra/bots/recipes/upload_dm_results.py @@ -30,21 +30,8 @@ def RunSteps(api): results_dir = api.path['start_dir'].join('test') - # Move dm.json and verbose.log to their own directory. - json_file = results_dir.join(DM_JSON) - log_file = results_dir.join(VERBOSE_LOG) - tmp_dir = api.path['start_dir'].join('tmp_upload') - api.file.ensure_directory('makedirs tmp dir', tmp_dir) - api.file.copy('copy dm.json', json_file, tmp_dir) - api.file.remove('rm old dm.json', json_file) - - files = api.file.listdir('check for optional verbose.log file', - results_dir, test_data=['dm.json', 'verbose.log']) - if log_file in files: - api.file.copy('copy verbose.log', log_file, tmp_dir) - api.file.remove('rm old verbose.log', log_file) - - # Upload the images. + # Upload the images. It is *vital* that the images are uploaded first + # so they exist whenever the json is processed. image_dest_path = 'gs://%s/dm-images-v1' % api.properties['gs_bucket'] for ext in ['.png', '.pdf']: files_to_upload = api.file.glob_paths( @@ -55,10 +42,10 @@ 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: - api.gsutil.cp('images', results_dir.join('*%s' % ext), + api.gsutil.cp('%s images' % ext, results_dir.join('*%s' % ext), image_dest_path, multithread=True) - # Upload the JSON summary and verbose.log. + # Compute the directory to upload results to now = api.time.utcnow() summary_dest_path = '/'.join([ 'dm-json-v1', @@ -80,8 +67,18 @@ def RunSteps(api): summary_dest_path = 'gs://%s/%s' % (api.properties['gs_bucket'], summary_dest_path) - api.gsutil.cp('JSON and logs', tmp_dir.join('*'), summary_dest_path, - extra_args=['-z', 'json,log']) + # Directly upload dm.json and verbose.log if it exists + json_file = results_dir.join(DM_JSON) + log_file = results_dir.join(VERBOSE_LOG) + + api.gsutil.cp('dm.json', json_file, + summary_dest_path + '/' + DM_JSON, extra_args=['-Z']) + + files = api.file.listdir('check for optional verbose.log file', + results_dir, test_data=['dm.json', 'verbose.log']) + if log_file in files: + api.gsutil.cp('verbose.log', log_file, + summary_dest_path + '/' + VERBOSE_LOG, extra_args=['-Z']) def GenTests(api): @@ -108,7 +105,7 @@ def GenTests(api): gs_bucket='skia-infra-gm', revision='abc123', path_config='kitchen') + - api.step_data('upload images', retcode=1) + api.step_data('upload .png images', retcode=1) ) yield ( @@ -117,11 +114,11 @@ def GenTests(api): gs_bucket='skia-infra-gm', revision='abc123', path_config='kitchen') + - api.step_data('upload images', retcode=1) + - api.step_data('upload images (attempt 2)', retcode=1) + - api.step_data('upload images (attempt 3)', retcode=1) + - api.step_data('upload images (attempt 4)', retcode=1) + - api.step_data('upload images (attempt 5)', retcode=1) + api.step_data('upload .png images', retcode=1) + + api.step_data('upload .png images (attempt 2)', retcode=1) + + api.step_data('upload .png images (attempt 3)', retcode=1) + + api.step_data('upload .png images (attempt 4)', retcode=1) + + api.step_data('upload .png images (attempt 5)', retcode=1) ) yield (