Flutter Engine
The Flutter Engine
Functions | Variables
test_canvaskit Namespace Reference

Functions

def RunSteps (api)
 
def GenTests (api)
 

Variables

string PYTHON_VERSION_COMPATIBILITY = "PY3"
 
list DEPS
 
string DOCKER_IMAGE = 'gcr.io/skia-public/gold-karma-chrome-tests:87.0.4280.88_v2'
 
string INNER_KARMA_SCRIPT = 'skia/infra/canvaskit/test_canvaskit.sh'
 

Function Documentation

◆ GenTests()

def test_canvaskit.GenTests (   api)

Definition at line 81 of file test_canvaskit.py.

81def GenTests(api):
82 yield (
83 api.test('Test-Debian10-EMCC-GCE-GPU-WEBGL1-wasm-Debug-All-CanvasKit') +
84 api.properties(buildername=('Test-Debian10-EMCC-GCE-GPU-WEBGL1'
85 '-wasm-Debug-All-CanvasKit'),
86 repository='https://skia.googlesource.com/skia.git',
87 revision='abc123',
88 gs_bucket='skia-infra-gm',
89 path_config='kitchen',
90 swarm_out_dir='[SWARM_OUT_DIR]')
91 )
92
93 yield (
94 api.test('canvaskit_trybot') +
95 api.properties(buildername=('Test-Debian10-EMCC-GCE-CPU-AVX2'
96 '-wasm-Debug-All-CanvasKit'),
97 repository='https://skia.googlesource.com/skia.git',
98 revision='abc123',
99 gs_bucket='skia-infra-gm',
100 path_config='kitchen',
101 swarm_out_dir='[SWARM_OUT_DIR]',
102 patch_ref='89/456789/12',
103 patch_repo='https://skia.googlesource.com/skia.git',
104 patch_storage='gerrit',
105 patch_set=7,
106 patch_issue=1234,
107 gerrit_project='skia',
108 gerrit_url='https://skia-review.googlesource.com/')
109 )
def GenTests(api)

◆ RunSteps()

def test_canvaskit.RunSteps (   api)

Definition at line 28 of file test_canvaskit.py.

28def RunSteps(api):
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 # The karma script is configured to look in ./build/ for
35 # the test files to load, so we must copy them there (see Set up for docker).
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
def RunSteps(api)

Variable Documentation

◆ DEPS

list test_canvaskit.DEPS
Initial value:
1= [
2 'checkout',
3 'docker',
4 'env',
5 'flavor',
6 'infra',
7 'recipe_engine/file',
8 'recipe_engine/path',
9 'recipe_engine/properties',
10 'recipe_engine/step',
11 'gold_upload',
12 'run',
13 'vars',
14]

Definition at line 9 of file test_canvaskit.py.

◆ DOCKER_IMAGE

string test_canvaskit.DOCKER_IMAGE = 'gcr.io/skia-public/gold-karma-chrome-tests:87.0.4280.88_v2'

Definition at line 25 of file test_canvaskit.py.

◆ INNER_KARMA_SCRIPT

string test_canvaskit.INNER_KARMA_SCRIPT = 'skia/infra/canvaskit/test_canvaskit.sh'

Definition at line 26 of file test_canvaskit.py.

◆ PYTHON_VERSION_COMPATIBILITY

string test_canvaskit.PYTHON_VERSION_COMPATIBILITY = "PY3"

Definition at line 7 of file test_canvaskit.py.