blob: b4d77bab624d35b9a14f1446a70b85e495e3d628 [file] [log] [blame]
borenet1ed2ae42016-07-26 11:52:17 -07001# Copyright 2016 The Chromium Authors. All rights reserved.
2# Use of this source code is governed by a BSD-style license that can be
3# found in the LICENSE file.
4
5
6# Recipe module for Skia Swarming test.
7
8
9DEPS = [
borenetbc20a702016-08-03 10:38:44 -070010 'build/file',
borenet1436a092016-08-03 08:23:10 -070011 'core',
borenet1ed2ae42016-07-26 11:52:17 -070012 'recipe_engine/json',
13 'recipe_engine/path',
14 'recipe_engine/platform',
15 'recipe_engine/properties',
borenetbc20a702016-08-03 10:38:44 -070016 'recipe_engine/python',
borenet1ed2ae42016-07-26 11:52:17 -070017 'recipe_engine/raw_io',
borenetbc20a702016-08-03 10:38:44 -070018 'flavor',
borenet1436a092016-08-03 08:23:10 -070019 'run',
borenetbc20a702016-08-03 10:38:44 -070020 'vars',
borenet1ed2ae42016-07-26 11:52:17 -070021]
22
23
24TEST_BUILDERS = {
25 'client.skia': {
26 'skiabot-linux-swarm-000': [
mtkleindf5df812016-09-12 12:24:38 -070027 'Test-Android-Clang-AndroidOne-CPU-MT6582-arm-Release-GN_Android',
mtklein122fac32016-09-19 07:26:41 -070028 'Test-Android-Clang-AndroidOne-GPU-Mali400MP2-arm-Release-GN_Android',
Ben Wagner52245152016-11-02 13:11:05 -040029 'Test-Android-Clang-GalaxyS7-GPU-Adreno530-arm64-Debug-GN_Android',
mtklein122fac32016-09-19 07:26:41 -070030 'Test-Android-Clang-NVIDIA_Shield-GPU-TegraX1-arm64-Debug-GN_Android',
31 'Test-Android-Clang-Nexus10-GPU-MaliT604-arm-Release-GN_Android',
32 'Test-Android-Clang-Nexus6-GPU-Adreno420-arm-Debug-GN_Android',
egdaniel15ba6d92016-09-20 12:39:29 -070033 'Test-Android-Clang-Nexus6p-GPU-Adreno430-arm64-Debug-GN_Android_Vulkan',
mtklein122fac32016-09-19 07:26:41 -070034 'Test-Android-Clang-Nexus7-GPU-Tegra3-arm-Debug-GN_Android',
mtklein122fac32016-09-19 07:26:41 -070035 'Test-Android-Clang-NexusPlayer-CPU-SSE4-x86-Release-GN_Android',
Ben Wagner25509582016-11-04 11:31:05 -040036 'Test-Android-Clang-PixelC-GPU-TegraX1-arm64-Debug-GN_Android',
borenet2c3112d2016-08-05 06:30:10 -070037 'Test-Mac-Clang-MacMini4.1-GPU-GeForce320M-x86_64-Debug',
38 'Test-Mac-Clang-MacMini6.2-CPU-AVX-x86_64-Debug',
39 'Test-Mac-Clang-MacMini6.2-GPU-HD4000-x86_64-Debug-CommandBuffer',
borenet2c3112d2016-08-05 06:30:10 -070040 'Test-Ubuntu-GCC-GCE-CPU-AVX2-x86-Debug',
borenet1ed2ae42016-07-26 11:52:17 -070041 'Test-Ubuntu-GCC-GCE-CPU-AVX2-x86_64-Debug',
mtklein2b3c2a32016-09-08 08:39:34 -070042 'Test-Ubuntu-GCC-GCE-CPU-AVX2-x86_64-Debug-ASAN',
borenet1ed2ae42016-07-26 11:52:17 -070043 'Test-Ubuntu-GCC-GCE-CPU-AVX2-x86_64-Debug-MSAN',
rmistrybcba19d2016-08-11 12:36:58 -070044 'Test-Ubuntu-GCC-GCE-CPU-AVX2-x86_64-Release-Shared',
borenet2c3112d2016-08-05 06:30:10 -070045 'Test-Ubuntu-GCC-GCE-CPU-AVX2-x86_64-Release-TSAN',
borenet1ed2ae42016-07-26 11:52:17 -070046 'Test-Ubuntu-GCC-ShuttleA-GPU-GTX550Ti-x86_64-Release-Valgrind',
borenet2c3112d2016-08-05 06:30:10 -070047 'Test-Win10-MSVC-ShuttleA-GPU-GTX660-x86_64-Debug-Vulkan',
borenet1ed2ae42016-07-26 11:52:17 -070048 'Test-Win8-MSVC-ShuttleB-CPU-AVX2-x86_64-Release-Trybot',
borenet2c3112d2016-08-05 06:30:10 -070049 'Test-Win8-MSVC-ShuttleB-GPU-GTX960-x86_64-Debug-ANGLE',
mtkleindf5df812016-09-12 12:24:38 -070050 'Test-iOS-Clang-iPad4-GPU-SGX554-Arm7-Debug',
borenet1ed2ae42016-07-26 11:52:17 -070051 ],
52 },
53}
54
55
borenete2251ac2016-08-05 05:40:59 -070056def dm_flags(bot):
57 args = []
58
59 # 32-bit desktop bots tend to run out of memory, because they have relatively
60 # far more cores than RAM (e.g. 32 cores, 3G RAM). Hold them back a bit.
61 if '-x86-' in bot and not 'NexusPlayer' in bot:
borenet2c3112d2016-08-05 06:30:10 -070062 args.extend('--threads 4'.split(' '))
borenete2251ac2016-08-05 05:40:59 -070063
64 # These are the canonical configs that we would ideally run on all bots. We
65 # may opt out or substitute some below for specific bots
Matt Sarett5de15c82016-12-15 17:24:17 -050066 configs = ['8888', 'srgb', 'gpu', 'gpudft', 'gpusrgb', 'pdf']
borenete2251ac2016-08-05 05:40:59 -070067 # Add in either msaa4 or msaa16 to the canonical set of configs to run
68 if 'Android' in bot or 'iOS' in bot:
69 configs.append('msaa4')
70 else:
71 configs.append('msaa16')
72
Ben Wagner52245152016-11-02 13:11:05 -040073 # The NP produces a long error stream when we run with MSAA. The Tegra3 just
74 # doesn't support it.
75 if ('NexusPlayer' in bot or
borenete2251ac2016-08-05 05:40:59 -070076 'Tegra3' in bot or
Ben Wagnera2225492016-11-03 09:04:31 -040077 # We aren't interested in fixing msaa bugs on iPad4.
78 'iPad4' in bot or
benjaminwagnerbc02cae2016-09-23 17:45:45 -070079 # skia:5792
80 'iHD530' in bot):
borenete2251ac2016-08-05 05:40:59 -070081 configs = [x for x in configs if 'msaa' not in x]
82
Brian Salomon42cb4902016-11-03 10:08:47 -040083 # The NP produces different images for dft on every run.
84 if 'NexusPlayer' in bot:
85 configs = [x for x in configs if 'gpudft' not in x]
86
Ben Wagner52245152016-11-02 13:11:05 -040087 # Runs out of memory on Android bots. Everyone else seems fine.
88 if 'Android' in bot:
borenete2251ac2016-08-05 05:40:59 -070089 configs.remove('pdf')
90
91 if '-GCE-' in bot:
mtklein896ddb72016-09-14 10:33:12 -070092 configs.extend(['565'])
Matt Sarett5de15c82016-12-15 17:24:17 -050093 configs.extend(['f16'])
borenete2251ac2016-08-05 05:40:59 -070094 configs.extend(['sp-8888', '2ndpic-8888']) # Test niche uses of SkPicture.
mtklein03591a72016-08-07 13:35:46 -070095 configs.extend(['lite-8888']) # Experimental display list.
borenete2251ac2016-08-05 05:40:59 -070096
97 if '-TSAN' not in bot:
98 if ('TegraK1' in bot or
99 'TegraX1' in bot or
100 'GTX550Ti' in bot or
101 'GTX660' in bot or
102 'GT610' in bot):
103 if 'Android' in bot:
borenet2c3112d2016-08-05 06:30:10 -0700104 configs.append('nvprdit4')
borenete2251ac2016-08-05 05:40:59 -0700105 else:
106 configs.append('nvprdit16')
107
Ben Wagner25509582016-11-04 11:31:05 -0400108 # We want to test the OpenGL config not the GLES config on the Shield
109 if 'NVIDIA_Shield' in bot:
borenete2251ac2016-08-05 05:40:59 -0700110 configs = [x.replace('gpu', 'gl') for x in configs]
111 configs = [x.replace('msaa', 'glmsaa') for x in configs]
112 configs = [x.replace('nvpr', 'glnvpr') for x in configs]
113
114 # NP is running out of RAM when we run all these modes. skia:3255
115 if 'NexusPlayer' not in bot:
116 configs.extend(mode + '-8888' for mode in
117 ['serialize', 'tiles_rt', 'pic'])
118
borenete2251ac2016-08-05 05:40:59 -0700119 # Test instanced rendering on a limited number of platforms
borenet2c3112d2016-08-05 06:30:10 -0700120 if 'Nexus6' in bot:
borenete2251ac2016-08-05 05:40:59 -0700121 configs.append('esinst') # esinst4 isn't working yet on Adreno.
Ben Wagner25509582016-11-04 11:31:05 -0400122 elif 'NVIDIA_Shield' in bot:
borenete2251ac2016-08-05 05:40:59 -0700123 # Multisampled instanced configs use nvpr.
124 configs = [x.replace('glnvpr', 'glinst') for x in configs]
125 configs.append('glinst')
Ben Wagner25509582016-11-04 11:31:05 -0400126 elif 'PixelC' in bot:
127 # Multisampled instanced configs use nvpr.
128 configs = [x.replace('nvpr', 'esinst') for x in configs]
129 configs.append('esinst')
borenete2251ac2016-08-05 05:40:59 -0700130 elif 'MacMini6.2' in bot:
borenet2c3112d2016-08-05 06:30:10 -0700131 configs.extend(['glinst', 'glinst16'])
borenete2251ac2016-08-05 05:40:59 -0700132
133 # CommandBuffer bot *only* runs the command_buffer config.
134 if 'CommandBuffer' in bot:
borenet2c3112d2016-08-05 06:30:10 -0700135 configs = ['commandbuffer']
borenete2251ac2016-08-05 05:40:59 -0700136
Brian Salomon02906202016-10-18 13:36:32 -0400137 # ANGLE bot *only* runs the angle configs
138 if 'ANGLE' in bot:
Brian Salomon4a5e49d2016-10-20 10:14:45 -0400139 configs = ['angle_d3d11_es2',
140 'angle_d3d9_es2',
141 'angle_d3d11_es2_msaa4',
142 'angle_gl_es2']
Brian Salomon02906202016-10-18 13:36:32 -0400143
borenete2251ac2016-08-05 05:40:59 -0700144 # Vulkan bot *only* runs the vk config.
145 if 'Vulkan' in bot:
borenet2c3112d2016-08-05 06:30:10 -0700146 configs = ['vk']
borenete2251ac2016-08-05 05:40:59 -0700147
148 args.append('--config')
149 args.extend(configs)
150
151 # Run tests, gms, and image decoding tests everywhere.
rmistry70c43ef2016-08-12 07:25:53 -0700152 args.extend('--src tests gm image colorImage svg'.split(' '))
borenete2251ac2016-08-05 05:40:59 -0700153
154 if 'GalaxyS' in bot:
155 args.extend(('--threads', '0'))
156
mtklein09b352f2016-09-15 06:24:03 -0700157 blacklisted = []
158 def blacklist(quad):
159 config, src, options, name = quad.split(' ') if type(quad) is str else quad
160 if config == '_' or config in configs:
161 blacklisted.extend([config, src, options, name])
borenete2251ac2016-08-05 05:40:59 -0700162
163 # TODO: ???
mtklein09b352f2016-09-15 06:24:03 -0700164 blacklist('f16 _ _ dstreadshuffle')
165 blacklist('f16 image _ _')
mtklein09b352f2016-09-15 06:24:03 -0700166 blacklist('gpusrgb image _ _')
mtklein1bf8e6e2016-09-15 11:02:05 -0700167 blacklist('glsrgb image _ _')
borenete2251ac2016-08-05 05:40:59 -0700168
Matt Sarett5de15c82016-12-15 17:24:17 -0500169 # Decoder tests are now performing gamma correct decodes. This means
170 # that, when viewing the results, we need to perform a gamma correct
171 # encode to PNG. Therefore, we run the image tests in srgb mode instead
172 # of 8888.
173 blacklist('8888 image _ _')
174
borenete2251ac2016-08-05 05:40:59 -0700175 if 'Valgrind' in bot:
176 # These take 18+ hours to run.
mtklein09b352f2016-09-15 06:24:03 -0700177 blacklist('pdf gm _ fontmgr_iter')
178 blacklist('pdf _ _ PANO_20121023_214540.jpg')
179 blacklist('pdf skp _ worldjournal')
180 blacklist('pdf skp _ desk_baidu.skp')
181 blacklist('pdf skp _ desk_wikipedia.skp')
fmalita7de57792016-10-03 11:07:36 -0700182 blacklist('_ svg _ _')
borenete2251ac2016-08-05 05:40:59 -0700183
184 if 'iOS' in bot:
mtklein09b352f2016-09-15 06:24:03 -0700185 blacklist('gpu skp _ _')
186 blacklist('msaa skp _ _')
187 blacklist('msaa16 gm _ tilemodesProcess')
borenete2251ac2016-08-05 05:40:59 -0700188
189 if 'Mac' in bot or 'iOS' in bot:
190 # CG fails on questionable bmps
mtklein09b352f2016-09-15 06:24:03 -0700191 blacklist('_ image gen_platf rgba32abf.bmp')
192 blacklist('_ image gen_platf rgb24prof.bmp')
193 blacklist('_ image gen_platf rgb24lprof.bmp')
194 blacklist('_ image gen_platf 8bpp-pixeldata-cropped.bmp')
195 blacklist('_ image gen_platf 4bpp-pixeldata-cropped.bmp')
196 blacklist('_ image gen_platf 32bpp-pixeldata-cropped.bmp')
197 blacklist('_ image gen_platf 24bpp-pixeldata-cropped.bmp')
borenete2251ac2016-08-05 05:40:59 -0700198
199 # CG has unpredictable behavior on this questionable gif
200 # It's probably using uninitialized memory
mtklein09b352f2016-09-15 06:24:03 -0700201 blacklist('_ image gen_platf frame_larger_than_image.gif')
borenete2251ac2016-08-05 05:40:59 -0700202
msarett16b15dd2016-09-20 05:50:16 -0700203 # CG has unpredictable behavior on incomplete pngs
204 # skbug.com/5774
205 blacklist('_ image gen_platf inc0.png')
206 blacklist('_ image gen_platf inc1.png')
207 blacklist('_ image gen_platf inc2.png')
208 blacklist('_ image gen_platf inc3.png')
209 blacklist('_ image gen_platf inc4.png')
210 blacklist('_ image gen_platf inc5.png')
211 blacklist('_ image gen_platf inc6.png')
212 blacklist('_ image gen_platf inc7.png')
213 blacklist('_ image gen_platf inc8.png')
214 blacklist('_ image gen_platf inc9.png')
215 blacklist('_ image gen_platf inc10.png')
216 blacklist('_ image gen_platf inc11.png')
217 blacklist('_ image gen_platf inc12.png')
218 blacklist('_ image gen_platf inc13.png')
219 blacklist('_ image gen_platf inc14.png')
220
borenete2251ac2016-08-05 05:40:59 -0700221 # WIC fails on questionable bmps
222 if 'Win' in bot:
mtklein09b352f2016-09-15 06:24:03 -0700223 blacklist('_ image gen_platf rle8-height-negative.bmp')
224 blacklist('_ image gen_platf rle4-height-negative.bmp')
225 blacklist('_ image gen_platf pal8os2v2.bmp')
226 blacklist('_ image gen_platf pal8os2v2-16.bmp')
227 blacklist('_ image gen_platf rgba32abf.bmp')
228 blacklist('_ image gen_platf rgb24prof.bmp')
229 blacklist('_ image gen_platf rgb24lprof.bmp')
230 blacklist('_ image gen_platf 8bpp-pixeldata-cropped.bmp')
231 blacklist('_ image gen_platf 4bpp-pixeldata-cropped.bmp')
232 blacklist('_ image gen_platf 32bpp-pixeldata-cropped.bmp')
233 blacklist('_ image gen_platf 24bpp-pixeldata-cropped.bmp')
borenete2251ac2016-08-05 05:40:59 -0700234 if 'x86_64' in bot and 'CPU' in bot:
235 # This GM triggers a SkSmallAllocator assert.
mtklein09b352f2016-09-15 06:24:03 -0700236 blacklist('_ gm _ composeshader_bitmap')
borenete2251ac2016-08-05 05:40:59 -0700237
238 if 'Android' in bot or 'iOS' in bot:
239 # This test crashes the N9 (perhaps because of large malloc/frees). It also
240 # is fairly slow and not platform-specific. So we just disable it on all of
241 # Android and iOS. skia:5438
mtklein09b352f2016-09-15 06:24:03 -0700242 blacklist('_ test _ GrShape')
borenete2251ac2016-08-05 05:40:59 -0700243
244 if 'Win8' in bot:
245 # bungeman: "Doesn't work on Windows anyway, produces unstable GMs with
246 # 'Unexpected error' from DirectWrite"
mtklein09b352f2016-09-15 06:24:03 -0700247 blacklist('_ gm _ fontscalerdistortable')
fmalitab5b6de92016-08-16 07:08:48 -0700248 # skia:5636
mtklein09b352f2016-09-15 06:24:03 -0700249 blacklist('_ svg _ Nebraska-StateSeal.svg')
borenete2251ac2016-08-05 05:40:59 -0700250
251 # skia:4095
252 bad_serialize_gms = ['bleed_image',
253 'c_gms',
254 'colortype',
255 'colortype_xfermodes',
256 'drawfilter',
257 'fontmgr_bounds_0.75_0',
258 'fontmgr_bounds_1_-0.25',
259 'fontmgr_bounds',
260 'fontmgr_match',
fmalitace2fc6a2016-08-26 10:13:39 -0700261 'fontmgr_iter',
262 'imagemasksubset']
borenete2251ac2016-08-05 05:40:59 -0700263
264 # skia:5589
265 bad_serialize_gms.extend(['bitmapfilters',
266 'bitmapshaders',
267 'bleed',
268 'bleed_alpha_bmp',
269 'bleed_alpha_bmp_shader',
270 'convex_poly_clip',
271 'extractalpha',
272 'filterbitmap_checkerboard_32_32_g8',
273 'filterbitmap_image_mandrill_64',
274 'shadows',
275 'simpleaaclip_aaclip'])
276 # skia:5595
277 bad_serialize_gms.extend(['composeshader_bitmap',
278 'scaled_tilemodes_npot',
279 'scaled_tilemodes'])
liyuqianbfebe222016-11-14 11:17:16 -0800280
mtklein768dc8f2016-09-20 15:41:29 -0700281 # skia:5778
282 bad_serialize_gms.append('typefacerendering_pfaMac')
liyuqianbfebe222016-11-14 11:17:16 -0800283 # skia:5942
284 bad_serialize_gms.append('parsedpaths')
Florin Malitaca795352016-11-16 14:45:34 -0500285
286 # these use a custom image generator which doesn't serialize
287 bad_serialize_gms.append('ImageGeneratorExternal_rect')
288 bad_serialize_gms.append('ImageGeneratorExternal_shader')
289
borenete2251ac2016-08-05 05:40:59 -0700290 for test in bad_serialize_gms:
mtklein09b352f2016-09-15 06:24:03 -0700291 blacklist(['serialize-8888', 'gm', '_', test])
borenete2251ac2016-08-05 05:40:59 -0700292
293 if 'Mac' not in bot:
294 for test in ['bleed_alpha_image', 'bleed_alpha_image_shader']:
mtklein09b352f2016-09-15 06:24:03 -0700295 blacklist(['serialize-8888', 'gm', '_', test])
borenete2251ac2016-08-05 05:40:59 -0700296 # It looks like we skip these only for out-of-memory concerns.
297 if 'Win' in bot or 'Android' in bot:
298 for test in ['verylargebitmap', 'verylarge_picture_image']:
mtklein09b352f2016-09-15 06:24:03 -0700299 blacklist(['serialize-8888', 'gm', '_', test])
borenete2251ac2016-08-05 05:40:59 -0700300
301 # skia:4769
302 for test in ['drawfilter']:
mtklein09b352f2016-09-15 06:24:03 -0700303 blacklist([ 'sp-8888', 'gm', '_', test])
304 blacklist([ 'pic-8888', 'gm', '_', test])
305 blacklist(['2ndpic-8888', 'gm', '_', test])
306 blacklist([ 'lite-8888', 'gm', '_', test])
borenete2251ac2016-08-05 05:40:59 -0700307 # skia:4703
308 for test in ['image-cacherator-from-picture',
309 'image-cacherator-from-raster',
310 'image-cacherator-from-ctable']:
mtklein09b352f2016-09-15 06:24:03 -0700311 blacklist([ 'sp-8888', 'gm', '_', test])
312 blacklist([ 'pic-8888', 'gm', '_', test])
313 blacklist([ '2ndpic-8888', 'gm', '_', test])
314 blacklist(['serialize-8888', 'gm', '_', test])
borenete2251ac2016-08-05 05:40:59 -0700315
fmalitaed387722016-09-30 06:14:49 -0700316 # GM that requires raster-backed canvas
Stan Iliev5f1bb0a2016-12-12 17:39:55 -0500317 for test in ['gamut', 'complexclip4_bw', 'complexclip4_aa']:
fmalitaed387722016-09-30 06:14:49 -0700318 blacklist([ 'sp-8888', 'gm', '_', test])
319 blacklist([ 'pic-8888', 'gm', '_', test])
320 blacklist([ 'lite-8888', 'gm', '_', test])
321 blacklist([ '2ndpic-8888', 'gm', '_', test])
322 blacklist(['serialize-8888', 'gm', '_', test])
323
Stan Iliev9f8bdbb2016-12-14 17:07:37 -0500324 # GM that not support tiles_rt
325 for test in ['complexclip4_bw', 'complexclip4_aa']:
326 blacklist([ 'tiles_rt-8888', 'gm', '_', test])
327
borenete2251ac2016-08-05 05:40:59 -0700328 # Extensions for RAW images
329 r = ["arw", "cr2", "dng", "nef", "nrw", "orf", "raf", "rw2", "pef", "srw",
330 "ARW", "CR2", "DNG", "NEF", "NRW", "ORF", "RAF", "RW2", "PEF", "SRW"]
331
332 # skbug.com/4888
333 # Blacklist RAW images (and a few large PNGs) on GPU bots
334 # until we can resolve failures
335 if 'GPU' in bot:
mtklein09b352f2016-09-15 06:24:03 -0700336 blacklist('_ image _ interlaced1.png')
337 blacklist('_ image _ interlaced2.png')
338 blacklist('_ image _ interlaced3.png')
borenete2251ac2016-08-05 05:40:59 -0700339 for raw_ext in r:
mtklein09b352f2016-09-15 06:24:03 -0700340 blacklist('_ image _ .%s' % raw_ext)
borenete2251ac2016-08-05 05:40:59 -0700341
borenete2251ac2016-08-05 05:40:59 -0700342 # Large image that overwhelms older Mac bots
borenet2c3112d2016-08-05 06:30:10 -0700343 if 'MacMini4.1-GPU' in bot:
mtklein09b352f2016-09-15 06:24:03 -0700344 blacklist('_ image _ abnormal.wbmp')
345 blacklist(['msaa16', 'gm', '_', 'blurcircles'])
borenete2251ac2016-08-05 05:40:59 -0700346
347 match = []
348 if 'Valgrind' in bot: # skia:3021
349 match.append('~Threaded')
350
borenete2251ac2016-08-05 05:40:59 -0700351 if 'AndroidOne' in bot: # skia:4711
borenet2c3112d2016-08-05 06:30:10 -0700352 match.append('~WritePixels')
borenete2251ac2016-08-05 05:40:59 -0700353
354 if 'NexusPlayer' in bot:
borenet2c3112d2016-08-05 06:30:10 -0700355 match.append('~ResourceCache')
borenete2251ac2016-08-05 05:40:59 -0700356
357 if 'Nexus10' in bot: # skia:5509
borenet2c3112d2016-08-05 06:30:10 -0700358 match.append('~CopySurface')
borenete2251ac2016-08-05 05:40:59 -0700359
borenet2c3112d2016-08-05 06:30:10 -0700360 if 'ANGLE' in bot and 'Debug' in bot:
borenete2251ac2016-08-05 05:40:59 -0700361 match.append('~GLPrograms') # skia:4717
362
363 if 'MSAN' in bot:
364 match.extend(['~Once', '~Shared']) # Not sure what's up with these tests.
365
borenet2c3112d2016-08-05 06:30:10 -0700366 if 'TSAN' in bot:
borenete2251ac2016-08-05 05:40:59 -0700367 match.extend(['~ReadWriteAlpha']) # Flaky on TSAN-covered on nvidia bots.
Mike Klein4d7bb932016-10-19 12:18:01 -0400368 match.extend(['~RGBA4444TextureTest', # Flakier than they are important.
369 '~RGB565TextureTest'])
borenete2251ac2016-08-05 05:40:59 -0700370
egdaniel15ba6d92016-09-20 12:39:29 -0700371 if 'Vulkan' in bot and 'Adreno' in bot:
372 # skia:5777
373 match.extend(['~XfermodeImageFilterCroppedInput',
374 '~GrTextureStripAtlasFlush',
375 '~CopySurface'])
376
mtklein09b352f2016-09-15 06:24:03 -0700377 if blacklisted:
borenete2251ac2016-08-05 05:40:59 -0700378 args.append('--blacklist')
mtklein09b352f2016-09-15 06:24:03 -0700379 args.extend(blacklisted)
borenete2251ac2016-08-05 05:40:59 -0700380
381 if match:
382 args.append('--match')
383 args.extend(match)
384
385 # These bots run out of memory running RAW codec tests. Do not run them in
386 # parallel
387 if ('NexusPlayer' in bot or 'Nexus5' in bot or 'Nexus9' in bot
388 or 'Win8-MSVC-ShuttleB' in bot):
389 args.append('--noRAW_threading')
390
391 return args
392
393
borenetbc20a702016-08-03 10:38:44 -0700394def key_params(api):
395 """Build a unique key from the builder name (as a list).
396
397 E.g. arch x86 gpu GeForce320M mode MacMini4.1 os Mac10.6
398 """
399 # Don't bother to include role, which is always Test.
400 # TryBots are uploaded elsewhere so they can use the same key.
401 blacklist = ['role', 'is_trybot']
402
403 flat = []
404 for k in sorted(api.vars.builder_cfg.keys()):
405 if k not in blacklist:
406 flat.append(k)
407 flat.append(api.vars.builder_cfg[k])
408 return flat
409
410
411def test_steps(api):
412 """Run the DM test."""
413 use_hash_file = False
414 if api.vars.upload_dm_results:
415 # This must run before we write anything into
416 # api.flavor.device_dirs.dm_dir or we may end up deleting our
417 # output on machines where they're the same.
418 api.flavor.create_clean_host_dir(api.vars.dm_dir)
419 host_dm_dir = str(api.vars.dm_dir)
420 device_dm_dir = str(api.flavor.device_dirs.dm_dir)
421 if host_dm_dir != device_dm_dir:
422 api.flavor.create_clean_device_dir(device_dm_dir)
423
424 # Obtain the list of already-generated hashes.
425 hash_filename = 'uninteresting_hashes.txt'
426
427 # Ensure that the tmp_dir exists.
428 api.run.run_once(api.file.makedirs,
429 'tmp_dir',
430 api.vars.tmp_dir,
431 infra_step=True)
432
433 host_hashes_file = api.vars.tmp_dir.join(hash_filename)
434 hashes_file = api.flavor.device_path_join(
435 api.flavor.device_dirs.tmp_dir, hash_filename)
436 api.run(
437 api.python.inline,
438 'get uninteresting hashes',
439 program="""
440 import contextlib
441 import math
442 import socket
443 import sys
444 import time
445 import urllib2
446
447 HASHES_URL = 'https://gold.skia.org/_/hashes'
448 RETRIES = 5
449 TIMEOUT = 60
450 WAIT_BASE = 15
451
452 socket.setdefaulttimeout(TIMEOUT)
453 for retry in range(RETRIES):
454 try:
455 with contextlib.closing(
456 urllib2.urlopen(HASHES_URL, timeout=TIMEOUT)) as w:
457 hashes = w.read()
458 with open(sys.argv[1], 'w') as f:
459 f.write(hashes)
460 break
461 except Exception as e:
462 print 'Failed to get uninteresting hashes from %s:' % HASHES_URL
463 print e
464 if retry == RETRIES:
465 raise
466 waittime = WAIT_BASE * math.pow(2, retry)
467 print 'Retry in %d seconds.' % waittime
468 time.sleep(waittime)
469 """,
470 args=[host_hashes_file],
471 cwd=api.vars.skia_dir,
472 abort_on_failure=False,
473 fail_build_on_failure=False,
474 infra_step=True)
475
476 if api.path.exists(host_hashes_file):
477 api.flavor.copy_file_to_device(host_hashes_file, hashes_file)
478 use_hash_file = True
479
480 # Run DM.
481 properties = [
482 'gitHash', api.vars.got_revision,
483 'master', api.vars.master_name,
484 'builder', api.vars.builder_name,
485 'build_number', api.vars.build_number,
486 ]
487 if api.vars.is_trybot:
488 properties.extend([
rmistry3f1c9c02016-08-24 05:07:06 -0700489 'issue', api.vars.issue,
490 'patchset', api.vars.patchset,
491 'patch_storage', api.vars.patch_storage,
borenetbc20a702016-08-03 10:38:44 -0700492 ])
borenetbfa5b452016-10-19 10:13:32 -0700493 if api.vars.no_buildbot:
494 properties.extend(['no_buildbot', 'True'])
495 properties.extend(['swarming_bot_id', api.vars.swarming_bot_id])
496 properties.extend(['swarming_task_id', api.vars.swarming_task_id])
borenetbc20a702016-08-03 10:38:44 -0700497
498 args = [
499 'dm',
500 '--undefok', # This helps branches that may not know new flags.
501 '--resourcePath', api.flavor.device_dirs.resource_dir,
502 '--skps', api.flavor.device_dirs.skp_dir,
503 '--images', api.flavor.device_path_join(
504 api.flavor.device_dirs.images_dir, 'dm'),
505 '--colorImages', api.flavor.device_path_join(
506 api.flavor.device_dirs.images_dir, 'colorspace'),
507 '--nameByHash',
508 '--properties'
509 ] + properties
510
rmistry70c43ef2016-08-12 07:25:53 -0700511 args.extend(['--svgs', api.flavor.device_dirs.svg_dir])
rmistrybcba19d2016-08-11 12:36:58 -0700512
borenetbc20a702016-08-03 10:38:44 -0700513 args.append('--key')
514 args.extend(key_params(api))
515 if use_hash_file:
516 args.extend(['--uninterestingHashesFile', hashes_file])
517 if api.vars.upload_dm_results:
518 args.extend(['--writePath', api.flavor.device_dirs.dm_dir])
519
520 skip_flag = None
521 if api.vars.builder_cfg.get('cpu_or_gpu') == 'CPU':
522 skip_flag = '--nogpu'
523 elif api.vars.builder_cfg.get('cpu_or_gpu') == 'GPU':
524 skip_flag = '--nocpu'
525 if skip_flag:
526 args.append(skip_flag)
borenete2251ac2016-08-05 05:40:59 -0700527 args.extend(dm_flags(api.vars.builder_name))
borenetbc20a702016-08-03 10:38:44 -0700528
529 api.run(api.flavor.step, 'dm', cmd=args,
borenetd460a3c2016-08-05 05:18:05 -0700530 abort_on_failure=False,
531 env=api.vars.default_env)
borenetbc20a702016-08-03 10:38:44 -0700532
533 if api.vars.upload_dm_results:
534 # Copy images and JSON to host machine if needed.
535 api.flavor.copy_directory_contents_to_host(
536 api.flavor.device_dirs.dm_dir, api.vars.dm_dir)
537
538 # See skia:2789.
539 if ('Valgrind' in api.vars.builder_name and
540 api.vars.builder_cfg.get('cpu_or_gpu') == 'GPU'):
541 abandonGpuContext = list(args)
542 abandonGpuContext.append('--abandonGpuContext')
543 api.run(api.flavor.step, 'dm --abandonGpuContext',
544 cmd=abandonGpuContext, abort_on_failure=False)
545 preAbandonGpuContext = list(args)
546 preAbandonGpuContext.append('--preAbandonGpuContext')
547 api.run(api.flavor.step, 'dm --preAbandonGpuContext',
548 cmd=preAbandonGpuContext, abort_on_failure=False,
549 env=api.vars.default_env)
550
551
borenet1ed2ae42016-07-26 11:52:17 -0700552def RunSteps(api):
borenet1436a092016-08-03 08:23:10 -0700553 api.core.setup()
mtkleindf5df812016-09-12 12:24:38 -0700554 try:
Kevin Lubickb03b5ac2016-11-14 13:42:27 -0500555 api.flavor.install_everything()
mtkleindf5df812016-09-12 12:24:38 -0700556 test_steps(api)
557 finally:
558 api.flavor.cleanup_steps()
borenet1436a092016-08-03 08:23:10 -0700559 api.run.check_failure()
borenet1ed2ae42016-07-26 11:52:17 -0700560
561
562def GenTests(api):
borenet1ed2ae42016-07-26 11:52:17 -0700563 for mastername, slaves in TEST_BUILDERS.iteritems():
564 for slavename, builders_by_slave in slaves.iteritems():
565 for builder in builders_by_slave:
566 test = (
567 api.test(builder) +
568 api.properties(buildername=builder,
569 mastername=mastername,
570 slavename=slavename,
571 buildnumber=5,
572 revision='abc123',
573 path_config='kitchen',
574 swarm_out_dir='[SWARM_OUT_DIR]') +
575 api.path.exists(
Ravi Mistry9bcca6a2016-11-21 16:06:19 -0500576 api.path['start_dir'].join('skia'),
577 api.path['start_dir'].join('skia', 'infra', 'bots', 'assets',
borenet1ed2ae42016-07-26 11:52:17 -0700578 'skimage', 'VERSION'),
Ravi Mistry9bcca6a2016-11-21 16:06:19 -0500579 api.path['start_dir'].join('skia', 'infra', 'bots', 'assets',
borenet1ed2ae42016-07-26 11:52:17 -0700580 'skp', 'VERSION'),
Ravi Mistry9bcca6a2016-11-21 16:06:19 -0500581 api.path['start_dir'].join('skia', 'infra', 'bots', 'assets',
rmistrybcba19d2016-08-11 12:36:58 -0700582 'svg', 'VERSION'),
Ravi Mistry9bcca6a2016-11-21 16:06:19 -0500583 api.path['start_dir'].join('tmp', 'uninteresting_hashes.txt')
borenet1ed2ae42016-07-26 11:52:17 -0700584 )
585 )
borenet1ed2ae42016-07-26 11:52:17 -0700586 if 'Trybot' in builder:
587 test += api.properties(issue=500,
588 patchset=1,
589 rietveld='https://codereview.chromium.org')
590 if 'Win' in builder:
591 test += api.platform('win', 64)
592
593
594 yield test
595
596 builder = 'Test-Ubuntu-GCC-GCE-CPU-AVX2-x86_64-Debug'
597 yield (
598 api.test('failed_dm') +
599 api.properties(buildername=builder,
600 mastername='client.skia',
601 slavename='skiabot-linux-swarm-000',
602 buildnumber=6,
603 revision='abc123',
604 path_config='kitchen',
605 swarm_out_dir='[SWARM_OUT_DIR]') +
606 api.path.exists(
Ravi Mistry9bcca6a2016-11-21 16:06:19 -0500607 api.path['start_dir'].join('skia'),
608 api.path['start_dir'].join('skia', 'infra', 'bots', 'assets',
borenet1ed2ae42016-07-26 11:52:17 -0700609 'skimage', 'VERSION'),
Ravi Mistry9bcca6a2016-11-21 16:06:19 -0500610 api.path['start_dir'].join('skia', 'infra', 'bots', 'assets',
borenet1ed2ae42016-07-26 11:52:17 -0700611 'skp', 'VERSION'),
Ravi Mistry9bcca6a2016-11-21 16:06:19 -0500612 api.path['start_dir'].join('skia', 'infra', 'bots', 'assets',
rmistrybcba19d2016-08-11 12:36:58 -0700613 'svg', 'VERSION'),
Ravi Mistry9bcca6a2016-11-21 16:06:19 -0500614 api.path['start_dir'].join('tmp', 'uninteresting_hashes.txt')
borenet1ed2ae42016-07-26 11:52:17 -0700615 ) +
616 api.step_data('dm', retcode=1)
617 )
618
mtklein122fac32016-09-19 07:26:41 -0700619 builder = 'Test-Android-Clang-Nexus7-GPU-Tegra3-arm-Debug-GN_Android'
borenet1ed2ae42016-07-26 11:52:17 -0700620 yield (
621 api.test('failed_get_hashes') +
622 api.properties(buildername=builder,
623 mastername='client.skia',
624 slavename='skiabot-linux-swarm-000',
625 buildnumber=6,
626 revision='abc123',
627 path_config='kitchen',
628 swarm_out_dir='[SWARM_OUT_DIR]') +
629 api.path.exists(
Ravi Mistry9bcca6a2016-11-21 16:06:19 -0500630 api.path['start_dir'].join('skia'),
631 api.path['start_dir'].join('skia', 'infra', 'bots', 'assets',
borenet1ed2ae42016-07-26 11:52:17 -0700632 'skimage', 'VERSION'),
Ravi Mistry9bcca6a2016-11-21 16:06:19 -0500633 api.path['start_dir'].join('skia', 'infra', 'bots', 'assets',
borenet1ed2ae42016-07-26 11:52:17 -0700634 'skp', 'VERSION'),
Ravi Mistry9bcca6a2016-11-21 16:06:19 -0500635 api.path['start_dir'].join('skia', 'infra', 'bots', 'assets',
rmistrybcba19d2016-08-11 12:36:58 -0700636 'svg', 'VERSION'),
Ravi Mistry9bcca6a2016-11-21 16:06:19 -0500637 api.path['start_dir'].join('tmp', 'uninteresting_hashes.txt')
borenet1ed2ae42016-07-26 11:52:17 -0700638 ) +
borenet1ed2ae42016-07-26 11:52:17 -0700639 api.step_data('get uninteresting hashes', retcode=1)
640 )
641
mtklein122fac32016-09-19 07:26:41 -0700642 builder = 'Test-iOS-Clang-iPad4-GPU-SGX554-Arm7-Debug'
borenet1ed2ae42016-07-26 11:52:17 -0700643 yield (
644 api.test('missing_SKP_VERSION_device') +
645 api.properties(buildername=builder,
646 mastername='client.skia',
647 slavename='skiabot-linux-swarm-000',
648 buildnumber=6,
649 revision='abc123',
650 path_config='kitchen',
651 swarm_out_dir='[SWARM_OUT_DIR]') +
652 api.path.exists(
Ravi Mistry9bcca6a2016-11-21 16:06:19 -0500653 api.path['start_dir'].join('skia'),
654 api.path['start_dir'].join('skia', 'infra', 'bots', 'assets',
borenet1ed2ae42016-07-26 11:52:17 -0700655 'skimage', 'VERSION'),
Ravi Mistry9bcca6a2016-11-21 16:06:19 -0500656 api.path['start_dir'].join('skia', 'infra', 'bots', 'assets',
borenet1ed2ae42016-07-26 11:52:17 -0700657 'skp', 'VERSION'),
Ravi Mistry9bcca6a2016-11-21 16:06:19 -0500658 api.path['start_dir'].join('skia', 'infra', 'bots', 'assets',
rmistrybcba19d2016-08-11 12:36:58 -0700659 'svg', 'VERSION'),
Ravi Mistry9bcca6a2016-11-21 16:06:19 -0500660 api.path['start_dir'].join('tmp', 'uninteresting_hashes.txt')
borenet1ed2ae42016-07-26 11:52:17 -0700661 ) +
mtklein122fac32016-09-19 07:26:41 -0700662 api.step_data('read SKP_VERSION', retcode=1)
borenet1ed2ae42016-07-26 11:52:17 -0700663 )
664
665 builder = 'Test-Win8-MSVC-ShuttleB-CPU-AVX2-x86_64-Release-Trybot'
666 yield (
667 api.test('big_issue_number') +
668 api.properties(buildername=builder,
669 mastername='client.skia.compile',
670 slavename='skiabot-linux-swarm-000',
671 buildnumber=5,
672 revision='abc123',
673 path_config='kitchen',
674 swarm_out_dir='[SWARM_OUT_DIR]',
675 rietveld='https://codereview.chromium.org',
676 patchset=1,
677 issue=2147533002L) +
678 api.path.exists(
Ravi Mistry9bcca6a2016-11-21 16:06:19 -0500679 api.path['start_dir'].join('skia'),
680 api.path['start_dir'].join('skia', 'infra', 'bots', 'assets',
borenet1ed2ae42016-07-26 11:52:17 -0700681 'skimage', 'VERSION'),
Ravi Mistry9bcca6a2016-11-21 16:06:19 -0500682 api.path['start_dir'].join('skia', 'infra', 'bots', 'assets',
borenet1ed2ae42016-07-26 11:52:17 -0700683 'skp', 'VERSION'),
Ravi Mistry9bcca6a2016-11-21 16:06:19 -0500684 api.path['start_dir'].join('skia', 'infra', 'bots', 'assets',
rmistrybcba19d2016-08-11 12:36:58 -0700685 'svg', 'VERSION'),
Ravi Mistry9bcca6a2016-11-21 16:06:19 -0500686 api.path['start_dir'].join('tmp', 'uninteresting_hashes.txt')
borenet1ed2ae42016-07-26 11:52:17 -0700687 ) +
688 api.platform('win', 64)
689 )
rmistry3f1c9c02016-08-24 05:07:06 -0700690
691 builder = 'Test-Ubuntu-GCC-GCE-CPU-AVX2-x86-Debug-Trybot'
rmistry3f1c9c02016-08-24 05:07:06 -0700692 yield (
693 api.test('recipe_with_gerrit_patch') +
694 api.properties(
695 buildername=builder,
696 mastername='client.skia',
697 slavename='skiabot-linux-swarm-000',
698 buildnumber=5,
699 path_config='kitchen',
700 swarm_out_dir='[SWARM_OUT_DIR]',
701 revision='abc123',
borenet96b38422016-10-27 06:35:51 -0700702 patch_storage='gerrit') +
703 api.properties.tryserver(
704 buildername=builder,
705 gerrit_project='skia',
706 gerrit_url='https://skia-review.googlesource.com/',
707 )
rmistry3f1c9c02016-08-24 05:07:06 -0700708 )
borenetbfa5b452016-10-19 10:13:32 -0700709
710 yield (
711 api.test('nobuildbot') +
712 api.properties(
713 buildername=builder,
714 mastername='client.skia',
715 slavename='skiabot-linux-swarm-000',
716 buildnumber=5,
717 path_config='kitchen',
718 swarm_out_dir='[SWARM_OUT_DIR]',
719 revision='abc123',
720 nobuildbot='True',
borenet96b38422016-10-27 06:35:51 -0700721 patch_storage='gerrit') +
722 api.properties.tryserver(
723 buildername=builder,
724 gerrit_project='skia',
725 gerrit_url='https://skia-review.googlesource.com/',
726 ) +
borenetbfa5b452016-10-19 10:13:32 -0700727 api.step_data('get swarming bot id',
728 stdout=api.raw_io.output('skia-bot-123')) +
729 api.step_data('get swarming task id', stdout=api.raw_io.output('123456'))
730 )