2018-10-16 14:15:01 +00:00
|
|
|
# Copyright 2018 The Chromium Authors. All rights reserved.
|
|
|
|
# Use of this source code is governed by a BSD-style license that can be
|
|
|
|
# found in the LICENSE file.
|
|
|
|
|
|
|
|
# Recipe which runs the Canvaskit tests using docker
|
|
|
|
|
2021-11-30 18:59:12 +00:00
|
|
|
PYTHON_VERSION_COMPATIBILITY = "PY3"
|
2021-03-25 14:45:56 +00:00
|
|
|
|
2018-10-16 14:15:01 +00:00
|
|
|
DEPS = [
|
|
|
|
'checkout',
|
2019-11-05 15:08:23 +00:00
|
|
|
'docker',
|
2019-01-22 23:09:30 +00:00
|
|
|
'env',
|
2021-03-29 14:29:40 +00:00
|
|
|
'flavor',
|
2018-10-16 14:15:01 +00:00
|
|
|
'infra',
|
|
|
|
'recipe_engine/file',
|
|
|
|
'recipe_engine/path',
|
|
|
|
'recipe_engine/properties',
|
|
|
|
'recipe_engine/python',
|
|
|
|
'recipe_engine/step',
|
2021-03-29 14:29:40 +00:00
|
|
|
'gold_upload',
|
2018-10-16 14:15:01 +00:00
|
|
|
'run',
|
|
|
|
'vars',
|
|
|
|
]
|
|
|
|
|
|
|
|
|
2021-03-31 20:36:00 +00:00
|
|
|
DOCKER_IMAGE = 'gcr.io/skia-public/gold-karma-chrome-tests:87.0.4280.88_v2'
|
2019-11-05 15:08:23 +00:00
|
|
|
INNER_KARMA_SCRIPT = 'skia/infra/canvaskit/test_canvaskit.sh'
|
2018-10-16 14:15:01 +00:00
|
|
|
|
|
|
|
def RunSteps(api):
|
|
|
|
api.vars.setup()
|
2021-03-29 14:29:40 +00:00
|
|
|
api.flavor.setup('dm')
|
2019-11-05 15:08:23 +00:00
|
|
|
checkout_root = api.path['start_dir']
|
2018-10-16 14:15:01 +00:00
|
|
|
out_dir = api.vars.swarming_out_dir
|
|
|
|
|
2021-12-06 14:22:39 +00:00
|
|
|
# The karma script is configured to look in ./build/ for
|
2018-10-16 14:15:01 +00:00
|
|
|
# the test files to load, so we must copy them there (see Set up for docker).
|
2019-03-11 20:11:58 +00:00
|
|
|
copy_dest = checkout_root.join('skia', 'modules', 'canvaskit',
|
2021-12-06 14:22:39 +00:00
|
|
|
'build')
|
2021-03-25 13:04:43 +00:00
|
|
|
api.file.ensure_directory('mkdirs copy_dest', copy_dest, mode=0o777)
|
2018-10-16 14:15:01 +00:00
|
|
|
base_dir = api.vars.build_dir
|
2021-11-08 20:53:44 +00:00
|
|
|
copies = [
|
|
|
|
{
|
|
|
|
'src': base_dir.join('canvaskit.js'),
|
|
|
|
'dst': copy_dest.join('canvaskit.js'),
|
|
|
|
},
|
|
|
|
{
|
|
|
|
'src': base_dir.join('canvaskit.wasm'),
|
|
|
|
'dst': copy_dest.join('canvaskit.wasm'),
|
|
|
|
},
|
|
|
|
]
|
2019-11-05 15:08:23 +00:00
|
|
|
recursive_read = [checkout_root.join('skia')]
|
|
|
|
|
|
|
|
args = [
|
|
|
|
'--builder', api.vars.builder_name,
|
|
|
|
'--git_hash', api.properties['revision'],
|
|
|
|
'--buildbucket_build_id', api.properties.get('buildbucket_build_id', ''),
|
|
|
|
'--browser', 'Chrome',
|
|
|
|
'--config', api.vars.configuration,
|
|
|
|
'--source_type', 'canvaskit',
|
|
|
|
]
|
2018-10-16 14:15:01 +00:00
|
|
|
if api.vars.is_trybot:
|
2019-11-05 15:08:23 +00:00
|
|
|
args.extend([
|
2018-10-16 14:15:01 +00:00
|
|
|
'--issue', api.vars.issue,
|
|
|
|
'--patchset', api.vars.patchset,
|
|
|
|
])
|
|
|
|
|
2019-11-05 15:08:23 +00:00
|
|
|
api.docker.run(
|
|
|
|
name='Test CanvasKit with Docker',
|
|
|
|
docker_image=DOCKER_IMAGE,
|
|
|
|
src_dir=checkout_root,
|
|
|
|
out_dir=out_dir,
|
2019-11-20 13:28:20 +00:00
|
|
|
script=checkout_root.join(INNER_KARMA_SCRIPT),
|
2019-11-05 15:08:23 +00:00
|
|
|
args=args,
|
|
|
|
docker_args=None,
|
|
|
|
copies=copies,
|
|
|
|
recursive_read=recursive_read,
|
2019-11-21 17:49:16 +00:00
|
|
|
attempts=3,
|
2019-11-05 15:08:23 +00:00
|
|
|
)
|
2018-10-16 14:15:01 +00:00
|
|
|
|
2021-03-29 14:29:40 +00:00
|
|
|
api.gold_upload.upload()
|
2018-10-16 14:15:01 +00:00
|
|
|
|
|
|
|
def GenTests(api):
|
|
|
|
yield (
|
2020-04-07 01:27:14 +00:00
|
|
|
api.test('Test-Debian10-EMCC-GCE-GPU-WEBGL1-wasm-Debug-All-CanvasKit') +
|
|
|
|
api.properties(buildername=('Test-Debian10-EMCC-GCE-GPU-WEBGL1'
|
2018-10-16 14:15:01 +00:00
|
|
|
'-wasm-Debug-All-CanvasKit'),
|
|
|
|
repository='https://skia.googlesource.com/skia.git',
|
|
|
|
revision='abc123',
|
2021-03-25 14:45:56 +00:00
|
|
|
gs_bucket='skia-infra-gm',
|
2018-10-16 14:15:01 +00:00
|
|
|
path_config='kitchen',
|
|
|
|
swarm_out_dir='[SWARM_OUT_DIR]')
|
|
|
|
)
|
|
|
|
|
|
|
|
yield (
|
|
|
|
api.test('canvaskit_trybot') +
|
2020-04-07 01:27:14 +00:00
|
|
|
api.properties(buildername=('Test-Debian10-EMCC-GCE-CPU-AVX2'
|
2018-10-16 14:15:01 +00:00
|
|
|
'-wasm-Debug-All-CanvasKit'),
|
|
|
|
repository='https://skia.googlesource.com/skia.git',
|
|
|
|
revision='abc123',
|
2021-03-25 14:45:56 +00:00
|
|
|
gs_bucket='skia-infra-gm',
|
2018-10-16 14:15:01 +00:00
|
|
|
path_config='kitchen',
|
|
|
|
swarm_out_dir='[SWARM_OUT_DIR]',
|
|
|
|
patch_ref='89/456789/12',
|
|
|
|
patch_repo='https://skia.googlesource.com/skia.git',
|
|
|
|
patch_storage='gerrit',
|
|
|
|
patch_set=7,
|
|
|
|
patch_issue=1234,
|
|
|
|
gerrit_project='skia',
|
|
|
|
gerrit_url='https://skia-review.googlesource.com/')
|
|
|
|
)
|