Flutter Engine
The Flutter Engine
Functions | Variables
test_pathkit 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/pathkit/test_pathkit.sh'
 

Function Documentation

◆ GenTests()

def test_pathkit.GenTests (   api)

Definition at line 100 of file test_pathkit.py.

100def GenTests(api):
101 yield (
102 api.test('Test-Debian10-EMCC-GCE-CPU-AVX2-wasm-Debug-All-PathKit') +
103 api.properties(buildername=('Test-Debian10-EMCC-GCE-CPU-AVX2'
104 '-wasm-Debug-All-PathKit'),
105 repository='https://skia.googlesource.com/skia.git',
106 revision='abc123',
107 gs_bucket='skia-infra-gm',
108 path_config='kitchen',
109 swarm_out_dir='[SWARM_OUT_DIR]')
110 )
111
112 yield (
113 api.test('Test-Debian10-EMCC-GCE-CPU-AVX2-asmjs-Debug-All-PathKit') +
114 api.properties(buildername=('Test-Debian10-EMCC-GCE-CPU-AVX2'
115 '-asmjs-Debug-All-PathKit'),
116 repository='https://skia.googlesource.com/skia.git',
117 revision='abc123',
118 gs_bucket='skia-infra-gm',
119 path_config='kitchen',
120 swarm_out_dir='[SWARM_OUT_DIR]')
121 )
122
123 yield (
124 api.test('Test-Debian10-EMCC-GCE-CPU-AVX2-asmjs-Release-All-PathKit') +
125 api.properties(buildername=('Test-Debian10-EMCC-GCE-CPU-AVX2'
126 '-asmjs-Release-All-PathKit'),
127 repository='https://skia.googlesource.com/skia.git',
128 revision='abc123',
129 gs_bucket='skia-infra-gm',
130 path_config='kitchen',
131 swarm_out_dir='[SWARM_OUT_DIR]')
132 )
133
134 yield (
135 api.test('pathkit_trybot') +
136 api.properties(buildername=('Test-Debian10-EMCC-GCE-CPU-AVX2'
137 '-wasm-Debug-All-PathKit'),
138 repository='https://skia.googlesource.com/skia.git',
139 revision='abc123',
140 gs_bucket='skia-infra-gm',
141 path_config='kitchen',
142 swarm_out_dir='[SWARM_OUT_DIR]',
143 patch_ref='89/456789/12',
144 patch_repo='https://skia.googlesource.com/skia.git',
145 patch_storage='gerrit',
146 patch_set=7,
147 patch_issue=1234,
148 gerrit_project='skia',
149 gerrit_url='https://skia-review.googlesource.com/')
150 )
def GenTests(api)

◆ RunSteps()

def test_pathkit.RunSteps (   api)

Definition at line 29 of file test_pathkit.py.

29def RunSteps(api):
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 # The karma script is configured to look in ./npm-(asmjs|wasm)/bin/test/ for
36 # the test files to load, so we must copy them there (see Set up for docker).
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 # release mode has a .js.mem file that needs to come with.
47 # debug mode has an optional .map file, but we can omit that for tests
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']) # the default is wasm
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
def RunSteps(api)
Definition: test_pathkit.py:29

Variable Documentation

◆ DEPS

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

Definition at line 9 of file test_pathkit.py.

◆ DOCKER_IMAGE

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

Definition at line 25 of file test_pathkit.py.

◆ INNER_KARMA_SCRIPT

string test_pathkit.INNER_KARMA_SCRIPT = 'skia/infra/pathkit/test_pathkit.sh'

Definition at line 26 of file test_pathkit.py.

◆ PYTHON_VERSION_COMPATIBILITY

string test_pathkit.PYTHON_VERSION_COMPATIBILITY = "PY3"

Definition at line 7 of file test_pathkit.py.