29def RunSteps(api):
30 api.vars.setup()
31 revision = api.properties['revision']
32
33 results_dir = api.path['start_dir'].join('test')
34
35
36
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,
41 results_dir,
42 '*%s' % ext,
43 test_data=['someimage.png'])
44
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)
49
50
51 now = api.time.utcnow()
52 summary_dest_path = '/'.join([
53 'dm-json-v1',
54 str(now.year ).zfill(4),
55 str(now.month).zfill(2),
56 str(now.day ).zfill(2),
57 str(now.hour ).zfill(2),
58 revision,
59 api.vars.builder_name,
60 str(
int(calendar.timegm(now.utctimetuple())))])
61
62
63 if api.vars.is_trybot:
64 summary_dest_path = '/'.join(('trybot', summary_dest_path,
65 str(api.vars.issue), str(api.vars.patchset)))
66
67 summary_dest_path = 'gs://%s/%s' % (api.properties['gs_bucket'],
68 summary_dest_path)
69
70
71 json_file = results_dir.join(DM_JSON)
72 log_file = results_dir.join(VERBOSE_LOG)
73
74 api.gsutil.cp('dm.json', json_file,
75 summary_dest_path + '/' + DM_JSON, extra_args=['-Z'])
76
77 files = api.file.listdir('check for optional verbose.log file',
78 results_dir, test_data=['dm.json', 'verbose.log'])
79 if log_file in files:
80 api.gsutil.cp('verbose.log', log_file,
81 summary_dest_path + '/' + VERBOSE_LOG, extra_args=['-Z'])
82
83
Type::kYUV Type::kRGBA() int(0.7 *637)