11PYTHON_VERSION_COMPATIBILITY =
"PY3"
17 'recipe_engine/properties',
26VERBOSE_LOG =
'verbose.log'
31 revision = api.properties[
'revision']
33 results_dir = api.path.start_dir.join(
'test')
37 image_dest_path =
'gs://%s/dm-images-v1' % api.properties[
'gs_bucket']
38 for ext
in [
'.png',
'.pdf']:
39 files_to_upload = api.file.glob_paths(
40 'find %s images' % ext,
43 test_data=[
'someimage.png'])
45 files_to_upload = [f
for f
in files_to_upload
if str(f).endswith(ext)]
46 if len(files_to_upload) > 0:
47 api.gsutil.cp(
'%s images' % ext, results_dir.join(
'*%s' % ext),
48 image_dest_path, multithread=
True)
51 now = api.time.utcnow()
52 summary_dest_path =
'/'.
join([
54 str(now.year ).zfill(4),
55 str(now.month).zfill(2),
56 str(now.day ).zfill(2),
57 str(now.hour ).zfill(2),
59 api.vars.builder_name,
60 str(
int(calendar.timegm(now.utctimetuple())))])
63 if api.vars.is_trybot:
64 summary_dest_path =
'/'.
join((
'trybot', summary_dest_path,
65 str(api.vars.issue), str(api.vars.patchset)))
67 summary_dest_path =
'gs://%s/%s' % (api.properties[
'gs_bucket'],
71 json_file = results_dir.join(DM_JSON)
72 log_file = results_dir.join(VERBOSE_LOG)
74 api.gsutil.cp(
'dm.json', json_file,
75 summary_dest_path +
'/' + DM_JSON, extra_args=[
'-Z'])
77 files = api.file.listdir(
'check for optional verbose.log file',
78 results_dir, test_data=[
'dm.json',
'verbose.log'])
80 api.gsutil.cp(
'verbose.log', log_file,
81 summary_dest_path +
'/' + VERBOSE_LOG, extra_args=[
'-Z'])
85 builder =
'Upload-Test-Debian10-Clang-GCE-CPU-AVX2-x86_64-Debug-All'
87 api.test(
'normal_bot') +
88 api.properties(buildername=builder,
89 gs_bucket=
'skia-infra-gm',
91 path_config=
'kitchen')
95 api.test(
'alternate_bucket') +
96 api.properties(buildername=builder,
97 gs_bucket=
'skia-infra-gm-alt',
99 path_config=
'kitchen')
103 api.test(
'failed_once') +
104 api.properties(buildername=builder,
105 gs_bucket=
'skia-infra-gm',
107 path_config=
'kitchen') +
108 api.step_data(
'upload .png images', retcode=1)
112 api.test(
'failed_all') +
113 api.properties(buildername=builder,
114 gs_bucket=
'skia-infra-gm',
116 path_config=
'kitchen') +
117 api.step_data(
'upload .png images', retcode=1) +
118 api.step_data(
'upload .png images (attempt 2)', retcode=1) +
119 api.step_data(
'upload .png images (attempt 3)', retcode=1) +
120 api.step_data(
'upload .png images (attempt 4)', retcode=1) +
121 api.step_data(
'upload .png images (attempt 5)', retcode=1)
126 api.properties.tryserver(
127 gerrit_project=
'skia',
128 gerrit_url=
'https://skia-review.googlesource.com/',
132 gs_bucket=
'skia-infra-gm',
134 path_config=
'kitchen')
static SkString join(const CommandLineFlags::StringArray &)