30 api.vars.setup()
31 api.flavor.setup("dm")
32 checkout_root = api.path.start_dir
33 out_dir = api.vars.swarming_out_dir
34
35
36
37 copy_dest = checkout_root.join('skia', 'modules', 'pathkit',
38 'build', 'wasm')
39 if 'asmjs' in api.vars.builder_name:
40 copy_dest = checkout_root.join('skia', 'modules', 'pathkit',
41 'build', 'asmjs')
42
43 base_dir = api.vars.build_dir
44 bundle_name = 'pathkit.wasm'
45 if 'asmjs' in api.vars.builder_name:
46
47
48 if 'Debug' in api.vars.builder_name:
49 bundle_name = ''
50 else:
51 bundle_name = 'pathkit.js.mem'
52
53 copies = [{
54 'src': base_dir.join('pathkit.js'),
55 'dst': copy_dest.join('pathkit.js'),
56 }]
57 if bundle_name:
58 copies.append({
59 'src': base_dir.join(bundle_name),
60 'dst': copy_dest.join(bundle_name),
61 })
62 recursive_read = [checkout_root.join('skia')]
63
64 docker_args = None
65 if 'asmjs' in api.vars.builder_name:
66 docker_args = ['--env', 'ASM_JS=1']
67
68 args = [
69 '--builder', api.vars.builder_name,
70 '--git_hash', api.properties['revision'],
71 '--buildbucket_build_id', api.properties.get('buildbucket_build_id', ''),
72 '--browser', 'Chrome',
73 '--config', api.vars.configuration,
74 '--source_type', 'pathkit',
75 ]
76 if 'asmjs' in api.vars.builder_name:
77 args.extend(['--compiled_language', 'asmjs'])
78 if api.vars.is_trybot:
79 args.extend([
80 '--issue', api.vars.issue,
81 '--patchset', api.vars.patchset,
82 ])
83
84 api.docker.run(
85 name='Test PathKit with Docker',
86 docker_image=DOCKER_IMAGE,
87 src_dir=checkout_root,
88 out_dir=out_dir,
89 script=checkout_root.join(INNER_KARMA_SCRIPT),
90 args=args,
91 docker_args=docker_args,
92 copies=copies,
93 recursive_read=recursive_read,
94 attempts=3,
95 )
96
97 api.gold_upload.upload()
98
99