29 api.vars.setup()
30 api.flavor.setup('dm')
31 checkout_root = api.path.start_dir
32 out_dir = api.vars.swarming_out_dir
33
34
35
36 copy_dest = checkout_root.join('skia', 'modules', 'canvaskit',
37 'build')
38 api.file.ensure_directory('mkdirs copy_dest', copy_dest, mode=0o777)
39 base_dir = api.vars.build_dir
40 copies = [
41 {
42 'src': base_dir.join('canvaskit.js'),
43 'dst': copy_dest.join('canvaskit.js'),
44 },
45 {
46 'src': base_dir.join('canvaskit.wasm'),
47 'dst': copy_dest.join('canvaskit.wasm'),
48 },
49 ]
50 recursive_read = [checkout_root.join('skia')]
51
52 args = [
53 '--builder', api.vars.builder_name,
54 '--git_hash', api.properties['revision'],
55 '--buildbucket_build_id', api.properties.get('buildbucket_build_id', ''),
56 '--browser', 'Chrome',
57 '--config', api.vars.configuration,
58 '--source_type', 'canvaskit',
59 ]
60 if api.vars.is_trybot:
61 args.extend([
62 '--issue', api.vars.issue,
63 '--patchset', api.vars.patchset,
64 ])
65
66 api.docker.run(
67 name='Test CanvasKit with Docker',
68 docker_image=DOCKER_IMAGE,
69 src_dir=checkout_root,
70 out_dir=out_dir,
71 script=checkout_root.join(INNER_KARMA_SCRIPT),
72 args=args,
73 docker_args=None,
74 copies=copies,
75 recursive_read=recursive_read,
76 attempts=3,
77 )
78
79 api.gold_upload.upload()
80