blob: e4a7c2c239ae46b7ac6712f450d90a405bedd680 [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 = [
Eric Boren4c7754c2017-04-10 08:19:10 -040010 'core',
Eric Boren896af752017-04-24 13:22:56 -040011 'env',
12 'flavor',
Robert Iannucci297a7ef2017-05-12 19:09:38 -070013 'recipe_engine/context',
Robert Iannucci8cd50412017-07-07 14:36:58 -070014 'recipe_engine/file',
Eric Boren4c7754c2017-04-10 08:19:10 -040015 'recipe_engine/json',
borenet1ed2ae42016-07-26 11:52:17 -070016 'recipe_engine/path',
17 'recipe_engine/platform',
18 'recipe_engine/properties',
Eric Boren4c7754c2017-04-10 08:19:10 -040019 'recipe_engine/python',
borenet1ed2ae42016-07-26 11:52:17 -070020 'recipe_engine/raw_io',
Eric Boren4c7754c2017-04-10 08:19:10 -040021 'recipe_engine/step',
Eric Boren4c7754c2017-04-10 08:19:10 -040022 'run',
23 'vars',
borenet1ed2ae42016-07-26 11:52:17 -070024]
25
26
Eric Boren89cd3572017-06-28 13:50:22 -040027def dm_flags(api, bot):
Eric Boren4c7754c2017-04-10 08:19:10 -040028 args = []
29
Mike Klein97d6a7a2017-07-24 10:37:19 -040030 # We've been spending lots of time writing out and especially uploading
31 # .pdfs, but not doing anything further with them. skia:6821
32 args.extend(['--dont_write', 'pdf'])
33
Eric Boren4c7754c2017-04-10 08:19:10 -040034 # This enables non-deterministic random seeding of the GPU FP optimization
Brian Osman7a34dca2017-04-13 13:40:29 -040035 # test.
Ben Wagner6da8f792017-08-10 12:22:56 -040036 # Not Android due to:
Ben Wagner11ab43c2017-08-09 18:05:59 -040037 # - https://skia.googlesource.com/skia/+/
38 # 5910ed347a638ded8cd4c06dbfda086695df1112/BUILD.gn#160
39 # - https://skia.googlesource.com/skia/+/
40 # ce06e261e68848ae21cac1052abc16bc07b961bf/tests/ProcessorTest.cpp#307
Ben Wagner6da8f792017-08-10 12:22:56 -040041 # Not MSAN due to:
42 # - https://skia.googlesource.com/skia/+/
43 # 0ac06e47269a40c177747310a613d213c95d1d6d/infra/bots/recipe_modules/
44 # flavor/gn_flavor.py#80
45 if 'Android' not in bot and 'MSAN' not in bot:
Ben Wagner11ab43c2017-08-09 18:05:59 -040046 args.append('--randomProcessorTest')
Eric Boren4c7754c2017-04-10 08:19:10 -040047
48 # 32-bit desktop bots tend to run out of memory, because they have relatively
49 # far more cores than RAM (e.g. 32 cores, 3G RAM). Hold them back a bit.
50 if '-x86-' in bot and not 'NexusPlayer' in bot:
Mike Kleindf669812017-06-23 13:30:17 -040051 args.extend(['--threads', '4'])
Eric Boren4c7754c2017-04-10 08:19:10 -040052
53 # Avoid issues with dynamically exceeding resource cache limits.
54 if 'Test' in bot and 'DISCARDABLE' in bot:
Mike Kleindf669812017-06-23 13:30:17 -040055 args.extend(['--threads', '0'])
56
57 # See if staying on the main thread helps skia:6748.
58 if 'Test-iOS' in bot:
59 args.extend(['--threads', '0'])
Eric Boren4c7754c2017-04-10 08:19:10 -040060
Derek Sollenbergeredfe3df2017-07-19 15:25:24 -040061 # Android's kernel will occasionally attempt to kill our process, using
62 # SIGINT, in an effort to free up resources. If requested, that signal
63 # is ignored and dm will keep attempting to proceed until we actually
64 # exhaust the available resources.
65 if ('NexusPlayer' in bot or
66 'Nexus10' in bot or
67 'PixelC' in bot):
68 args.append('--ignoreSigInt')
69
Ben Wagner32fa5102017-08-10 21:25:55 -040070 configs = []
71 if api.vars.builder_cfg.get('cpu_or_gpu') == 'CPU':
72 args.append('--nogpu')
73
74 # These are the canonical configs that we would ideally run on all bots. We
75 # may opt out or substitute some below for specific bots
76 configs.extend(['8888', 'srgb', 'pdf'])
77
78 # Runs out of memory on Android bots. Everyone else seems fine.
79 if 'Android' in bot:
80 configs.remove('pdf')
81
82 if '-GCE-' in bot:
83 configs.extend(['565'])
84 configs.extend(['f16'])
85 configs.extend(['sp-8888', '2ndpic-8888']) # Test niche uses of SkPicture.
86 configs.extend(['lite-8888']) # Experimental display list.
87 configs.extend(['gbr-8888'])
88
89 # NP is running out of RAM when we run all these modes. skia:3255
90 if 'NexusPlayer' not in bot:
91 configs.extend(mode + '-8888' for mode in
92 ['serialize', 'tiles_rt', 'pic'])
93
94 if 'Ci20' in bot:
95 # This bot is really slow, cut it down to just 8888.
96 configs = ['8888']
97
98 # This bot only differs from vanilla CPU bots in 8888 config.
99 if 'SK_FORCE_RASTER_PIPELINE_BLITTER' in bot:
100 configs = ['8888', 'srgb']
101
102 elif api.vars.builder_cfg.get('cpu_or_gpu') == 'GPU':
103 args.append('--nocpu')
104
105 # Add in either gles or gl configs to the canonical set based on OS
106 sample_count = '8'
107 gl_prefix = 'gl'
108 if 'Android' in bot or 'iOS' in bot:
109 sample_count = '4'
110 # We want to test the OpenGL config not the GLES config on the Shield
111 if 'NVIDIA_Shield' not in bot:
112 gl_prefix = 'gles'
113 elif 'Intel' in bot:
114 sample_count = ''
115 elif 'ChromeOS' in bot:
Eric Boren4c7754c2017-04-10 08:19:10 -0400116 gl_prefix = 'gles'
Eric Boren4c7754c2017-04-10 08:19:10 -0400117
Ben Wagner32fa5102017-08-10 21:25:55 -0400118 configs.extend([gl_prefix, gl_prefix + 'dft', gl_prefix + 'srgb'])
Eric Boren4c7754c2017-04-10 08:19:10 -0400119 if sample_count is not '':
Ben Wagner32fa5102017-08-10 21:25:55 -0400120 configs.append(gl_prefix + 'msaa' + sample_count)
Eric Boren4c7754c2017-04-10 08:19:10 -0400121
Ben Wagner32fa5102017-08-10 21:25:55 -0400122 # The NP produces a long error stream when we run with MSAA. The Tegra3 just
123 # doesn't support it.
124 if ('NexusPlayer' in bot or
125 'Tegra3' in bot or
126 # We aren't interested in fixing msaa bugs on current iOS devices.
127 'iPad4' in bot or
128 'iPadPro' in bot or
129 'iPhone6' in bot or
130 'iPhone7' in bot or
131 # skia:5792
132 'IntelHD530' in bot or
133 'IntelIris540' in bot):
134 configs = [x for x in configs if 'msaa' not in x]
Eric Boren4c7754c2017-04-10 08:19:10 -0400135
Ben Wagner32fa5102017-08-10 21:25:55 -0400136 # The NP produces different images for dft on every run.
137 if 'NexusPlayer' in bot:
138 configs = [x for x in configs if 'dft' not in x]
Eric Boren4c7754c2017-04-10 08:19:10 -0400139
Ben Wagner32fa5102017-08-10 21:25:55 -0400140 if '-TSAN' not in bot and sample_count is not '':
141 if ('TegraK1' in bot or
142 'TegraX1' in bot or
143 'GTX550Ti' in bot or
144 'GTX660' in bot or
145 'QuadroP400' in bot or
146 ('GT610' in bot and 'Ubuntu17' not in bot)):
147 configs.append(gl_prefix + 'nvprdit' + sample_count)
Kevin Lubickae95db42017-04-10 13:05:49 -0400148
Ben Wagner32fa5102017-08-10 21:25:55 -0400149 # We want to test both the OpenGL config and the GLES config on Linux Intel:
150 # GL is used by Chrome, GLES is used by ChromeOS.
151 if 'Intel' in bot and api.vars.is_linux:
152 configs.extend(['gles', 'glesdft', 'glessrgb'])
Mike Klein97627d42017-05-11 13:12:48 -0400153
Ben Wagner32fa5102017-08-10 21:25:55 -0400154 # The following devices do not support glessrgb.
155 if 'glessrgb' in configs:
156 if ('IntelHD405' in bot or
157 'IntelIris540' in bot or
Ben Wagnerfef8fdd2017-08-11 14:13:56 -0400158 'IntelIris640' in bot or
Ben Wagner32fa5102017-08-10 21:25:55 -0400159 'IntelBayTrail' in bot or
160 'IntelHD2000' in bot or
161 'AndroidOne' in bot or
162 'Nexus7' in bot or
163 'NexusPlayer' in bot):
164 configs.remove('glessrgb')
165
166 # Test instanced rendering on a limited number of platforms
167 if 'Nexus6' in bot:
168 # inst msaa isn't working yet on Adreno.
169 configs.append(gl_prefix + 'inst')
170 elif 'NVIDIA_Shield' in bot or 'PixelC' in bot:
171 # Multisampled instanced configs use nvpr so we substitute inst msaa
172 # configs for nvpr msaa configs.
173 old = gl_prefix + 'nvpr'
174 new = gl_prefix + 'inst'
175 configs = [x.replace(old, new) for x in configs]
176 # We also test non-msaa instanced.
177 configs.append(new)
178 elif 'MacMini6.2' in bot:
179 configs.extend([gl_prefix + 'inst'])
180
181 # CommandBuffer bot *only* runs the command_buffer config.
182 if 'CommandBuffer' in bot:
183 configs = ['commandbuffer']
184
185 # ANGLE bot *only* runs the angle configs
186 if 'ANGLE' in bot:
187 configs = ['angle_d3d11_es2',
188 'angle_d3d9_es2',
189 'angle_gl_es2',
190 'angle_d3d11_es3']
191 if sample_count is not '':
192 configs.append('angle_d3d11_es2_msaa' + sample_count)
193 configs.append('angle_d3d11_es3_msaa' + sample_count)
194
195 # Vulkan bot *only* runs the vk config.
196 if 'Vulkan' in bot:
197 configs = ['vk']
198
199 if 'ChromeOS' in bot:
200 # Just run GLES for now - maybe add gles_msaa4 in the future
201 configs = ['gles']
202
203 # Test coverage counting path renderer.
204 if 'CCPR' in bot:
205 configs = [c for c in configs if c == 'gl' or c == 'gles']
206 args.extend(['--pr', 'ccpr'])
Chris Dalton97598a52017-07-18 10:49:07 -0600207
Chris Dalton80ace822017-07-20 10:54:04 -0600208 args.append('--config')
209 args.extend(configs)
210
Eric Boren4c7754c2017-04-10 08:19:10 -0400211 # Run tests, gms, and image decoding tests everywhere.
212 args.extend('--src tests gm image colorImage svg'.split(' '))
213 if 'Vulkan' in bot and 'NexusPlayer' in bot:
214 args.remove('svg')
215 args.remove('image')
216
Mike Klein97627d42017-05-11 13:12:48 -0400217 # Eventually I'd like these to pass, but for now just skip 'em.
218 if 'SK_FORCE_RASTER_PIPELINE_BLITTER' in bot:
219 args.remove('tests')
220
Eric Boren4c7754c2017-04-10 08:19:10 -0400221 blacklisted = []
222 def blacklist(quad):
223 config, src, options, name = quad.split(' ') if type(quad) is str else quad
224 if config == '_' or config in configs:
225 blacklisted.extend([config, src, options, name])
226
227 # TODO: ???
228 blacklist('f16 _ _ dstreadshuffle')
229 blacklist('glsrgb image _ _')
230 blacklist('glessrgb image _ _')
231
Eric Boren4c7754c2017-04-10 08:19:10 -0400232 # Not any point to running these.
233 blacklist('gbr-8888 image _ _')
234 blacklist('gbr-8888 colorImage _ _')
235
236 if 'Valgrind' in bot:
237 # These take 18+ hours to run.
238 blacklist('pdf gm _ fontmgr_iter')
239 blacklist('pdf _ _ PANO_20121023_214540.jpg')
240 blacklist('pdf skp _ worldjournal')
241 blacklist('pdf skp _ desk_baidu.skp')
242 blacklist('pdf skp _ desk_wikipedia.skp')
243 blacklist('_ svg _ _')
244
245 if 'iOS' in bot:
246 blacklist(gl_prefix + ' skp _ _')
247
248 if 'Mac' in bot or 'iOS' in bot:
249 # CG fails on questionable bmps
250 blacklist('_ image gen_platf rgba32abf.bmp')
251 blacklist('_ image gen_platf rgb24prof.bmp')
252 blacklist('_ image gen_platf rgb24lprof.bmp')
253 blacklist('_ image gen_platf 8bpp-pixeldata-cropped.bmp')
254 blacklist('_ image gen_platf 4bpp-pixeldata-cropped.bmp')
255 blacklist('_ image gen_platf 32bpp-pixeldata-cropped.bmp')
256 blacklist('_ image gen_platf 24bpp-pixeldata-cropped.bmp')
257
258 # CG has unpredictable behavior on this questionable gif
259 # It's probably using uninitialized memory
260 blacklist('_ image gen_platf frame_larger_than_image.gif')
261
262 # CG has unpredictable behavior on incomplete pngs
263 # skbug.com/5774
264 blacklist('_ image gen_platf inc0.png')
265 blacklist('_ image gen_platf inc1.png')
266 blacklist('_ image gen_platf inc2.png')
267 blacklist('_ image gen_platf inc3.png')
268 blacklist('_ image gen_platf inc4.png')
269 blacklist('_ image gen_platf inc5.png')
270 blacklist('_ image gen_platf inc6.png')
271 blacklist('_ image gen_platf inc7.png')
272 blacklist('_ image gen_platf inc8.png')
273 blacklist('_ image gen_platf inc9.png')
274 blacklist('_ image gen_platf inc10.png')
275 blacklist('_ image gen_platf inc11.png')
276 blacklist('_ image gen_platf inc12.png')
277 blacklist('_ image gen_platf inc13.png')
278 blacklist('_ image gen_platf inc14.png')
279
Matt Sarett6c50a2e2017-05-01 09:13:05 -0400280 # WIC fails on questionable bmps
Eric Boren4c7754c2017-04-10 08:19:10 -0400281 if 'Win' in bot:
282 blacklist('_ image gen_platf rle8-height-negative.bmp')
283 blacklist('_ image gen_platf rle4-height-negative.bmp')
284 blacklist('_ image gen_platf pal8os2v2.bmp')
285 blacklist('_ image gen_platf pal8os2v2-16.bmp')
286 blacklist('_ image gen_platf rgba32abf.bmp')
287 blacklist('_ image gen_platf rgb24prof.bmp')
288 blacklist('_ image gen_platf rgb24lprof.bmp')
289 blacklist('_ image gen_platf 8bpp-pixeldata-cropped.bmp')
290 blacklist('_ image gen_platf 4bpp-pixeldata-cropped.bmp')
291 blacklist('_ image gen_platf 32bpp-pixeldata-cropped.bmp')
292 blacklist('_ image gen_platf 24bpp-pixeldata-cropped.bmp')
Eric Boren4c7754c2017-04-10 08:19:10 -0400293 if 'x86_64' in bot and 'CPU' in bot:
294 # This GM triggers a SkSmallAllocator assert.
295 blacklist('_ gm _ composeshader_bitmap')
296
Matt Sarett6c50a2e2017-05-01 09:13:05 -0400297 # WIC and CG fail on arithmetic jpegs
298 if 'Win' in bot or 'Mac' in bot:
299 blacklist('_ image gen_platf testimgari.jpg')
300
Eric Boren4c7754c2017-04-10 08:19:10 -0400301 if 'Android' in bot or 'iOS' in bot:
302 # This test crashes the N9 (perhaps because of large malloc/frees). It also
303 # is fairly slow and not platform-specific. So we just disable it on all of
304 # Android and iOS. skia:5438
305 blacklist('_ test _ GrShape')
306
Eric Boren4c7754c2017-04-10 08:19:10 -0400307 # skia:4095
Mike Reedfb499092017-06-26 13:53:32 +0000308 bad_serialize_gms = ['bleed_image',
Eric Boren4c7754c2017-04-10 08:19:10 -0400309 'c_gms',
310 'colortype',
311 'colortype_xfermodes',
312 'drawfilter',
313 'fontmgr_bounds_0.75_0',
314 'fontmgr_bounds_1_-0.25',
315 'fontmgr_bounds',
316 'fontmgr_match',
317 'fontmgr_iter',
318 'imagemasksubset']
319
320 # skia:5589
321 bad_serialize_gms.extend(['bitmapfilters',
322 'bitmapshaders',
323 'bleed',
324 'bleed_alpha_bmp',
325 'bleed_alpha_bmp_shader',
326 'convex_poly_clip',
327 'extractalpha',
328 'filterbitmap_checkerboard_32_32_g8',
329 'filterbitmap_image_mandrill_64',
330 'shadows',
331 'simpleaaclip_aaclip'])
332 # skia:5595
333 bad_serialize_gms.extend(['composeshader_bitmap',
334 'scaled_tilemodes_npot',
335 'scaled_tilemodes'])
336
337 # skia:5778
338 bad_serialize_gms.append('typefacerendering_pfaMac')
339 # skia:5942
340 bad_serialize_gms.append('parsedpaths')
341
342 # these use a custom image generator which doesn't serialize
343 bad_serialize_gms.append('ImageGeneratorExternal_rect')
344 bad_serialize_gms.append('ImageGeneratorExternal_shader')
345
346 # skia:6189
347 bad_serialize_gms.append('shadow_utils')
348
Matt Sarett9f3dcb32017-05-04 08:53:32 -0400349 # Not expected to round trip encoding/decoding.
350 bad_serialize_gms.append('makecolorspace')
351
Eric Boren4c7754c2017-04-10 08:19:10 -0400352 for test in bad_serialize_gms:
353 blacklist(['serialize-8888', 'gm', '_', test])
354
355 if 'Mac' not in bot:
356 for test in ['bleed_alpha_image', 'bleed_alpha_image_shader']:
357 blacklist(['serialize-8888', 'gm', '_', test])
358 # It looks like we skip these only for out-of-memory concerns.
359 if 'Win' in bot or 'Android' in bot:
360 for test in ['verylargebitmap', 'verylarge_picture_image']:
361 blacklist(['serialize-8888', 'gm', '_', test])
362
363 # skia:4769
364 for test in ['drawfilter']:
365 blacklist([ 'sp-8888', 'gm', '_', test])
366 blacklist([ 'pic-8888', 'gm', '_', test])
367 blacklist(['2ndpic-8888', 'gm', '_', test])
368 blacklist([ 'lite-8888', 'gm', '_', test])
369 # skia:4703
370 for test in ['image-cacherator-from-picture',
371 'image-cacherator-from-raster',
372 'image-cacherator-from-ctable']:
373 blacklist([ 'sp-8888', 'gm', '_', test])
374 blacklist([ 'pic-8888', 'gm', '_', test])
375 blacklist([ '2ndpic-8888', 'gm', '_', test])
376 blacklist(['serialize-8888', 'gm', '_', test])
377
378 # GM that requires raster-backed canvas
379 for test in ['gamut', 'complexclip4_bw', 'complexclip4_aa']:
380 blacklist([ 'sp-8888', 'gm', '_', test])
381 blacklist([ 'pic-8888', 'gm', '_', test])
382 blacklist([ 'lite-8888', 'gm', '_', test])
383 blacklist([ '2ndpic-8888', 'gm', '_', test])
384 blacklist(['serialize-8888', 'gm', '_', test])
385
386 # GM that not support tiles_rt
387 for test in ['complexclip4_bw', 'complexclip4_aa']:
388 blacklist([ 'tiles_rt-8888', 'gm', '_', test])
389
390 # Extensions for RAW images
391 r = ["arw", "cr2", "dng", "nef", "nrw", "orf", "raf", "rw2", "pef", "srw",
392 "ARW", "CR2", "DNG", "NEF", "NRW", "ORF", "RAF", "RW2", "PEF", "SRW"]
393
394 # skbug.com/4888
395 # Blacklist RAW images (and a few large PNGs) on GPU bots
396 # until we can resolve failures.
Matt Sarett929bfeb2017-05-22 10:34:41 -0400397 if 'GPU' in bot:
398 blacklist('_ image _ interlaced1.png')
399 blacklist('_ image _ interlaced2.png')
400 blacklist('_ image _ interlaced3.png')
401 for raw_ext in r:
402 blacklist('_ image _ .%s' % raw_ext)
403
404 # Blacklist memory intensive tests on 32-bit bots.
405 if ('Win2k8' in bot or 'Win8' in bot) and 'x86-' in bot:
406 blacklist('_ image f16 _')
Matt Sarett112565e2017-05-22 13:45:15 -0400407 blacklist('_ image _ abnormal.wbmp')
Eric Boren4c7754c2017-04-10 08:19:10 -0400408 blacklist('_ image _ interlaced1.png')
409 blacklist('_ image _ interlaced2.png')
410 blacklist('_ image _ interlaced3.png')
411 for raw_ext in r:
412 blacklist('_ image _ .%s' % raw_ext)
413
Eric Boren4c7754c2017-04-10 08:19:10 -0400414 if 'IntelHD405' in bot and 'Ubuntu16' in bot:
415 # skia:6331
416 blacklist(['glmsaa8', 'image', 'gen_codec_gpu', 'abnormal.wbmp'])
417 blacklist(['glesmsaa4', 'image', 'gen_codec_gpu', 'abnormal.wbmp'])
418
419 if 'Nexus5' in bot:
420 # skia:5876
421 blacklist(['_', 'gm', '_', 'encode-platform'])
422
423 if 'AndroidOne-GPU' in bot: # skia:4697, skia:4704, skia:4694, skia:4705
424 blacklist(['_', 'gm', '_', 'bigblurs'])
425 blacklist(['_', 'gm', '_', 'bleed'])
426 blacklist(['_', 'gm', '_', 'bleed_alpha_bmp'])
427 blacklist(['_', 'gm', '_', 'bleed_alpha_bmp_shader'])
428 blacklist(['_', 'gm', '_', 'bleed_alpha_image'])
429 blacklist(['_', 'gm', '_', 'bleed_alpha_image_shader'])
430 blacklist(['_', 'gm', '_', 'bleed_image'])
431 blacklist(['_', 'gm', '_', 'dropshadowimagefilter'])
432 blacklist(['_', 'gm', '_', 'filterfastbounds'])
433 blacklist([gl_prefix, 'gm', '_', 'imageblurtiled'])
434 blacklist(['_', 'gm', '_', 'imagefiltersclipped'])
435 blacklist(['_', 'gm', '_', 'imagefiltersscaled'])
436 blacklist(['_', 'gm', '_', 'imageresizetiled'])
437 blacklist(['_', 'gm', '_', 'matrixconvolution'])
438 blacklist(['_', 'gm', '_', 'strokedlines'])
439 if sample_count is not '':
440 gl_msaa_config = gl_prefix + 'msaa' + sample_count
441 blacklist([gl_msaa_config, 'gm', '_', 'imageblurtiled'])
442 blacklist([gl_msaa_config, 'gm', '_', 'imagefiltersbase'])
443
444 match = []
445 if 'Valgrind' in bot: # skia:3021
446 match.append('~Threaded')
447
Ben Wagner6c126422017-06-19 12:45:54 -0400448 if 'Valgrind' in bot and 'PreAbandonGpuContext' in bot:
449 # skia:6575
450 match.append('~multipicturedraw_')
451
Ben Wagnerbb3e7ff2017-04-28 15:28:32 -0400452 if 'CommandBuffer' in bot:
453 # https://crbug.com/697030
454 match.append('~HalfFloatAlphaTextureTest')
455
Eric Boren4c7754c2017-04-10 08:19:10 -0400456 if 'AndroidOne' in bot: # skia:4711
457 match.append('~WritePixels')
458
459 if 'NexusPlayer' in bot:
460 match.append('~ResourceCache')
461
462 if 'Nexus10' in bot:
463 match.append('~CopySurface') # skia:5509
464 match.append('~SRGBReadWritePixels') # skia:6097
465
Eric Boren4c7754c2017-04-10 08:19:10 -0400466 if 'GalaxyS6' in bot:
467 match.append('~SpecialImage') # skia:6338
Brian Osmaneee3c092017-06-15 13:25:10 -0400468 match.append('~skbug6653') # skia:6653
Eric Boren4c7754c2017-04-10 08:19:10 -0400469
470 if 'GalaxyS7_G930A' in bot:
471 match.append('~WritePixels') # skia:6427
472
Eric Boren4c7754c2017-04-10 08:19:10 -0400473 if 'MSAN' in bot:
474 match.extend(['~Once', '~Shared']) # Not sure what's up with these tests.
475
476 if 'TSAN' in bot:
477 match.extend(['~ReadWriteAlpha']) # Flaky on TSAN-covered on nvidia bots.
478 match.extend(['~RGBA4444TextureTest', # Flakier than they are important.
479 '~RGB565TextureTest'])
480
Greg Daniela86385d2017-06-05 11:34:29 -0400481 if 'Vulkan' in bot and 'Adreno530' in bot:
482 # skia:5777
483 match.extend(['~CopySurface'])
Eric Boren4c7754c2017-04-10 08:19:10 -0400484
485 if 'Vulkan' in bot and 'NexusPlayer' in bot:
Greg Daniel98fae702017-06-05 09:22:46 -0400486 match.extend(['~gradients_no_texture$', # skia:6132
Eric Boren4c7754c2017-04-10 08:19:10 -0400487 '~tilemodes', # skia:6132
488 '~shadertext$', # skia:6132
489 '~bitmapfilters', # skia:6132
490 '~GrContextFactory_abandon']) #skia:6209
491
Ben Wagnerbe8ad452017-08-11 15:18:03 -0400492 if ('Vulkan' in bot and api.vars.is_linux and
493 ('IntelIris540' in bot or 'IntelIris640' in bot)):
Eric Boren4c7754c2017-04-10 08:19:10 -0400494 match.extend(['~VkHeapTests']) # skia:6245
495
Ben Wagnerf1debdf2017-06-13 13:37:05 -0400496 if 'Vulkan' in bot and 'IntelIris540' in bot and 'Win' in bot:
Eric Boren4c7754c2017-04-10 08:19:10 -0400497 # skia:6398
498 blacklist(['vk', 'gm', '_', 'aarectmodes'])
499 blacklist(['vk', 'gm', '_', 'aaxfermodes'])
500 blacklist(['vk', 'gm', '_', 'arithmode'])
501 blacklist(['vk', 'gm', '_', 'composeshader_bitmap'])
502 blacklist(['vk', 'gm', '_', 'composeshader_bitmap2'])
503 blacklist(['vk', 'gm', '_', 'dftextCOLR'])
504 blacklist(['vk', 'gm', '_', 'drawregionmodes'])
505 blacklist(['vk', 'gm', '_', 'filterfastbounds'])
506 blacklist(['vk', 'gm', '_', 'fontcache'])
507 blacklist(['vk', 'gm', '_', 'fontmgr_iterWin10'])
508 blacklist(['vk', 'gm', '_', 'fontmgr_iter_factoryWin10'])
509 blacklist(['vk', 'gm', '_', 'fontmgr_matchWin10'])
510 blacklist(['vk', 'gm', '_', 'fontscalerWin'])
511 blacklist(['vk', 'gm', '_', 'fontscalerdistortable'])
512 blacklist(['vk', 'gm', '_', 'gammagradienttext'])
513 blacklist(['vk', 'gm', '_', 'gammatextWin'])
514 blacklist(['vk', 'gm', '_', 'gradtext'])
515 blacklist(['vk', 'gm', '_', 'hairmodes'])
516 blacklist(['vk', 'gm', '_', 'imagefilters_xfermodes'])
517 blacklist(['vk', 'gm', '_', 'imagefiltersclipped'])
518 blacklist(['vk', 'gm', '_', 'imagefiltersgraph'])
519 blacklist(['vk', 'gm', '_', 'imagefiltersscaled'])
520 blacklist(['vk', 'gm', '_', 'imagefiltersstroked'])
521 blacklist(['vk', 'gm', '_', 'imagefilterstransformed'])
522 blacklist(['vk', 'gm', '_', 'imageresizetiled'])
523 blacklist(['vk', 'gm', '_', 'lcdblendmodes'])
524 blacklist(['vk', 'gm', '_', 'lcdoverlap'])
525 blacklist(['vk', 'gm', '_', 'lcdtextWin'])
526 blacklist(['vk', 'gm', '_', 'lcdtextsize'])
527 blacklist(['vk', 'gm', '_', 'matriximagefilter'])
528 blacklist(['vk', 'gm', '_', 'mixedtextblobsCOLR'])
Greg Daniel744d3c52017-06-09 13:50:20 -0400529 blacklist(['vk', 'gm', '_', 'mixershader'])
Eric Boren4c7754c2017-04-10 08:19:10 -0400530 blacklist(['vk', 'gm', '_', 'pictureimagefilter'])
531 blacklist(['vk', 'gm', '_', 'resizeimagefilter'])
532 blacklist(['vk', 'gm', '_', 'rotate_imagefilter'])
533 blacklist(['vk', 'gm', '_', 'savelayer_lcdtext'])
534 blacklist(['vk', 'gm', '_', 'srcmode'])
535 blacklist(['vk', 'gm', '_', 'surfaceprops'])
536 blacklist(['vk', 'gm', '_', 'textblobgeometrychange'])
537 blacklist(['vk', 'gm', '_', 'textbloblooper'])
538 blacklist(['vk', 'gm', '_', 'textblobmixedsizes'])
539 blacklist(['vk', 'gm', '_', 'textblobmixedsizes_df'])
540 blacklist(['vk', 'gm', '_', 'textblobrandomfont'])
541 blacklist(['vk', 'gm', '_', 'textfilter_color'])
542 blacklist(['vk', 'gm', '_', 'textfilter_image'])
543 blacklist(['vk', 'gm', '_', 'typefacerenderingWin'])
544 blacklist(['vk', 'gm', '_', 'varied_text_clipped_lcd'])
545 blacklist(['vk', 'gm', '_', 'varied_text_ignorable_clip_lcd'])
546 blacklist(['vk', 'gm', '_', 'xfermodeimagefilter'])
547 match.append('~ApplyGamma')
548 match.append('~ComposedImageFilterBounds_Gpu')
Matt Sarett77443972017-04-11 11:25:37 -0400549 match.append('~DeferredTextureImage')
Chris Dalton114a3c02017-05-26 15:17:19 -0600550 match.append('~GrMeshTest')
Eric Boren4c7754c2017-04-10 08:19:10 -0400551 match.append('~ImageFilterFailAffectsTransparentBlack_Gpu')
552 match.append('~ImageFilterZeroBlurSigma_Gpu')
553 match.append('~ImageNewShader_GPU')
554 match.append('~NewTextureFromPixmap')
555 match.append('~ReadPixels_Gpu')
556 match.append('~ReadPixels_Texture')
557 match.append('~ReadWriteAlpha')
Brian Osmane18ceb12017-06-15 16:04:45 -0400558 match.append('~skbug6653')
Eric Boren4c7754c2017-04-10 08:19:10 -0400559 match.append('~SRGBReadWritePixels')
560 match.append('~SpecialImage_DeferredGpu')
561 match.append('~SpecialImage_Gpu')
562 match.append('~WritePixels_Gpu')
Brian Osman33ea1362017-04-19 10:51:39 -0400563 match.append('~WritePixelsNonTexture_Gpu')
Eric Boren4c7754c2017-04-10 08:19:10 -0400564 match.append('~XfermodeImageFilterCroppedInput_Gpu')
565
566 if 'IntelIris540' in bot and 'ANGLE' in bot:
Eric Boren4c7754c2017-04-10 08:19:10 -0400567 for config in ['angle_d3d9_es2', 'angle_d3d11_es2', 'angle_gl_es2']:
Brian Salomon6e554e32017-06-23 12:08:10 -0400568 # skia:6103
Eric Boren4c7754c2017-04-10 08:19:10 -0400569 blacklist([config, 'gm', '_', 'multipicturedraw_invpathclip_simple'])
570 blacklist([config, 'gm', '_', 'multipicturedraw_noclip_simple'])
571 blacklist([config, 'gm', '_', 'multipicturedraw_pathclip_simple'])
572 blacklist([config, 'gm', '_', 'multipicturedraw_rectclip_simple'])
573 blacklist([config, 'gm', '_', 'multipicturedraw_rrectclip_simple'])
Brian Salomon6e554e32017-06-23 12:08:10 -0400574 # skia:6141
575 blacklist([config, 'gm', '_', 'discard'])
Eric Boren4c7754c2017-04-10 08:19:10 -0400576
Eric Boren89cd3572017-06-28 13:50:22 -0400577 if 'IntelBayTrail' in bot and api.vars.is_linux:
Eric Boren4c7754c2017-04-10 08:19:10 -0400578 match.append('~ImageStorageLoad') # skia:6358
579
Kevin Lubickae95db42017-04-10 13:05:49 -0400580 if 'Ci20' in bot:
581 match.append('~Codec_Dimensions') # skia:6477
582 match.append('~FontMgrAndroidParser') # skia:6478
583 match.append('~PathOpsSimplify') # skia:6479
584 blacklist(['_', 'gm', '_', 'fast_slow_blurimagefilter']) # skia:6480
585
Kevin Lubickc14e5a72017-08-15 13:22:19 -0400586 if 'PowerVRGX6250' in bot:
587 match.append('~gradients_view_perspective_nodither') #skia:6972
588
Eric Boren4c7754c2017-04-10 08:19:10 -0400589 if blacklisted:
590 args.append('--blacklist')
591 args.extend(blacklisted)
592
593 if match:
594 args.append('--match')
595 args.extend(match)
596
597 # These bots run out of memory running RAW codec tests. Do not run them in
598 # parallel
599 if ('NexusPlayer' in bot or 'Nexus5' in bot or 'Nexus9' in bot
600 or 'Win8-MSVC-ShuttleB' in bot):
601 args.append('--noRAW_threading')
602
Stephan Altmuellere86af692017-07-21 10:12:45 -0400603 # Some people don't like verbose output.
604 verbose = False
605
606 if 'Intel' in bot and api.vars.is_linux and not 'Vulkan' in bot:
607 # TODO(dogben): Track down what's causing bots to die.
608 verbose = True
609
Ben Wagner40c0f242017-04-28 15:55:35 -0400610 if 'Valgrind' in bot and 'PreAbandonGpuContext' in bot:
Ben Wagner47ac0242017-06-27 13:44:36 -0400611 verbose = True
Ben Wagner40c0f242017-04-28 15:55:35 -0400612
Mike Kleinc9089062017-06-26 09:09:32 -0400613 if 'NexusPlayer' in bot and 'CPU' in bot:
614 # The Nexus Player's image decoding tests are slow enough that swarming
615 # times it out for not printing anything frequently enough. --verbose
616 # makes dm print something every time we start or complete a task.
Ben Wagner47ac0242017-06-27 13:44:36 -0400617 verbose = True
618
Stephan Altmuellere86af692017-07-21 10:12:45 -0400619 if 'Android' in bot or 'iOS' in bot:
620 # Enable verbose output on mobile platforms.
621 verbose = True
622
Ben Wagner47ac0242017-06-27 13:44:36 -0400623 if verbose:
Mike Kleinc9089062017-06-26 09:09:32 -0400624 args.append('--verbose')
625
Eric Boren4c7754c2017-04-10 08:19:10 -0400626 return args
627
628
629def key_params(api):
630 """Build a unique key from the builder name (as a list).
631
632 E.g. arch x86 gpu GeForce320M mode MacMini4.1 os Mac10.6
633 """
634 # Don't bother to include role, which is always Test.
635 # TryBots are uploaded elsewhere so they can use the same key.
636 blacklist = ['role', 'is_trybot']
637
638 flat = []
639 for k in sorted(api.vars.builder_cfg.keys()):
640 if k not in blacklist:
641 flat.append(k)
642 flat.append(api.vars.builder_cfg[k])
643 return flat
644
645
646def test_steps(api):
647 """Run the DM test."""
648 use_hash_file = False
649 if api.vars.upload_dm_results:
650 # This must run before we write anything into
651 # api.flavor.device_dirs.dm_dir or we may end up deleting our
652 # output on machines where they're the same.
653 api.flavor.create_clean_host_dir(api.vars.dm_dir)
654 host_dm_dir = str(api.vars.dm_dir)
655 device_dm_dir = str(api.flavor.device_dirs.dm_dir)
656 if host_dm_dir != device_dm_dir:
657 api.flavor.create_clean_device_dir(device_dm_dir)
658
659 # Obtain the list of already-generated hashes.
660 hash_filename = 'uninteresting_hashes.txt'
661
662 # Ensure that the tmp_dir exists.
Robert Iannucci8cd50412017-07-07 14:36:58 -0700663 api.run.run_once(api.file.ensure_directory,
664 'makedirs tmp_dir',
665 api.vars.tmp_dir)
Eric Boren4c7754c2017-04-10 08:19:10 -0400666
667 host_hashes_file = api.vars.tmp_dir.join(hash_filename)
668 hashes_file = api.flavor.device_path_join(
669 api.flavor.device_dirs.tmp_dir, hash_filename)
670 api.run(
671 api.python.inline,
672 'get uninteresting hashes',
673 program="""
674 import contextlib
675 import math
676 import socket
677 import sys
678 import time
679 import urllib2
680
Stephan Altmuellerc19ebc52017-05-30 16:39:17 -0400681 HASHES_URL = 'https://storage.googleapis.com/skia-infra-gm/hash_files/gold-prod-hashes.txt'
Eric Boren4c7754c2017-04-10 08:19:10 -0400682 RETRIES = 5
683 TIMEOUT = 60
684 WAIT_BASE = 15
685
686 socket.setdefaulttimeout(TIMEOUT)
687 for retry in range(RETRIES):
688 try:
689 with contextlib.closing(
690 urllib2.urlopen(HASHES_URL, timeout=TIMEOUT)) as w:
691 hashes = w.read()
692 with open(sys.argv[1], 'w') as f:
693 f.write(hashes)
694 break
695 except Exception as e:
696 print 'Failed to get uninteresting hashes from %s:' % HASHES_URL
697 print e
698 if retry == RETRIES:
699 raise
700 waittime = WAIT_BASE * math.pow(2, retry)
701 print 'Retry in %d seconds.' % waittime
702 time.sleep(waittime)
703 """,
704 args=[host_hashes_file],
705 abort_on_failure=False,
706 fail_build_on_failure=False,
707 infra_step=True)
708
709 if api.path.exists(host_hashes_file):
710 api.flavor.copy_file_to_device(host_hashes_file, hashes_file)
711 use_hash_file = True
712
713 # Run DM.
714 properties = [
715 'gitHash', api.vars.got_revision,
Eric Boren4c7754c2017-04-10 08:19:10 -0400716 'builder', api.vars.builder_name,
Eric Boren4c7754c2017-04-10 08:19:10 -0400717 ]
718 if api.vars.is_trybot:
719 properties.extend([
720 'issue', api.vars.issue,
721 'patchset', api.vars.patchset,
722 'patch_storage', api.vars.patch_storage,
723 ])
Eric Borenf9aa9e52017-04-10 09:56:10 -0400724 properties.extend(['swarming_bot_id', api.vars.swarming_bot_id])
725 properties.extend(['swarming_task_id', api.vars.swarming_task_id])
Eric Boren4c7754c2017-04-10 08:19:10 -0400726
727 args = [
728 'dm',
Eric Boren4c7754c2017-04-10 08:19:10 -0400729 '--resourcePath', api.flavor.device_dirs.resource_dir,
730 '--skps', api.flavor.device_dirs.skp_dir,
731 '--images', api.flavor.device_path_join(
732 api.flavor.device_dirs.images_dir, 'dm'),
733 '--colorImages', api.flavor.device_path_join(
734 api.flavor.device_dirs.images_dir, 'colorspace'),
735 '--nameByHash',
736 '--properties'
737 ] + properties
738
739 args.extend(['--svgs', api.flavor.device_dirs.svg_dir])
740
741 args.append('--key')
742 args.extend(key_params(api))
743 if use_hash_file:
744 args.extend(['--uninterestingHashesFile', hashes_file])
745 if api.vars.upload_dm_results:
746 args.extend(['--writePath', api.flavor.device_dirs.dm_dir])
747
Eric Boren89cd3572017-06-28 13:50:22 -0400748 args.extend(dm_flags(api, api.vars.builder_name))
Eric Boren4c7754c2017-04-10 08:19:10 -0400749
Eric Boren896af752017-04-24 13:22:56 -0400750 env = {}
Eric Boren4c7754c2017-04-10 08:19:10 -0400751 if 'Ubuntu16' in api.vars.builder_name:
752 # The vulkan in this asset name simply means that the graphics driver
753 # supports Vulkan. It is also the driver used for GL code.
754 dri_path = api.vars.slave_dir.join('linux_vulkan_intel_driver_release')
755 if 'Debug' in api.vars.builder_name:
756 dri_path = api.vars.slave_dir.join('linux_vulkan_intel_driver_debug')
757
758 if 'Vulkan' in api.vars.builder_name:
759 sdk_path = api.vars.slave_dir.join('linux_vulkan_sdk', 'bin')
760 lib_path = api.vars.slave_dir.join('linux_vulkan_sdk', 'lib')
761 env.update({
762 'PATH':'%%(PATH)s:%s' % sdk_path,
763 'LD_LIBRARY_PATH': '%s:%s' % (lib_path, dri_path),
764 'LIBGL_DRIVERS_PATH': dri_path,
765 'VK_ICD_FILENAMES':'%s' % dri_path.join('intel_icd.x86_64.json'),
766 })
767 else:
768 # Even the non-vulkan NUC jobs could benefit from the newer drivers.
769 env.update({
770 'LD_LIBRARY_PATH': dri_path,
771 'LIBGL_DRIVERS_PATH': dri_path,
772 })
773
774 # See skia:2789.
Ben Wagner988d15e2017-04-27 13:08:50 -0400775 extra_config_parts = api.vars.builder_cfg.get('extra_config', '').split('_')
776 if 'AbandonGpuContext' in extra_config_parts:
Eric Boren4c7754c2017-04-10 08:19:10 -0400777 args.append('--abandonGpuContext')
Ben Wagner988d15e2017-04-27 13:08:50 -0400778 if 'PreAbandonGpuContext' in extra_config_parts:
Eric Boren4c7754c2017-04-10 08:19:10 -0400779 args.append('--preAbandonGpuContext')
Ben Wagner988d15e2017-04-27 13:08:50 -0400780 if 'ReleaseAndAbandonGpuContext' in extra_config_parts:
Eric Boren6ec17e32017-04-26 14:25:29 -0400781 args.append('--releaseAndAbandonGpuContext')
Eric Boren4c7754c2017-04-10 08:19:10 -0400782
Eric Boren896af752017-04-24 13:22:56 -0400783 with api.env(env):
Eric Boren4c7754c2017-04-10 08:19:10 -0400784 api.run(api.flavor.step, 'dm', cmd=args, abort_on_failure=False)
785
786 if api.vars.upload_dm_results:
787 # Copy images and JSON to host machine if needed.
788 api.flavor.copy_directory_contents_to_host(
789 api.flavor.device_dirs.dm_dir, api.vars.dm_dir)
790
791
borenet1ed2ae42016-07-26 11:52:17 -0700792def RunSteps(api):
Eric Boren4c7754c2017-04-10 08:19:10 -0400793 api.core.setup()
Robert Iannucci297a7ef2017-05-12 19:09:38 -0700794 env = {}
Eric Boren4c7754c2017-04-10 08:19:10 -0400795 if 'iOS' in api.vars.builder_name:
796 env['IOS_BUNDLE_ID'] = 'com.google.dm'
Stephan Altmueller63e843d2017-04-25 11:38:38 -0400797 env['IOS_MOUNT_POINT'] = api.vars.slave_dir.join('mnt_iosdevice')
Robert Iannucci297a7ef2017-05-12 19:09:38 -0700798 with api.context(env=env):
Eric Boren4c7754c2017-04-10 08:19:10 -0400799 try:
800 api.flavor.install_everything()
801 test_steps(api)
802 finally:
803 api.flavor.cleanup_steps()
804 api.run.check_failure()
805
806
Eric Borenf9aa9e52017-04-10 09:56:10 -0400807TEST_BUILDERS = [
Kevin Lubickfe079d42017-04-12 08:31:48 -0400808 'Test-Android-Clang-AndroidOne-GPU-Mali400MP2-arm-Release-Android',
Kevin Lubickae95db42017-04-10 13:05:49 -0400809 'Test-Android-Clang-Ci20-CPU-IngenicJZ4780-mipsel-Release-Android',
Eric Borenf9aa9e52017-04-10 09:56:10 -0400810 'Test-Android-Clang-GalaxyS6-GPU-MaliT760-arm64-Debug-Android',
811 'Test-Android-Clang-GalaxyS7_G930A-GPU-Adreno530-arm64-Debug-Android',
Kevin Lubickfe079d42017-04-12 08:31:48 -0400812 'Test-Android-Clang-NVIDIA_Shield-GPU-TegraX1-arm64-Debug-Android',
Chris Dalton80ace822017-07-20 10:54:04 -0600813 "Test-Android-Clang-NVIDIA_Shield-GPU-TegraX1-arm64-Debug-Android_CCPR",
Kevin Lubickfe079d42017-04-12 08:31:48 -0400814 'Test-Android-Clang-Nexus10-GPU-MaliT604-arm-Release-Android',
Eric Borenf9aa9e52017-04-10 09:56:10 -0400815 'Test-Android-Clang-Nexus5-GPU-Adreno330-arm-Release-Android',
Kevin Lubickfe079d42017-04-12 08:31:48 -0400816 'Test-Android-Clang-Nexus6p-GPU-Adreno430-arm64-Debug-Android_Vulkan',
Greg Daniela86385d2017-06-05 11:34:29 -0400817 'Test-Android-Clang-PixelXL-GPU-Adreno530-arm64-Debug-Android_Vulkan',
Chris Dalton80ace822017-07-20 10:54:04 -0600818 'Test-Android-Clang-PixelXL-GPU-Adreno530-arm64-Debug-Android_CCPR',
Kevin Lubickfe079d42017-04-12 08:31:48 -0400819 'Test-Android-Clang-Nexus7-GPU-Tegra3-arm-Debug-Android',
820 'Test-Android-Clang-NexusPlayer-CPU-SSE4-x86-Release-Android',
821 'Test-Android-Clang-NexusPlayer-GPU-PowerVR-x86-Release-Android_Vulkan',
822 'Test-Android-Clang-PixelC-CPU-TegraX1-arm64-Debug-Android',
Eric Borenf9aa9e52017-04-10 09:56:10 -0400823 'Test-ChromeOS-Clang-Chromebook_C100p-GPU-MaliT764-arm-Debug',
Kevin Lubickc14e5a72017-08-15 13:22:19 -0400824 'Test-ChromeOS-Clang-Chromebook_CB5_312T-GPU-PowerVRGX6250-arm-Debug',
Eric Borenf9aa9e52017-04-10 09:56:10 -0400825 'Test-Mac-Clang-MacMini6.2-CPU-AVX-x86_64-Debug',
Robert Phillips985e1922017-05-25 07:56:01 -0400826 'Test-Mac-Clang-MacMini6.2-GPU-IntelHD4000-x86_64-Debug-CommandBuffer',
Kevin Lubickfe079d42017-04-12 08:31:48 -0400827 'Test-Ubuntu-Clang-GCE-CPU-AVX2-x86_64-Debug-ASAN',
828 'Test-Ubuntu-Clang-GCE-CPU-AVX2-x86_64-Debug-MSAN',
829 'Test-Ubuntu-Clang-GCE-CPU-AVX2-x86_64-Release-TSAN',
Eric Borenf9aa9e52017-04-10 09:56:10 -0400830 'Test-Ubuntu-GCC-GCE-CPU-AVX2-x86-Debug',
831 'Test-Ubuntu-GCC-GCE-CPU-AVX2-x86_64-Debug',
Eric Borenf9aa9e52017-04-10 09:56:10 -0400832 'Test-Ubuntu-GCC-ShuttleA-GPU-GTX550Ti-x86_64-Release-Valgrind',
833 ('Test-Ubuntu-GCC-ShuttleA-GPU-GTX550Ti-x86_64-Release-Valgrind' +
834 '_AbandonGpuContext'),
835 ('Test-Ubuntu-GCC-ShuttleA-GPU-GTX550Ti-x86_64-Release-Valgrind' +
836 '_PreAbandonGpuContext'),
Eric Borenf9aa9e52017-04-10 09:56:10 -0400837 ('Test-Ubuntu-GCC-GCE-CPU-AVX2-x86_64-Debug-SK_USE_DISCARDABLE_' +
838 'SCALEDIMAGECACHE'),
Kevin Lubickfe079d42017-04-12 08:31:48 -0400839 'Test-Ubuntu16-Clang-NUC5PPYH-GPU-IntelHD405-x86_64-Debug',
840 'Test-Ubuntu16-Clang-NUC6i5SYK-GPU-IntelIris540-x86_64-Debug-Vulkan',
841 'Test-Ubuntu16-Clang-NUC6i5SYK-GPU-IntelIris540-x86_64-Release',
842 'Test-Ubuntu16-Clang-NUCDE3815TYKHE-GPU-IntelBayTrail-x86_64-Debug',
Ben Wagnerab909b52017-08-09 14:41:31 -0400843 ('Test-Ubuntu17-GCC-Golo-GPU-QuadroP400-x86_64-Release-Valgrind' +
844 '_PreAbandonGpuContext_SK_CPU_LIMIT_SSE41'),
Leon Scroggins IIIbb8126d2017-05-02 11:14:31 -0400845 'Test-Win8-MSVC-Golo-CPU-AVX-x86-Debug',
Kevin Lubickfe079d42017-04-12 08:31:48 -0400846 'Test-Win10-MSVC-AlphaR2-GPU-RadeonR9M470X-x86_64-Debug-Vulkan',
Eric Boren6ec17e32017-04-26 14:25:29 -0400847 ('Test-Win10-MSVC-NUC5i7RYH-GPU-IntelIris6100-x86_64-Release-'
848 'ReleaseAndAbandonGpuContext'),
Kevin Lubickfe079d42017-04-12 08:31:48 -0400849 'Test-Win10-MSVC-NUC6i5SYK-GPU-IntelIris540-x86_64-Debug-ANGLE',
850 'Test-Win10-MSVC-NUC6i5SYK-GPU-IntelIris540-x86_64-Debug-Vulkan',
851 'Test-Win10-MSVC-ShuttleA-GPU-GTX660-x86_64-Debug-Vulkan',
852 'Test-Win10-MSVC-ShuttleC-GPU-GTX960-x86_64-Debug-ANGLE',
853 'Test-Win10-MSVC-ZBOX-GPU-GTX1070-x86_64-Debug-Vulkan',
854 'Test-iOS-Clang-iPadMini4-GPU-GX6450-arm-Release',
Mike Klein97627d42017-05-11 13:12:48 -0400855 ('Test-Ubuntu-Clang-GCE-CPU-AVX2-x86_64-Release-'
856 'SK_FORCE_RASTER_PIPELINE_BLITTER'),
Eric Borenf9aa9e52017-04-10 09:56:10 -0400857]
borenet1ed2ae42016-07-26 11:52:17 -0700858
859
860def GenTests(api):
Eric Borenf9aa9e52017-04-10 09:56:10 -0400861 for builder in TEST_BUILDERS:
862 test = (
863 api.test(builder) +
864 api.properties(buildername=builder,
865 revision='abc123',
866 path_config='kitchen',
867 swarm_out_dir='[SWARM_OUT_DIR]') +
868 api.path.exists(
869 api.path['start_dir'].join('skia'),
870 api.path['start_dir'].join('skia', 'infra', 'bots', 'assets',
871 'skimage', 'VERSION'),
872 api.path['start_dir'].join('skia', 'infra', 'bots', 'assets',
873 'skp', 'VERSION'),
874 api.path['start_dir'].join('skia', 'infra', 'bots', 'assets',
875 'svg', 'VERSION'),
876 api.path['start_dir'].join('tmp', 'uninteresting_hashes.txt')
Ben Wagnerf835c222017-04-30 11:14:51 -0400877 ) +
878 api.step_data('get swarming bot id',
879 stdout=api.raw_io.output('skia-bot-123')) +
880 api.step_data('get swarming task id',
881 stdout=api.raw_io.output('123456'))
Eric Borenf9aa9e52017-04-10 09:56:10 -0400882 )
Eric Borenf9aa9e52017-04-10 09:56:10 -0400883 if 'Win' in builder:
884 test += api.platform('win', 64)
Eric Boren4c7754c2017-04-10 08:19:10 -0400885
Eric Borenf9aa9e52017-04-10 09:56:10 -0400886 if 'ChromeOS' in builder:
887 test += api.step_data(
888 'read chromeos ip',
889 stdout=api.raw_io.output('{"user_ip":"foo@127.0.0.1"}'))
Eric Boren4c7754c2017-04-10 08:19:10 -0400890
891
Eric Borenf9aa9e52017-04-10 09:56:10 -0400892 yield test
Eric Boren4c7754c2017-04-10 08:19:10 -0400893
Kevin Lubickfe079d42017-04-12 08:31:48 -0400894 builder = 'Test-Win2k8-MSVC-GCE-CPU-AVX2-x86_64-Release'
895 yield (
896 api.test('trybot') +
897 api.properties(buildername=builder,
898 revision='abc123',
899 path_config='kitchen',
900 swarm_out_dir='[SWARM_OUT_DIR]') +
901 api.properties(patch_storage='gerrit') +
902 api.properties.tryserver(
903 buildername=builder,
904 gerrit_project='skia',
905 gerrit_url='https://skia-review.googlesource.com/',
906 )+
907 api.path.exists(
908 api.path['start_dir'].join('skia'),
909 api.path['start_dir'].join('skia', 'infra', 'bots', 'assets',
910 'skimage', 'VERSION'),
911 api.path['start_dir'].join('skia', 'infra', 'bots', 'assets',
912 'skp', 'VERSION'),
913 api.path['start_dir'].join('skia', 'infra', 'bots', 'assets',
914 'svg', 'VERSION'),
915 api.path['start_dir'].join('tmp', 'uninteresting_hashes.txt')
916 )
917 )
918
Eric Boren4c7754c2017-04-10 08:19:10 -0400919 builder = 'Test-Ubuntu-GCC-GCE-CPU-AVX2-x86_64-Debug'
borenet1ed2ae42016-07-26 11:52:17 -0700920 yield (
Eric Boren4c7754c2017-04-10 08:19:10 -0400921 api.test('failed_dm') +
922 api.properties(buildername=builder,
borenet1ed2ae42016-07-26 11:52:17 -0700923 revision='abc123',
924 path_config='kitchen',
925 swarm_out_dir='[SWARM_OUT_DIR]') +
926 api.path.exists(
Ravi Mistry9bcca6a2016-11-21 16:06:19 -0500927 api.path['start_dir'].join('skia'),
928 api.path['start_dir'].join('skia', 'infra', 'bots', 'assets',
Eric Boren4c7754c2017-04-10 08:19:10 -0400929 'skimage', 'VERSION'),
Ravi Mistry9bcca6a2016-11-21 16:06:19 -0500930 api.path['start_dir'].join('skia', 'infra', 'bots', 'assets',
Eric Boren4c7754c2017-04-10 08:19:10 -0400931 'skp', 'VERSION'),
Ravi Mistry9bcca6a2016-11-21 16:06:19 -0500932 api.path['start_dir'].join('skia', 'infra', 'bots', 'assets',
Eric Boren4c7754c2017-04-10 08:19:10 -0400933 'svg', 'VERSION'),
Ravi Mistry9bcca6a2016-11-21 16:06:19 -0500934 api.path['start_dir'].join('tmp', 'uninteresting_hashes.txt')
Eric Boren4c7754c2017-04-10 08:19:10 -0400935 ) +
936 api.step_data('symbolized dm', retcode=1)
937 )
938
Kevin Lubickfe079d42017-04-12 08:31:48 -0400939 builder = 'Test-Android-Clang-Nexus7-GPU-Tegra3-arm-Debug-Android'
Eric Boren4c7754c2017-04-10 08:19:10 -0400940 yield (
941 api.test('failed_get_hashes') +
942 api.properties(buildername=builder,
Eric Boren4c7754c2017-04-10 08:19:10 -0400943 revision='abc123',
944 path_config='kitchen',
945 swarm_out_dir='[SWARM_OUT_DIR]') +
946 api.path.exists(
947 api.path['start_dir'].join('skia'),
948 api.path['start_dir'].join('skia', 'infra', 'bots', 'assets',
949 'skimage', 'VERSION'),
950 api.path['start_dir'].join('skia', 'infra', 'bots', 'assets',
951 'skp', 'VERSION'),
952 api.path['start_dir'].join('skia', 'infra', 'bots', 'assets',
953 'svg', 'VERSION'),
954 api.path['start_dir'].join('tmp', 'uninteresting_hashes.txt')
955 ) +
956 api.step_data('get uninteresting hashes', retcode=1)
957 )
958
Kevin Lubickfe079d42017-04-12 08:31:48 -0400959 builder = 'Test-Android-Clang-NexusPlayer-CPU-SSE4-x86-Debug-Android'
Eric Boren4c7754c2017-04-10 08:19:10 -0400960 yield (
961 api.test('failed_push') +
962 api.properties(buildername=builder,
Eric Boren4c7754c2017-04-10 08:19:10 -0400963 revision='abc123',
964 path_config='kitchen',
965 swarm_out_dir='[SWARM_OUT_DIR]') +
966 api.path.exists(
967 api.path['start_dir'].join('skia'),
968 api.path['start_dir'].join('skia', 'infra', 'bots', 'assets',
969 'skimage', 'VERSION'),
970 api.path['start_dir'].join('skia', 'infra', 'bots', 'assets',
971 'skp', 'VERSION'),
972 api.path['start_dir'].join('skia', 'infra', 'bots', 'assets',
973 'svg', 'VERSION'),
974 api.path['start_dir'].join('tmp', 'uninteresting_hashes.txt')
975 ) +
976 api.step_data('push [START_DIR]/skia/resources/* '+
977 '/sdcard/revenge_of_the_skiabot/resources', retcode=1)
978 )
979
980 builder = 'Test-Android-Clang-Nexus10-GPU-MaliT604-arm-Debug-Android'
981 yield (
982 api.test('failed_pull') +
983 api.properties(buildername=builder,
Eric Boren4c7754c2017-04-10 08:19:10 -0400984 revision='abc123',
985 path_config='kitchen',
986 swarm_out_dir='[SWARM_OUT_DIR]') +
987 api.path.exists(
988 api.path['start_dir'].join('skia'),
989 api.path['start_dir'].join('skia', 'infra', 'bots', 'assets',
990 'skimage', 'VERSION'),
991 api.path['start_dir'].join('skia', 'infra', 'bots', 'assets',
992 'skp', 'VERSION'),
993 api.path['start_dir'].join('skia', 'infra', 'bots', 'assets',
994 'svg', 'VERSION'),
995 api.path['start_dir'].join('tmp', 'uninteresting_hashes.txt')
996 ) +
997 api.step_data('dm', retcode=1) +
998 api.step_data('pull /sdcard/revenge_of_the_skiabot/dm_out '+
999 '[CUSTOM_[SWARM_OUT_DIR]]/dm', retcode=1)
borenetbfa5b452016-10-19 10:13:32 -07001000 )