7PYTHON_VERSION_COMPATIBILITY =
"PY3"
16 'recipe_engine/properties',
23DOCKER_IMAGE =
'gcr.io/skia-public/perf-karma-chrome-tests:87.0.4280.88_v1'
24INNER_KARMA_SCRIPT =
'skia/infra/pathkit/perf_pathkit.sh'
29 checkout_root = api.path.start_dir
30 out_dir = api.vars.swarming_out_dir
33 api.file.ensure_directory(
'mkdirs out_dir', out_dir, mode=0o777)
37 copy_dest = checkout_root.join(
'skia',
'modules',
'pathkit',
39 if 'asmjs' in api.vars.builder_name:
40 copy_dest = checkout_root.join(
'skia',
'modules',
'pathkit',
43 base_dir = api.vars.build_dir
44 bundle_name =
'pathkit.wasm'
45 if 'asmjs' in api.vars.builder_name:
46 bundle_name =
'pathkit.js.mem'
50 'src': base_dir.join(
'pathkit.js'),
51 'dst': copy_dest.join(
'pathkit.js'),
54 'src': base_dir.join(bundle_name),
55 'dst': copy_dest.join(bundle_name),
58 recursive_read = [checkout_root.join(
'skia')]
61 if 'asmjs' in api.vars.builder_name:
62 docker_args = [
'--env',
'ASM_JS=1']
65 '--builder', api.vars.builder_name,
66 '--git_hash', api.properties[
'revision'],
67 '--buildbucket_build_id', api.properties.get(
'buildbucket_build_id',
''),
68 '--bot_id', api.vars.swarming_bot_id,
69 '--task_id', api.vars.swarming_task_id,
70 '--browser',
'Chrome',
71 '--config', api.vars.configuration,
72 '--source_type',
'pathkit',
74 if 'asmjs' in api.vars.builder_name:
75 args.extend([
'--compiled_language',
'asmjs'])
76 if api.vars.is_trybot:
78 '--issue', api.vars.issue,
79 '--patchset', api.vars.patchset,
83 name=
'Performance tests of PathKit with Docker',
84 docker_image=DOCKER_IMAGE,
85 src_dir=checkout_root,
87 script=checkout_root.join(INNER_KARMA_SCRIPT),
89 docker_args=docker_args,
91 recursive_read=recursive_read,
98 api.test(
'Perf-Debian10-EMCC-GCE-CPU-AVX2-wasm-Release-All-PathKit') +
99 api.properties(buildername=(
'Perf-Debian10-EMCC-GCE-CPU-AVX2'
100 '-wasm-Release-All-PathKit'),
101 repository=
'https://skia.googlesource.com/skia.git',
103 path_config=
'kitchen',
104 swarm_out_dir=
'[SWARM_OUT_DIR]')
108 api.test(
'Perf-Debian10-EMCC-GCE-CPU-AVX2-asmjs-Release-All-PathKit') +
109 api.properties(buildername=(
'Perf-Debian10-EMCC-GCE-CPU-AVX2'
110 '-asmjs-Release-All-PathKit'),
111 repository=
'https://skia.googlesource.com/skia.git',
113 path_config=
'kitchen',
114 swarm_out_dir=
'[SWARM_OUT_DIR]')
118 api.test(
'pathkit_trybot') +
119 api.properties(buildername=(
'Perf-Debian10-EMCC-GCE-CPU-AVX2'
120 '-wasm-Release-All-PathKit'),
121 repository=
'https://skia.googlesource.com/skia.git',
123 path_config=
'kitchen',
124 swarm_out_dir=
'[SWARM_OUT_DIR]',
125 patch_ref=
'89/456789/12',
126 patch_repo=
'https://skia.googlesource.com/skia.git',
127 patch_storage=
'gerrit',
130 gerrit_project=
'skia',
131 gerrit_url=
'https://skia-review.googlesource.com/')