22
23 api.vars.setup()
24
25 now = api.time.utcnow()
26 src_path = api.path.start_dir.join('perf')
27 with api.context(cwd=src_path):
28 results = api.file.glob_paths(
29 'find results',
30 src_path,
31 '*.json',
32 test_data=['nanobench_abc123.json'])
34 raise Exception('Unable to find nanobench JSON file!')
35
36 src = results[0]
37 basename = api.path.basename(src)
39 'nano-json-v1', str(now.year).zfill(4),
40 str(now.month).zfill(2), str(now.day).zfill(2), str(now.hour).zfill(2),
41 api.vars.builder_name))
42
43 if api.vars.is_trybot:
44 gs_path =
'/'.
join((
'trybot', gs_path,
45 str(api.vars.issue), str(api.vars.patchset)))
46
48 'gs://%s' % api.properties['gs_bucket'], gs_path, basename))
49
50 api.step(
51 'upload',
52 cmd=['gsutil', 'cp', '-z', 'json', src, dst],
53 infra_step=True)
54
55
static SkString join(const CommandLineFlags::StringArray &)