blob: 023afb7c818092b1b9580abc951fddc35c2dcfad [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 = []
Brian Osmanf9810662017-08-30 10:02:10 -040029 configs = []
30 blacklisted = []
31
32 def blacklist(quad):
33 config, src, options, name = quad.split(' ') if type(quad) is str else quad
34 if (config == '_' or
35 config in configs or
36 (config[0] == '~' and config[1:] in configs)):
37 blacklisted.extend([config, src, options, name])
Eric Boren4c7754c2017-04-10 08:19:10 -040038
Mike Klein97d6a7a2017-07-24 10:37:19 -040039 # We've been spending lots of time writing out and especially uploading
40 # .pdfs, but not doing anything further with them. skia:6821
41 args.extend(['--dont_write', 'pdf'])
42
Eric Boren4c7754c2017-04-10 08:19:10 -040043 # This enables non-deterministic random seeding of the GPU FP optimization
Brian Osman7a34dca2017-04-13 13:40:29 -040044 # test.
Ben Wagner6da8f792017-08-10 12:22:56 -040045 # Not Android due to:
Ben Wagner11ab43c2017-08-09 18:05:59 -040046 # - https://skia.googlesource.com/skia/+/
47 # 5910ed347a638ded8cd4c06dbfda086695df1112/BUILD.gn#160
48 # - https://skia.googlesource.com/skia/+/
49 # ce06e261e68848ae21cac1052abc16bc07b961bf/tests/ProcessorTest.cpp#307
Ben Wagner6da8f792017-08-10 12:22:56 -040050 # Not MSAN due to:
51 # - https://skia.googlesource.com/skia/+/
52 # 0ac06e47269a40c177747310a613d213c95d1d6d/infra/bots/recipe_modules/
53 # flavor/gn_flavor.py#80
54 if 'Android' not in bot and 'MSAN' not in bot:
Ben Wagner11ab43c2017-08-09 18:05:59 -040055 args.append('--randomProcessorTest')
Eric Boren4c7754c2017-04-10 08:19:10 -040056
57 # 32-bit desktop bots tend to run out of memory, because they have relatively
58 # far more cores than RAM (e.g. 32 cores, 3G RAM). Hold them back a bit.
59 if '-x86-' in bot and not 'NexusPlayer' in bot:
Mike Kleindf669812017-06-23 13:30:17 -040060 args.extend(['--threads', '4'])
Eric Boren4c7754c2017-04-10 08:19:10 -040061
Kevin Lubick2dafbd72017-08-31 10:39:05 -040062 if 'Chromecast' in bot:
63 args.extend(['--threads', '0'])
64
Eric Boren4c7754c2017-04-10 08:19:10 -040065 # Avoid issues with dynamically exceeding resource cache limits.
66 if 'Test' in bot and 'DISCARDABLE' in bot:
Mike Kleindf669812017-06-23 13:30:17 -040067 args.extend(['--threads', '0'])
68
69 # See if staying on the main thread helps skia:6748.
70 if 'Test-iOS' in bot:
71 args.extend(['--threads', '0'])
Eric Boren4c7754c2017-04-10 08:19:10 -040072
Derek Sollenbergeredfe3df2017-07-19 15:25:24 -040073 # Android's kernel will occasionally attempt to kill our process, using
74 # SIGINT, in an effort to free up resources. If requested, that signal
75 # is ignored and dm will keep attempting to proceed until we actually
76 # exhaust the available resources.
77 if ('NexusPlayer' in bot or
78 'Nexus10' in bot or
79 'PixelC' in bot):
80 args.append('--ignoreSigInt')
81
Ben Wagner32fa5102017-08-10 21:25:55 -040082 if api.vars.builder_cfg.get('cpu_or_gpu') == 'CPU':
83 args.append('--nogpu')
84
85 # These are the canonical configs that we would ideally run on all bots. We
86 # may opt out or substitute some below for specific bots
87 configs.extend(['8888', 'srgb', 'pdf'])
88
89 # Runs out of memory on Android bots. Everyone else seems fine.
90 if 'Android' in bot:
91 configs.remove('pdf')
92
93 if '-GCE-' in bot:
94 configs.extend(['565'])
95 configs.extend(['f16'])
96 configs.extend(['sp-8888', '2ndpic-8888']) # Test niche uses of SkPicture.
97 configs.extend(['lite-8888']) # Experimental display list.
98 configs.extend(['gbr-8888'])
99
100 # NP is running out of RAM when we run all these modes. skia:3255
101 if 'NexusPlayer' not in bot:
102 configs.extend(mode + '-8888' for mode in
103 ['serialize', 'tiles_rt', 'pic'])
104
Ben Wagner32fa5102017-08-10 21:25:55 -0400105 # This bot only differs from vanilla CPU bots in 8888 config.
106 if 'SK_FORCE_RASTER_PIPELINE_BLITTER' in bot:
107 configs = ['8888', 'srgb']
108
Ben Wagner077710b2017-10-26 13:12:39 -0400109 if 'FSAA' in bot or 'FAAA' in bot or 'FDAA' in bot:
110 # Scan converters shouldn't really be sensitive to different color
111 # configurations.
112 configs = ['8888', 'tiles_rt-8888']
113
Ben Wagner32fa5102017-08-10 21:25:55 -0400114 elif api.vars.builder_cfg.get('cpu_or_gpu') == 'GPU':
115 args.append('--nocpu')
116
117 # Add in either gles or gl configs to the canonical set based on OS
118 sample_count = '8'
119 gl_prefix = 'gl'
120 if 'Android' in bot or 'iOS' in bot:
121 sample_count = '4'
122 # We want to test the OpenGL config not the GLES config on the Shield
123 if 'NVIDIA_Shield' not in bot:
124 gl_prefix = 'gles'
125 elif 'Intel' in bot:
126 sample_count = ''
127 elif 'ChromeOS' in bot:
Eric Boren4c7754c2017-04-10 08:19:10 -0400128 gl_prefix = 'gles'
Eric Boren4c7754c2017-04-10 08:19:10 -0400129
Ben Wagner32fa5102017-08-10 21:25:55 -0400130 configs.extend([gl_prefix, gl_prefix + 'dft', gl_prefix + 'srgb'])
Eric Boren4c7754c2017-04-10 08:19:10 -0400131 if sample_count is not '':
Ben Wagner32fa5102017-08-10 21:25:55 -0400132 configs.append(gl_prefix + 'msaa' + sample_count)
Eric Boren4c7754c2017-04-10 08:19:10 -0400133
Ben Wagner32fa5102017-08-10 21:25:55 -0400134 # The NP produces a long error stream when we run with MSAA. The Tegra3 just
135 # doesn't support it.
136 if ('NexusPlayer' in bot or
137 'Tegra3' in bot or
138 # We aren't interested in fixing msaa bugs on current iOS devices.
139 'iPad4' in bot or
140 'iPadPro' in bot or
141 'iPhone6' in bot or
142 'iPhone7' in bot or
143 # skia:5792
144 'IntelHD530' in bot or
145 'IntelIris540' in bot):
146 configs = [x for x in configs if 'msaa' not in x]
Eric Boren4c7754c2017-04-10 08:19:10 -0400147
Ben Wagner32fa5102017-08-10 21:25:55 -0400148 # The NP produces different images for dft on every run.
149 if 'NexusPlayer' in bot:
150 configs = [x for x in configs if 'dft' not in x]
Eric Boren4c7754c2017-04-10 08:19:10 -0400151
Ben Wagner32fa5102017-08-10 21:25:55 -0400152 if '-TSAN' not in bot and sample_count is not '':
153 if ('TegraK1' in bot or
154 'TegraX1' in bot or
155 'GTX550Ti' in bot or
156 'GTX660' in bot or
157 'QuadroP400' in bot or
158 ('GT610' in bot and 'Ubuntu17' not in bot)):
159 configs.append(gl_prefix + 'nvprdit' + sample_count)
Kevin Lubickae95db42017-04-10 13:05:49 -0400160
Ben Wagner32fa5102017-08-10 21:25:55 -0400161 # We want to test both the OpenGL config and the GLES config on Linux Intel:
162 # GL is used by Chrome, GLES is used by ChromeOS.
Brian Osmanf9810662017-08-30 10:02:10 -0400163 # Also do the Ganesh threading verification test (render with and without
164 # worker threads, using only the SW path renderer, and compare the results).
Ben Wagner32fa5102017-08-10 21:25:55 -0400165 if 'Intel' in bot and api.vars.is_linux:
Brian Osmanf9810662017-08-30 10:02:10 -0400166 configs.extend(['gles', 'glesdft', 'glessrgb', 'gltestthreading'])
167 # skbug.com/6333, skbug.com/6419, skbug.com/6702
168 blacklist('gltestthreading gm _ lcdblendmodes')
169 blacklist('gltestthreading gm _ lcdoverlap')
Brian Osmanbef21ba2017-08-31 13:49:05 -0400170 blacklist('gltestthreading gm _ textbloblooper')
Brian Osman1e75f2a2017-09-07 09:30:44 -0400171 # All of these GMs are flaky, too:
172 blacklist('gltestthreading gm _ bleed_alpha_bmp')
173 blacklist('gltestthreading gm _ bleed_alpha_bmp_shader')
174 blacklist('gltestthreading gm _ bleed_alpha_image')
175 blacklist('gltestthreading gm _ bleed_alpha_image_shader')
176 blacklist('gltestthreading gm _ savelayer_with_backdrop')
177 blacklist('gltestthreading gm _ persp_shaders_bw')
Mike Klein97627d42017-05-11 13:12:48 -0400178
Ben Wagner32fa5102017-08-10 21:25:55 -0400179 # The following devices do not support glessrgb.
180 if 'glessrgb' in configs:
181 if ('IntelHD405' in bot or
182 'IntelIris540' in bot or
Ben Wagnerfef8fdd2017-08-11 14:13:56 -0400183 'IntelIris640' in bot or
Ben Wagner32fa5102017-08-10 21:25:55 -0400184 'IntelBayTrail' in bot or
185 'IntelHD2000' in bot or
186 'AndroidOne' in bot or
187 'Nexus7' in bot or
188 'NexusPlayer' in bot):
189 configs.remove('glessrgb')
190
191 # Test instanced rendering on a limited number of platforms
192 if 'Nexus6' in bot:
193 # inst msaa isn't working yet on Adreno.
194 configs.append(gl_prefix + 'inst')
195 elif 'NVIDIA_Shield' in bot or 'PixelC' in bot:
196 # Multisampled instanced configs use nvpr so we substitute inst msaa
197 # configs for nvpr msaa configs.
198 old = gl_prefix + 'nvpr'
199 new = gl_prefix + 'inst'
200 configs = [x.replace(old, new) for x in configs]
201 # We also test non-msaa instanced.
202 configs.append(new)
Brian Salomon7f56d3d2017-10-09 13:02:49 -0400203 elif 'MacMini7.1' in bot and 'TSAN' not in bot:
204 # The TSAN bot disables GL buffer mapping which is required for inst.
Ben Wagner32fa5102017-08-10 21:25:55 -0400205 configs.extend([gl_prefix + 'inst'])
206
207 # CommandBuffer bot *only* runs the command_buffer config.
208 if 'CommandBuffer' in bot:
209 configs = ['commandbuffer']
210
211 # ANGLE bot *only* runs the angle configs
212 if 'ANGLE' in bot:
213 configs = ['angle_d3d11_es2',
214 'angle_d3d9_es2',
215 'angle_gl_es2',
216 'angle_d3d11_es3']
217 if sample_count is not '':
218 configs.append('angle_d3d11_es2_msaa' + sample_count)
219 configs.append('angle_d3d11_es3_msaa' + sample_count)
220
221 # Vulkan bot *only* runs the vk config.
222 if 'Vulkan' in bot:
223 configs = ['vk']
224
225 if 'ChromeOS' in bot:
226 # Just run GLES for now - maybe add gles_msaa4 in the future
227 configs = ['gles']
228
Kevin Lubick2dafbd72017-08-31 10:39:05 -0400229 if 'Chromecast' in bot:
230 configs = ['gles', '8888']
231
Ben Wagner32fa5102017-08-10 21:25:55 -0400232 # Test coverage counting path renderer.
233 if 'CCPR' in bot:
234 configs = [c for c in configs if c == 'gl' or c == 'gles']
Chris Dalton7a0ebfc2017-10-13 12:35:50 -0600235 args.extend(['--pr', 'ccpr', '--cachePathMasks', 'false'])
Chris Dalton97598a52017-07-18 10:49:07 -0600236
Kevin Lubick32f318b2017-10-17 13:40:52 -0400237 tf = api.vars.builder_cfg.get('test_filter')
238 if 'All' != tf:
239 # Expected format: shard_XX_YY
240 parts = tf.split('_')
241 if len(parts) == 3:
242 args.extend(['--shard', parts[1]])
243 args.extend(['--shards', parts[2]])
244 else:
245 raise Exception('Invalid task name - bad shards') #pragma: nocover
246
Chris Dalton80ace822017-07-20 10:54:04 -0600247 args.append('--config')
248 args.extend(configs)
249
Eric Boren4c7754c2017-04-10 08:19:10 -0400250 # Run tests, gms, and image decoding tests everywhere.
251 args.extend('--src tests gm image colorImage svg'.split(' '))
252 if 'Vulkan' in bot and 'NexusPlayer' in bot:
253 args.remove('svg')
254 args.remove('image')
Chris Dalton7c304ba2017-09-07 11:57:16 -0600255 elif api.vars.builder_cfg.get('cpu_or_gpu') == 'GPU':
256 # Don't run the 'svgparse_*' svgs on GPU.
257 blacklist('_ svg _ svgparse_')
Kevin Lubick9ef6de72017-10-15 21:05:58 -0400258 elif bot == 'Test-Debian9-Clang-GCE-CPU-AVX2-x86_64-Debug-All-ASAN':
Chris Dalton7c304ba2017-09-07 11:57:16 -0600259 # Only run the CPU SVGs on 8888.
260 blacklist('~8888 svg _ _')
261 else:
262 # On CPU SVGs we only care about parsing. Only run them on the above bot.
263 args.remove('svg')
Eric Boren4c7754c2017-04-10 08:19:10 -0400264
Mike Klein97627d42017-05-11 13:12:48 -0400265 # Eventually I'd like these to pass, but for now just skip 'em.
266 if 'SK_FORCE_RASTER_PIPELINE_BLITTER' in bot:
267 args.remove('tests')
268
Eric Boren4c7754c2017-04-10 08:19:10 -0400269 # TODO: ???
270 blacklist('f16 _ _ dstreadshuffle')
271 blacklist('glsrgb image _ _')
272 blacklist('glessrgb image _ _')
273
Eric Boren4c7754c2017-04-10 08:19:10 -0400274 # Not any point to running these.
275 blacklist('gbr-8888 image _ _')
276 blacklist('gbr-8888 colorImage _ _')
277
278 if 'Valgrind' in bot:
279 # These take 18+ hours to run.
280 blacklist('pdf gm _ fontmgr_iter')
281 blacklist('pdf _ _ PANO_20121023_214540.jpg')
282 blacklist('pdf skp _ worldjournal')
283 blacklist('pdf skp _ desk_baidu.skp')
284 blacklist('pdf skp _ desk_wikipedia.skp')
285 blacklist('_ svg _ _')
286
287 if 'iOS' in bot:
288 blacklist(gl_prefix + ' skp _ _')
289
290 if 'Mac' in bot or 'iOS' in bot:
291 # CG fails on questionable bmps
292 blacklist('_ image gen_platf rgba32abf.bmp')
293 blacklist('_ image gen_platf rgb24prof.bmp')
294 blacklist('_ image gen_platf rgb24lprof.bmp')
295 blacklist('_ image gen_platf 8bpp-pixeldata-cropped.bmp')
296 blacklist('_ image gen_platf 4bpp-pixeldata-cropped.bmp')
297 blacklist('_ image gen_platf 32bpp-pixeldata-cropped.bmp')
298 blacklist('_ image gen_platf 24bpp-pixeldata-cropped.bmp')
299
300 # CG has unpredictable behavior on this questionable gif
301 # It's probably using uninitialized memory
302 blacklist('_ image gen_platf frame_larger_than_image.gif')
303
304 # CG has unpredictable behavior on incomplete pngs
305 # skbug.com/5774
306 blacklist('_ image gen_platf inc0.png')
307 blacklist('_ image gen_platf inc1.png')
308 blacklist('_ image gen_platf inc2.png')
309 blacklist('_ image gen_platf inc3.png')
310 blacklist('_ image gen_platf inc4.png')
311 blacklist('_ image gen_platf inc5.png')
312 blacklist('_ image gen_platf inc6.png')
313 blacklist('_ image gen_platf inc7.png')
314 blacklist('_ image gen_platf inc8.png')
315 blacklist('_ image gen_platf inc9.png')
316 blacklist('_ image gen_platf inc10.png')
317 blacklist('_ image gen_platf inc11.png')
318 blacklist('_ image gen_platf inc12.png')
319 blacklist('_ image gen_platf inc13.png')
320 blacklist('_ image gen_platf inc14.png')
321
Matt Sarett6c50a2e2017-05-01 09:13:05 -0400322 # WIC fails on questionable bmps
Eric Boren4c7754c2017-04-10 08:19:10 -0400323 if 'Win' in bot:
Eric Boren4c7754c2017-04-10 08:19:10 -0400324 blacklist('_ image gen_platf pal8os2v2.bmp')
325 blacklist('_ image gen_platf pal8os2v2-16.bmp')
326 blacklist('_ image gen_platf rgba32abf.bmp')
327 blacklist('_ image gen_platf rgb24prof.bmp')
328 blacklist('_ image gen_platf rgb24lprof.bmp')
329 blacklist('_ image gen_platf 8bpp-pixeldata-cropped.bmp')
330 blacklist('_ image gen_platf 4bpp-pixeldata-cropped.bmp')
331 blacklist('_ image gen_platf 32bpp-pixeldata-cropped.bmp')
332 blacklist('_ image gen_platf 24bpp-pixeldata-cropped.bmp')
Eric Boren4c7754c2017-04-10 08:19:10 -0400333 if 'x86_64' in bot and 'CPU' in bot:
334 # This GM triggers a SkSmallAllocator assert.
335 blacklist('_ gm _ composeshader_bitmap')
336
Matt Sarett6c50a2e2017-05-01 09:13:05 -0400337 if 'Win' in bot or 'Mac' in bot:
Leon Scroggins III3a3cf432017-08-18 13:08:16 -0400338 # WIC and CG fail on arithmetic jpegs
Matt Sarett6c50a2e2017-05-01 09:13:05 -0400339 blacklist('_ image gen_platf testimgari.jpg')
Leon Scroggins III3a3cf432017-08-18 13:08:16 -0400340 # More questionable bmps that fail on Mac, too. skbug.com/6984
341 blacklist('_ image gen_platf rle8-height-negative.bmp')
342 blacklist('_ image gen_platf rle4-height-negative.bmp')
Matt Sarett6c50a2e2017-05-01 09:13:05 -0400343
Kevin Lubick2dafbd72017-08-31 10:39:05 -0400344 if 'Android' in bot or 'iOS' in bot or 'Chromecast' in bot:
Eric Boren4c7754c2017-04-10 08:19:10 -0400345 # This test crashes the N9 (perhaps because of large malloc/frees). It also
346 # is fairly slow and not platform-specific. So we just disable it on all of
347 # Android and iOS. skia:5438
348 blacklist('_ test _ GrShape')
349
Kevin Lubick451b7432017-09-15 14:44:12 -0400350 if api.vars.internal_hardware_label == 1:
351 # skia:7046
352 blacklist('_ test _ WritePixelsNonTexture_Gpu')
353 blacklist('_ test _ WritePixels_Gpu')
354 blacklist('_ test _ GrSurfaceRenderability')
355 blacklist('_ test _ ES2BlendWithNoTexture')
356
Kevin Lubickbd27d1d2017-10-13 08:01:49 -0400357 if api.vars.internal_hardware_label == 2:
358 # skia:7160
359 blacklist('_ test _ SRGBReadWritePixels')
360 blacklist('_ test _ SRGBMipMap')
361
Kevin Lubick451b7432017-09-15 14:44:12 -0400362
Eric Boren4c7754c2017-04-10 08:19:10 -0400363 # skia:4095
Mike Reedfb499092017-06-26 13:53:32 +0000364 bad_serialize_gms = ['bleed_image',
Eric Boren4c7754c2017-04-10 08:19:10 -0400365 'c_gms',
366 'colortype',
367 'colortype_xfermodes',
368 'drawfilter',
369 'fontmgr_bounds_0.75_0',
370 'fontmgr_bounds_1_-0.25',
371 'fontmgr_bounds',
372 'fontmgr_match',
373 'fontmgr_iter',
374 'imagemasksubset']
375
376 # skia:5589
377 bad_serialize_gms.extend(['bitmapfilters',
378 'bitmapshaders',
379 'bleed',
380 'bleed_alpha_bmp',
381 'bleed_alpha_bmp_shader',
382 'convex_poly_clip',
383 'extractalpha',
384 'filterbitmap_checkerboard_32_32_g8',
385 'filterbitmap_image_mandrill_64',
386 'shadows',
387 'simpleaaclip_aaclip'])
388 # skia:5595
389 bad_serialize_gms.extend(['composeshader_bitmap',
390 'scaled_tilemodes_npot',
391 'scaled_tilemodes'])
392
393 # skia:5778
394 bad_serialize_gms.append('typefacerendering_pfaMac')
395 # skia:5942
396 bad_serialize_gms.append('parsedpaths')
397
398 # these use a custom image generator which doesn't serialize
399 bad_serialize_gms.append('ImageGeneratorExternal_rect')
400 bad_serialize_gms.append('ImageGeneratorExternal_shader')
401
402 # skia:6189
403 bad_serialize_gms.append('shadow_utils')
404
Matt Sarett9f3dcb32017-05-04 08:53:32 -0400405 # Not expected to round trip encoding/decoding.
406 bad_serialize_gms.append('makecolorspace')
407
Eric Boren4c7754c2017-04-10 08:19:10 -0400408 for test in bad_serialize_gms:
409 blacklist(['serialize-8888', 'gm', '_', test])
410
411 if 'Mac' not in bot:
412 for test in ['bleed_alpha_image', 'bleed_alpha_image_shader']:
413 blacklist(['serialize-8888', 'gm', '_', test])
414 # It looks like we skip these only for out-of-memory concerns.
Kevin Lubick2dafbd72017-08-31 10:39:05 -0400415 if 'Win' in bot or 'Android' in bot or 'Chromecast' in bot:
Eric Boren4c7754c2017-04-10 08:19:10 -0400416 for test in ['verylargebitmap', 'verylarge_picture_image']:
417 blacklist(['serialize-8888', 'gm', '_', test])
Ben Wagner2e4e73f2017-09-08 15:21:44 -0400418 if 'Mac' in bot and 'CPU' in bot:
Ben Wagner38db79f2017-08-23 15:05:50 -0400419 # skia:6992
Ben Wagner6f98bc62017-09-05 16:02:28 -0400420 blacklist(['pic-8888', 'gm', '_', 'encode-platform'])
Ben Wagner38db79f2017-08-23 15:05:50 -0400421 blacklist(['serialize-8888', 'gm', '_', 'encode-platform'])
Eric Boren4c7754c2017-04-10 08:19:10 -0400422
423 # skia:4769
424 for test in ['drawfilter']:
425 blacklist([ 'sp-8888', 'gm', '_', test])
426 blacklist([ 'pic-8888', 'gm', '_', test])
427 blacklist(['2ndpic-8888', 'gm', '_', test])
428 blacklist([ 'lite-8888', 'gm', '_', test])
429 # skia:4703
430 for test in ['image-cacherator-from-picture',
431 'image-cacherator-from-raster',
432 'image-cacherator-from-ctable']:
433 blacklist([ 'sp-8888', 'gm', '_', test])
434 blacklist([ 'pic-8888', 'gm', '_', test])
435 blacklist([ '2ndpic-8888', 'gm', '_', test])
436 blacklist(['serialize-8888', 'gm', '_', test])
437
438 # GM that requires raster-backed canvas
439 for test in ['gamut', 'complexclip4_bw', 'complexclip4_aa']:
440 blacklist([ 'sp-8888', 'gm', '_', test])
441 blacklist([ 'pic-8888', 'gm', '_', test])
442 blacklist([ 'lite-8888', 'gm', '_', test])
443 blacklist([ '2ndpic-8888', 'gm', '_', test])
444 blacklist(['serialize-8888', 'gm', '_', test])
445
446 # GM that not support tiles_rt
447 for test in ['complexclip4_bw', 'complexclip4_aa']:
448 blacklist([ 'tiles_rt-8888', 'gm', '_', test])
449
450 # Extensions for RAW images
Ben Wagner6e0a6b32017-09-26 14:11:15 -0400451 r = ['arw', 'cr2', 'dng', 'nef', 'nrw', 'orf', 'raf', 'rw2', 'pef', 'srw',
452 'ARW', 'CR2', 'DNG', 'NEF', 'NRW', 'ORF', 'RAF', 'RW2', 'PEF', 'SRW']
Eric Boren4c7754c2017-04-10 08:19:10 -0400453
454 # skbug.com/4888
455 # Blacklist RAW images (and a few large PNGs) on GPU bots
456 # until we can resolve failures.
Matt Sarett929bfeb2017-05-22 10:34:41 -0400457 if 'GPU' in bot:
458 blacklist('_ image _ interlaced1.png')
459 blacklist('_ image _ interlaced2.png')
460 blacklist('_ image _ interlaced3.png')
461 for raw_ext in r:
462 blacklist('_ image _ .%s' % raw_ext)
463
464 # Blacklist memory intensive tests on 32-bit bots.
465 if ('Win2k8' in bot or 'Win8' in bot) and 'x86-' in bot:
466 blacklist('_ image f16 _')
Matt Sarett112565e2017-05-22 13:45:15 -0400467 blacklist('_ image _ abnormal.wbmp')
Eric Boren4c7754c2017-04-10 08:19:10 -0400468 blacklist('_ image _ interlaced1.png')
469 blacklist('_ image _ interlaced2.png')
470 blacklist('_ image _ interlaced3.png')
471 for raw_ext in r:
472 blacklist('_ image _ .%s' % raw_ext)
473
Eric Boren4c7754c2017-04-10 08:19:10 -0400474 if 'IntelHD405' in bot and 'Ubuntu16' in bot:
475 # skia:6331
476 blacklist(['glmsaa8', 'image', 'gen_codec_gpu', 'abnormal.wbmp'])
477 blacklist(['glesmsaa4', 'image', 'gen_codec_gpu', 'abnormal.wbmp'])
478
479 if 'Nexus5' in bot:
480 # skia:5876
481 blacklist(['_', 'gm', '_', 'encode-platform'])
482
483 if 'AndroidOne-GPU' in bot: # skia:4697, skia:4704, skia:4694, skia:4705
484 blacklist(['_', 'gm', '_', 'bigblurs'])
485 blacklist(['_', 'gm', '_', 'bleed'])
486 blacklist(['_', 'gm', '_', 'bleed_alpha_bmp'])
487 blacklist(['_', 'gm', '_', 'bleed_alpha_bmp_shader'])
488 blacklist(['_', 'gm', '_', 'bleed_alpha_image'])
489 blacklist(['_', 'gm', '_', 'bleed_alpha_image_shader'])
490 blacklist(['_', 'gm', '_', 'bleed_image'])
491 blacklist(['_', 'gm', '_', 'dropshadowimagefilter'])
492 blacklist(['_', 'gm', '_', 'filterfastbounds'])
493 blacklist([gl_prefix, 'gm', '_', 'imageblurtiled'])
494 blacklist(['_', 'gm', '_', 'imagefiltersclipped'])
495 blacklist(['_', 'gm', '_', 'imagefiltersscaled'])
496 blacklist(['_', 'gm', '_', 'imageresizetiled'])
497 blacklist(['_', 'gm', '_', 'matrixconvolution'])
498 blacklist(['_', 'gm', '_', 'strokedlines'])
499 if sample_count is not '':
500 gl_msaa_config = gl_prefix + 'msaa' + sample_count
501 blacklist([gl_msaa_config, 'gm', '_', 'imageblurtiled'])
502 blacklist([gl_msaa_config, 'gm', '_', 'imagefiltersbase'])
503
504 match = []
505 if 'Valgrind' in bot: # skia:3021
506 match.append('~Threaded')
507
Ben Wagner6c126422017-06-19 12:45:54 -0400508 if 'Valgrind' in bot and 'PreAbandonGpuContext' in bot:
509 # skia:6575
510 match.append('~multipicturedraw_')
511
Ben Wagnerbb3e7ff2017-04-28 15:28:32 -0400512 if 'CommandBuffer' in bot:
513 # https://crbug.com/697030
514 match.append('~HalfFloatAlphaTextureTest')
515
Eric Boren4c7754c2017-04-10 08:19:10 -0400516 if 'AndroidOne' in bot: # skia:4711
517 match.append('~WritePixels')
518
Kevin Lubick2dafbd72017-08-31 10:39:05 -0400519 if 'Chromecast' in bot: # skia:6581
520 match.append('~matrixconvolution')
521 match.append('~blur_image_filter')
522 match.append('~blur_0.01')
523 match.append('~GM_animated-image-blurs')
524
Eric Boren4c7754c2017-04-10 08:19:10 -0400525 if 'NexusPlayer' in bot:
526 match.append('~ResourceCache')
527
528 if 'Nexus10' in bot:
529 match.append('~CopySurface') # skia:5509
530 match.append('~SRGBReadWritePixels') # skia:6097
531
Eric Boren4c7754c2017-04-10 08:19:10 -0400532 if 'GalaxyS6' in bot:
533 match.append('~SpecialImage') # skia:6338
Brian Osmaneee3c092017-06-15 13:25:10 -0400534 match.append('~skbug6653') # skia:6653
Eric Boren4c7754c2017-04-10 08:19:10 -0400535
536 if 'GalaxyS7_G930A' in bot:
537 match.append('~WritePixels') # skia:6427
538
Eric Boren4c7754c2017-04-10 08:19:10 -0400539 if 'MSAN' in bot:
540 match.extend(['~Once', '~Shared']) # Not sure what's up with these tests.
541
542 if 'TSAN' in bot:
543 match.extend(['~ReadWriteAlpha']) # Flaky on TSAN-covered on nvidia bots.
544 match.extend(['~RGBA4444TextureTest', # Flakier than they are important.
545 '~RGB565TextureTest'])
546
Brian Osmanc49d11e2017-09-22 09:44:35 -0400547 # By default, we test with GPU threading enabled. Leave PixelC devices
548 # running without threads, just to get some coverage of that code path.
549 if 'PixelC' in bot:
550 args.extend(['--gpuThreads', '0'])
551
Ben Wagneradf17dc2017-09-12 23:41:00 -0400552 if 'float_cast_overflow' in bot and 'CPU' in bot:
553 # skia:4632
554 for config in ['565', '8888', 'f16', 'srgb']:
Ben Wagneradf17dc2017-09-12 23:41:00 -0400555 blacklist([config, 'gm', '_', 'clippedcubic2'])
Ben Wagneradf17dc2017-09-12 23:41:00 -0400556 match.append('~^PathOpsCubicIntersection$')
557 match.append('~^PathOpsCubicLineIntersection$')
Ben Wagneradf17dc2017-09-12 23:41:00 -0400558 match.append('~^PathOpsOpCubicsThreaded$')
559 match.append('~^PathOpsOpLoopsThreaded$')
Ben Wagneradf17dc2017-09-12 23:41:00 -0400560
Greg Daniela86385d2017-06-05 11:34:29 -0400561 if 'Vulkan' in bot and 'Adreno530' in bot:
562 # skia:5777
563 match.extend(['~CopySurface'])
Eric Boren4c7754c2017-04-10 08:19:10 -0400564
565 if 'Vulkan' in bot and 'NexusPlayer' in bot:
Ben Wagner407a3b72017-09-07 22:14:07 -0400566 # skia:6132
567 match.extend(['~gradients_no_texture$',
568 '~tilemodes',
569 '~shadertext$',
570 '~bitmapfilters'])
571 match.append('~GrContextFactory_abandon') #skia:6209
Robert Phillipsf7072c32017-10-18 11:59:40 -0400572 match.append('~FullScreenClearWithLayers') #skia:7191
Robert Phillips4c390b92017-10-30 13:23:38 -0400573 match.append('~GrDefaultPathRendererTest') #skia:7244
574 match.append('~GrMSAAPathRendererTest') #skia:7244
Ben Wagner407a3b72017-09-07 22:14:07 -0400575 # skia:7018
576 match.extend(['~ClearOp',
577 '~ComposedImageFilterBounds_Gpu',
578 '~ImageEncode_Gpu',
579 '~ImageFilterFailAffectsTransparentBlack_Gpu',
580 '~ImageFilterZeroBlurSigma_Gpu',
581 '~ImageNewShader_GPU',
582 '~ImageReadPixels_Gpu',
583 '~ImageScalePixels_Gpu',
584 '~OverdrawSurface_Gpu',
585 '~ReadWriteAlpha',
586 '~SpecialImage_DeferredGpu',
587 '~SpecialImage_Gpu',
588 '~SurfaceSemaphores'])
Eric Boren4c7754c2017-04-10 08:19:10 -0400589
Ben Wagnerbe8ad452017-08-11 15:18:03 -0400590 if ('Vulkan' in bot and api.vars.is_linux and
591 ('IntelIris540' in bot or 'IntelIris640' in bot)):
Eric Boren4c7754c2017-04-10 08:19:10 -0400592 match.extend(['~VkHeapTests']) # skia:6245
593
Ben Wagnerf1debdf2017-06-13 13:37:05 -0400594 if 'Vulkan' in bot and 'IntelIris540' in bot and 'Win' in bot:
Eric Boren4c7754c2017-04-10 08:19:10 -0400595 # skia:6398
596 blacklist(['vk', 'gm', '_', 'aarectmodes'])
597 blacklist(['vk', 'gm', '_', 'aaxfermodes'])
598 blacklist(['vk', 'gm', '_', 'arithmode'])
Brian Osmand52c6c22017-10-25 15:43:22 -0400599 blacklist(['vk', 'gm', '_', 'composeshader'])
600 blacklist(['vk', 'gm', '_', 'composeshader_alpha'])
Eric Boren4c7754c2017-04-10 08:19:10 -0400601 blacklist(['vk', 'gm', '_', 'composeshader_bitmap'])
602 blacklist(['vk', 'gm', '_', 'composeshader_bitmap2'])
603 blacklist(['vk', 'gm', '_', 'dftextCOLR'])
604 blacklist(['vk', 'gm', '_', 'drawregionmodes'])
605 blacklist(['vk', 'gm', '_', 'filterfastbounds'])
606 blacklist(['vk', 'gm', '_', 'fontcache'])
607 blacklist(['vk', 'gm', '_', 'fontmgr_iterWin10'])
608 blacklist(['vk', 'gm', '_', 'fontmgr_iter_factoryWin10'])
609 blacklist(['vk', 'gm', '_', 'fontmgr_matchWin10'])
610 blacklist(['vk', 'gm', '_', 'fontscalerWin'])
611 blacklist(['vk', 'gm', '_', 'fontscalerdistortable'])
612 blacklist(['vk', 'gm', '_', 'gammagradienttext'])
613 blacklist(['vk', 'gm', '_', 'gammatextWin'])
614 blacklist(['vk', 'gm', '_', 'gradtext'])
615 blacklist(['vk', 'gm', '_', 'hairmodes'])
616 blacklist(['vk', 'gm', '_', 'imagefilters_xfermodes'])
617 blacklist(['vk', 'gm', '_', 'imagefiltersclipped'])
618 blacklist(['vk', 'gm', '_', 'imagefiltersgraph'])
619 blacklist(['vk', 'gm', '_', 'imagefiltersscaled'])
620 blacklist(['vk', 'gm', '_', 'imagefiltersstroked'])
621 blacklist(['vk', 'gm', '_', 'imagefilterstransformed'])
622 blacklist(['vk', 'gm', '_', 'imageresizetiled'])
623 blacklist(['vk', 'gm', '_', 'lcdblendmodes'])
624 blacklist(['vk', 'gm', '_', 'lcdoverlap'])
625 blacklist(['vk', 'gm', '_', 'lcdtextWin'])
626 blacklist(['vk', 'gm', '_', 'lcdtextsize'])
627 blacklist(['vk', 'gm', '_', 'matriximagefilter'])
628 blacklist(['vk', 'gm', '_', 'mixedtextblobsCOLR'])
Greg Daniel744d3c52017-06-09 13:50:20 -0400629 blacklist(['vk', 'gm', '_', 'mixershader'])
Eric Boren4c7754c2017-04-10 08:19:10 -0400630 blacklist(['vk', 'gm', '_', 'pictureimagefilter'])
631 blacklist(['vk', 'gm', '_', 'resizeimagefilter'])
632 blacklist(['vk', 'gm', '_', 'rotate_imagefilter'])
633 blacklist(['vk', 'gm', '_', 'savelayer_lcdtext'])
634 blacklist(['vk', 'gm', '_', 'srcmode'])
635 blacklist(['vk', 'gm', '_', 'surfaceprops'])
636 blacklist(['vk', 'gm', '_', 'textblobgeometrychange'])
637 blacklist(['vk', 'gm', '_', 'textbloblooper'])
638 blacklist(['vk', 'gm', '_', 'textblobmixedsizes'])
639 blacklist(['vk', 'gm', '_', 'textblobmixedsizes_df'])
640 blacklist(['vk', 'gm', '_', 'textblobrandomfont'])
641 blacklist(['vk', 'gm', '_', 'textfilter_color'])
642 blacklist(['vk', 'gm', '_', 'textfilter_image'])
643 blacklist(['vk', 'gm', '_', 'typefacerenderingWin'])
644 blacklist(['vk', 'gm', '_', 'varied_text_clipped_lcd'])
645 blacklist(['vk', 'gm', '_', 'varied_text_ignorable_clip_lcd'])
646 blacklist(['vk', 'gm', '_', 'xfermodeimagefilter'])
647 match.append('~ApplyGamma')
648 match.append('~ComposedImageFilterBounds_Gpu')
Matt Sarett77443972017-04-11 11:25:37 -0400649 match.append('~DeferredTextureImage')
Chris Dalton114a3c02017-05-26 15:17:19 -0600650 match.append('~GrMeshTest')
Eric Boren4c7754c2017-04-10 08:19:10 -0400651 match.append('~ImageFilterFailAffectsTransparentBlack_Gpu')
652 match.append('~ImageFilterZeroBlurSigma_Gpu')
653 match.append('~ImageNewShader_GPU')
654 match.append('~NewTextureFromPixmap')
655 match.append('~ReadPixels_Gpu')
656 match.append('~ReadPixels_Texture')
657 match.append('~ReadWriteAlpha')
Brian Osmane18ceb12017-06-15 16:04:45 -0400658 match.append('~skbug6653')
Eric Boren4c7754c2017-04-10 08:19:10 -0400659 match.append('~SRGBReadWritePixels')
660 match.append('~SpecialImage_DeferredGpu')
661 match.append('~SpecialImage_Gpu')
662 match.append('~WritePixels_Gpu')
Brian Osman33ea1362017-04-19 10:51:39 -0400663 match.append('~WritePixelsNonTexture_Gpu')
Eric Boren4c7754c2017-04-10 08:19:10 -0400664 match.append('~XfermodeImageFilterCroppedInput_Gpu')
Robert Phillips4c390b92017-10-30 13:23:38 -0400665 match.append('~GrDefaultPathRendererTest') #skia:7244
666 match.append('~GrMSAAPathRendererTest') #skia:7244
Eric Boren4c7754c2017-04-10 08:19:10 -0400667
Robert Phillips435db422017-10-04 09:38:11 -0400668 if 'AlphaR2' in bot and 'ANGLE' in bot:
669 # skia:7096
670 match.append('~PinnedImageTest')
671
Eric Boren4c7754c2017-04-10 08:19:10 -0400672 if 'IntelIris540' in bot and 'ANGLE' in bot:
Eric Boren4c7754c2017-04-10 08:19:10 -0400673 for config in ['angle_d3d9_es2', 'angle_d3d11_es2', 'angle_gl_es2']:
Brian Salomon6e554e32017-06-23 12:08:10 -0400674 # skia:6103
Eric Boren4c7754c2017-04-10 08:19:10 -0400675 blacklist([config, 'gm', '_', 'multipicturedraw_invpathclip_simple'])
676 blacklist([config, 'gm', '_', 'multipicturedraw_noclip_simple'])
677 blacklist([config, 'gm', '_', 'multipicturedraw_pathclip_simple'])
678 blacklist([config, 'gm', '_', 'multipicturedraw_rectclip_simple'])
679 blacklist([config, 'gm', '_', 'multipicturedraw_rrectclip_simple'])
Brian Salomon6e554e32017-06-23 12:08:10 -0400680 # skia:6141
681 blacklist([config, 'gm', '_', 'discard'])
Eric Boren4c7754c2017-04-10 08:19:10 -0400682
Ben Wagnerc6b2e6b2017-10-07 18:57:25 -0400683 if ('IntelIris6100' in bot or 'IntelHD4400' in bot) and 'ANGLE' in bot:
684 # skia:6857
685 blacklist(['angle_d3d9_es2', 'gm', '_', 'lighting'])
686
Eric Boren89cd3572017-06-28 13:50:22 -0400687 if 'IntelBayTrail' in bot and api.vars.is_linux:
Eric Boren4c7754c2017-04-10 08:19:10 -0400688 match.append('~ImageStorageLoad') # skia:6358
689
Kevin Lubickc14e5a72017-08-15 13:22:19 -0400690 if 'PowerVRGX6250' in bot:
691 match.append('~gradients_view_perspective_nodither') #skia:6972
692
Eric Boren4c7754c2017-04-10 08:19:10 -0400693 if blacklisted:
694 args.append('--blacklist')
695 args.extend(blacklisted)
696
697 if match:
698 args.append('--match')
699 args.extend(match)
700
701 # These bots run out of memory running RAW codec tests. Do not run them in
702 # parallel
703 if ('NexusPlayer' in bot or 'Nexus5' in bot or 'Nexus9' in bot
704 or 'Win8-MSVC-ShuttleB' in bot):
705 args.append('--noRAW_threading')
706
Yuqian Li84be3ad2017-10-17 10:11:21 -0400707 if 'FSAA' in bot:
708 args.extend(['--analyticAA', 'false', '--deltaAA', 'false'])
709 if 'FAAA' in bot:
710 args.extend(['--deltaAA', 'false', '--forceAnalyticAA'])
711 if 'FDAA' in bot:
712 args.extend(['--deltaAA', '--forceDeltaAA'])
713
Stephan Altmueller74dac542017-09-11 15:32:21 -0400714 # Let's make all bots produce verbose output by default.
715 args.append('--verbose')
Mike Kleinc9089062017-06-26 09:09:32 -0400716
Eric Boren4c7754c2017-04-10 08:19:10 -0400717 return args
718
719
720def key_params(api):
721 """Build a unique key from the builder name (as a list).
722
723 E.g. arch x86 gpu GeForce320M mode MacMini4.1 os Mac10.6
724 """
725 # Don't bother to include role, which is always Test.
Kevin Lubick9ef6de72017-10-15 21:05:58 -0400726 blacklist = ['role', 'test_filter']
Eric Boren4c7754c2017-04-10 08:19:10 -0400727
728 flat = []
729 for k in sorted(api.vars.builder_cfg.keys()):
730 if k not in blacklist:
731 flat.append(k)
732 flat.append(api.vars.builder_cfg[k])
733 return flat
734
735
736def test_steps(api):
737 """Run the DM test."""
738 use_hash_file = False
739 if api.vars.upload_dm_results:
Eric Boren4c7754c2017-04-10 08:19:10 -0400740 host_dm_dir = str(api.vars.dm_dir)
741 device_dm_dir = str(api.flavor.device_dirs.dm_dir)
742 if host_dm_dir != device_dm_dir:
743 api.flavor.create_clean_device_dir(device_dm_dir)
744
745 # Obtain the list of already-generated hashes.
746 hash_filename = 'uninteresting_hashes.txt'
747
748 # Ensure that the tmp_dir exists.
Robert Iannucci8cd50412017-07-07 14:36:58 -0700749 api.run.run_once(api.file.ensure_directory,
750 'makedirs tmp_dir',
751 api.vars.tmp_dir)
Eric Boren4c7754c2017-04-10 08:19:10 -0400752
753 host_hashes_file = api.vars.tmp_dir.join(hash_filename)
754 hashes_file = api.flavor.device_path_join(
755 api.flavor.device_dirs.tmp_dir, hash_filename)
756 api.run(
757 api.python.inline,
758 'get uninteresting hashes',
759 program="""
760 import contextlib
761 import math
762 import socket
763 import sys
764 import time
765 import urllib2
766
Stephan Altmuellerc19ebc52017-05-30 16:39:17 -0400767 HASHES_URL = 'https://storage.googleapis.com/skia-infra-gm/hash_files/gold-prod-hashes.txt'
Eric Boren4c7754c2017-04-10 08:19:10 -0400768 RETRIES = 5
769 TIMEOUT = 60
770 WAIT_BASE = 15
771
772 socket.setdefaulttimeout(TIMEOUT)
773 for retry in range(RETRIES):
774 try:
775 with contextlib.closing(
776 urllib2.urlopen(HASHES_URL, timeout=TIMEOUT)) as w:
777 hashes = w.read()
778 with open(sys.argv[1], 'w') as f:
779 f.write(hashes)
780 break
781 except Exception as e:
782 print 'Failed to get uninteresting hashes from %s:' % HASHES_URL
783 print e
784 if retry == RETRIES:
785 raise
786 waittime = WAIT_BASE * math.pow(2, retry)
787 print 'Retry in %d seconds.' % waittime
788 time.sleep(waittime)
789 """,
790 args=[host_hashes_file],
791 abort_on_failure=False,
792 fail_build_on_failure=False,
793 infra_step=True)
794
795 if api.path.exists(host_hashes_file):
796 api.flavor.copy_file_to_device(host_hashes_file, hashes_file)
797 use_hash_file = True
798
799 # Run DM.
800 properties = [
801 'gitHash', api.vars.got_revision,
Eric Boren4c7754c2017-04-10 08:19:10 -0400802 'builder', api.vars.builder_name,
Eric Boren4c7754c2017-04-10 08:19:10 -0400803 ]
804 if api.vars.is_trybot:
805 properties.extend([
806 'issue', api.vars.issue,
807 'patchset', api.vars.patchset,
808 'patch_storage', api.vars.patch_storage,
809 ])
Eric Borenf9aa9e52017-04-10 09:56:10 -0400810 properties.extend(['swarming_bot_id', api.vars.swarming_bot_id])
811 properties.extend(['swarming_task_id', api.vars.swarming_task_id])
Eric Boren4c7754c2017-04-10 08:19:10 -0400812
813 args = [
814 'dm',
Eric Boren4c7754c2017-04-10 08:19:10 -0400815 '--resourcePath', api.flavor.device_dirs.resource_dir,
816 '--skps', api.flavor.device_dirs.skp_dir,
817 '--images', api.flavor.device_path_join(
818 api.flavor.device_dirs.images_dir, 'dm'),
819 '--colorImages', api.flavor.device_path_join(
820 api.flavor.device_dirs.images_dir, 'colorspace'),
821 '--nameByHash',
822 '--properties'
823 ] + properties
824
825 args.extend(['--svgs', api.flavor.device_dirs.svg_dir])
826
827 args.append('--key')
828 args.extend(key_params(api))
829 if use_hash_file:
830 args.extend(['--uninterestingHashesFile', hashes_file])
831 if api.vars.upload_dm_results:
832 args.extend(['--writePath', api.flavor.device_dirs.dm_dir])
833
Kevin Lubick2dafbd72017-08-31 10:39:05 -0400834 if 'Chromecast' in api.vars.builder_cfg.get('os', ''):
835 # Due to limited disk space, we only deal with skps and one image.
836 args = [
837 'dm',
838 '--undefok', # This helps branches that may not know new flags.
839 '--resourcePath', api.flavor.device_dirs.resource_dir,
840 '--skps', api.flavor.device_dirs.skp_dir,
841 '--images', api.flavor.device_path_join(
842 api.flavor.device_dirs.resource_dir, 'color_wheel.jpg'),
843 ]
844
Eric Boren89cd3572017-06-28 13:50:22 -0400845 args.extend(dm_flags(api, api.vars.builder_name))
Eric Boren4c7754c2017-04-10 08:19:10 -0400846
Eric Boren4c7754c2017-04-10 08:19:10 -0400847 # See skia:2789.
Ben Wagner988d15e2017-04-27 13:08:50 -0400848 extra_config_parts = api.vars.builder_cfg.get('extra_config', '').split('_')
849 if 'AbandonGpuContext' in extra_config_parts:
Eric Boren4c7754c2017-04-10 08:19:10 -0400850 args.append('--abandonGpuContext')
Ben Wagner988d15e2017-04-27 13:08:50 -0400851 if 'PreAbandonGpuContext' in extra_config_parts:
Eric Boren4c7754c2017-04-10 08:19:10 -0400852 args.append('--preAbandonGpuContext')
Ben Wagner988d15e2017-04-27 13:08:50 -0400853 if 'ReleaseAndAbandonGpuContext' in extra_config_parts:
Eric Boren6ec17e32017-04-26 14:25:29 -0400854 args.append('--releaseAndAbandonGpuContext')
Eric Boren4c7754c2017-04-10 08:19:10 -0400855
Ben Wagner5655ba42017-10-02 10:48:32 -0400856 api.run(api.flavor.step, 'dm', cmd=args, abort_on_failure=False)
Eric Boren4c7754c2017-04-10 08:19:10 -0400857
858 if api.vars.upload_dm_results:
859 # Copy images and JSON to host machine if needed.
860 api.flavor.copy_directory_contents_to_host(
861 api.flavor.device_dirs.dm_dir, api.vars.dm_dir)
862
863
borenet1ed2ae42016-07-26 11:52:17 -0700864def RunSteps(api):
Eric Boren4c7754c2017-04-10 08:19:10 -0400865 api.core.setup()
Robert Iannucci297a7ef2017-05-12 19:09:38 -0700866 env = {}
Eric Boren4c7754c2017-04-10 08:19:10 -0400867 if 'iOS' in api.vars.builder_name:
868 env['IOS_BUNDLE_ID'] = 'com.google.dm'
Stephan Altmueller63e843d2017-04-25 11:38:38 -0400869 env['IOS_MOUNT_POINT'] = api.vars.slave_dir.join('mnt_iosdevice')
Robert Iannucci297a7ef2017-05-12 19:09:38 -0700870 with api.context(env=env):
Eric Boren4c7754c2017-04-10 08:19:10 -0400871 try:
Kevin Lubick2dafbd72017-08-31 10:39:05 -0400872 if 'Chromecast' in api.vars.builder_name:
873 api.flavor.install(resources=True, skps=True)
874 else:
875 api.flavor.install_everything()
Eric Boren4c7754c2017-04-10 08:19:10 -0400876 test_steps(api)
877 finally:
878 api.flavor.cleanup_steps()
879 api.run.check_failure()
880
881
Eric Borenf9aa9e52017-04-10 09:56:10 -0400882TEST_BUILDERS = [
Kevin Lubick9ef6de72017-10-15 21:05:58 -0400883 'Test-Android-Clang-AndroidOne-GPU-Mali400MP2-arm-Release-All-Android',
884 'Test-Android-Clang-GalaxyS6-GPU-MaliT760-arm64-Debug-All-Android',
885 'Test-Android-Clang-GalaxyS7_G930A-GPU-Adreno530-arm64-Debug-All-Android',
886 'Test-Android-Clang-NVIDIA_Shield-GPU-TegraX1-arm64-Debug-All-Android',
887 'Test-Android-Clang-NVIDIA_Shield-GPU-TegraX1-arm64-Debug-All-Android_CCPR',
Ben Wagner1a2b3f02017-10-26 15:13:38 -0400888 'Test-Android-Clang-Nexus10-CPU-Exynos5250-arm-Release-All-Android',
Kevin Lubick9ef6de72017-10-15 21:05:58 -0400889 'Test-Android-Clang-Nexus5-GPU-Adreno330-arm-Release-All-Android',
890 'Test-Android-Clang-Nexus6p-GPU-Adreno430-arm64-Debug-All-Android_Vulkan',
891 'Test-Android-Clang-Nexus7-GPU-Tegra3-arm-Debug-All-Android',
892 'Test-Android-Clang-NexusPlayer-CPU-Moorefield-x86-Release-All-Android',
893 'Test-Android-Clang-NexusPlayer-GPU-PowerVR-x86-Release-All-Android_Vulkan',
894 'Test-Android-Clang-PixelC-CPU-TegraX1-arm64-Debug-All-Android',
895 'Test-Android-Clang-PixelXL-GPU-Adreno530-arm64-Debug-All-Android_CCPR',
896 'Test-Android-Clang-PixelXL-GPU-Adreno530-arm64-Debug-All-Android_Vulkan',
897 'Test-ChromeOS-Clang-Chromebook_C100p-GPU-MaliT764-arm-Debug-All',
898 'Test-ChromeOS-Clang-Chromebook_CB5_312T-GPU-PowerVRGX6250-arm-Debug-All',
899 'Test-Chromecast-GCC-Chorizo-GPU-Cortex_A7-arm-Release-All',
900 'Test-Debian9-Clang-GCE-CPU-AVX2-x86_64-Debug-All-ASAN',
Kevin Lubick32f318b2017-10-17 13:40:52 -0400901 'Test-Debian9-Clang-GCE-CPU-AVX2-x86_64-Debug-shard_00_10-Coverage',
Kevin Lubick9ef6de72017-10-15 21:05:58 -0400902 'Test-Debian9-Clang-GCE-CPU-AVX2-x86_64-Debug-All-MSAN',
903 ('Test-Debian9-Clang-GCE-CPU-AVX2-x86_64-Debug-All'
Ben Wagner9fb285e2017-10-02 16:53:07 -0400904 '-SK_USE_DISCARDABLE_SCALEDIMAGECACHE'),
Kevin Lubick9ef6de72017-10-15 21:05:58 -0400905 'Test-Debian9-Clang-GCE-CPU-AVX2-x86_64-Debug-All-UBSAN_float_cast_overflow',
906 ('Test-Debian9-Clang-GCE-CPU-AVX2-x86_64-Release-All'
Ben Wagner6e0a6b32017-09-26 14:11:15 -0400907 '-SK_FORCE_RASTER_PIPELINE_BLITTER'),
Kevin Lubick9ef6de72017-10-15 21:05:58 -0400908 'Test-Debian9-Clang-GCE-CPU-AVX2-x86_64-Release-All-TSAN',
909 'Test-Debian9-GCC-GCE-CPU-AVX2-x86-Debug-All',
910 'Test-Debian9-GCC-GCE-CPU-AVX2-x86_64-Debug-All',
911 'Test-Mac-Clang-MacMini7.1-CPU-AVX-x86_64-Release-All',
912 'Test-Mac-Clang-MacMini7.1-GPU-IntelIris5100-x86_64-Debug-All-CommandBuffer',
913 'Test-Ubuntu16-Clang-NUC5PPYH-GPU-IntelHD405-x86_64-Debug-All',
914 'Test-Ubuntu16-Clang-NUC6i5SYK-GPU-IntelIris540-x86_64-Debug-All-Vulkan',
915 ('Test-Ubuntu16-Clang-NUC6i5SYK-GPU-IntelIris540-x86_64-Debug-All-Vulkan'
Kevin Lubicke0240452017-10-10 10:51:40 -0400916 '_Coverage'),
Kevin Lubick9ef6de72017-10-15 21:05:58 -0400917 'Test-Ubuntu16-Clang-NUCDE3815TYKHE-GPU-IntelBayTrail-x86_64-Debug-All',
918 ('Test-Ubuntu17-GCC-Golo-GPU-QuadroP400-x86_64-Release-All'
Ben Wagner6e0a6b32017-09-26 14:11:15 -0400919 '-Valgrind_AbandonGpuContext_SK_CPU_LIMIT_SSE41'),
Kevin Lubick9ef6de72017-10-15 21:05:58 -0400920 ('Test-Ubuntu17-GCC-Golo-GPU-QuadroP400-x86_64-Release-All'
Ben Wagner6e0a6b32017-09-26 14:11:15 -0400921 '-Valgrind_PreAbandonGpuContext_SK_CPU_LIMIT_SSE41'),
Kevin Lubick9ef6de72017-10-15 21:05:58 -0400922 ('Test-Ubuntu17-GCC-Golo-GPU-QuadroP400-x86_64-Release-All'
Ben Wagner6e0a6b32017-09-26 14:11:15 -0400923 '-Valgrind_SK_CPU_LIMIT_SSE41'),
Ben Wagnerb2fd61a2017-10-23 16:01:44 -0400924 'Test-Win10-Clang-AlphaR2-GPU-RadeonR9M470X-x86_64-Debug-All-ANGLE',
Kevin Lubick9ef6de72017-10-15 21:05:58 -0400925 'Test-Win10-Clang-AlphaR2-GPU-RadeonR9M470X-x86_64-Debug-All-Vulkan',
926 ('Test-Win10-Clang-Golo-GPU-QuadroP400-x86_64-Release-All'
Ben Wagner6e0a6b32017-09-26 14:11:15 -0400927 '-ReleaseAndAbandonGpuContext'),
Ben Wagnerb2fd61a2017-10-23 16:01:44 -0400928 'Test-Win10-Clang-NUC6i5SYK-GPU-IntelIris540-x86_64-Debug-All-ANGLE',
Kevin Lubick9ef6de72017-10-15 21:05:58 -0400929 'Test-Win10-Clang-NUC6i5SYK-GPU-IntelIris540-x86_64-Debug-All-Vulkan',
Ben Wagnerb2fd61a2017-10-23 16:01:44 -0400930 'Test-Win10-Clang-NUCD34010WYKH-GPU-IntelHD4400-x86_64-Release-All-ANGLE',
Kevin Lubick9ef6de72017-10-15 21:05:58 -0400931 'Test-Win10-Clang-ShuttleA-GPU-GTX660-x86_64-Debug-All-Vulkan',
Ben Wagnerb2fd61a2017-10-23 16:01:44 -0400932 'Test-Win10-Clang-ShuttleC-GPU-GTX960-x86_64-Debug-All-ANGLE',
Kevin Lubick9ef6de72017-10-15 21:05:58 -0400933 'Test-Win10-Clang-ZBOX-GPU-GTX1070-x86_64-Debug-All-Vulkan',
Ben Wagner077710b2017-10-26 13:12:39 -0400934 'Test-Win2k8-Clang-GCE-CPU-AVX2-x86_64-Debug-All-FAAA',
935 'Test-Win2k8-Clang-GCE-CPU-AVX2-x86_64-Debug-All-FDAA',
936 'Test-Win2k8-Clang-GCE-CPU-AVX2-x86_64-Debug-All-FSAA',
Kevin Lubick9ef6de72017-10-15 21:05:58 -0400937 'Test-Win8-MSVC-Golo-CPU-AVX-x86-Debug-All',
938 'Test-iOS-Clang-iPadPro-GPU-GT7800-arm64-Release-All',
Eric Borenf9aa9e52017-04-10 09:56:10 -0400939]
borenet1ed2ae42016-07-26 11:52:17 -0700940
941
942def GenTests(api):
Eric Borenf9aa9e52017-04-10 09:56:10 -0400943 for builder in TEST_BUILDERS:
944 test = (
945 api.test(builder) +
946 api.properties(buildername=builder,
947 revision='abc123',
948 path_config='kitchen',
949 swarm_out_dir='[SWARM_OUT_DIR]') +
950 api.path.exists(
951 api.path['start_dir'].join('skia'),
952 api.path['start_dir'].join('skia', 'infra', 'bots', 'assets',
953 'skimage', 'VERSION'),
954 api.path['start_dir'].join('skia', 'infra', 'bots', 'assets',
955 'skp', 'VERSION'),
956 api.path['start_dir'].join('skia', 'infra', 'bots', 'assets',
957 'svg', 'VERSION'),
958 api.path['start_dir'].join('tmp', 'uninteresting_hashes.txt')
Ben Wagnerf835c222017-04-30 11:14:51 -0400959 ) +
960 api.step_data('get swarming bot id',
961 stdout=api.raw_io.output('skia-bot-123')) +
962 api.step_data('get swarming task id',
963 stdout=api.raw_io.output('123456'))
Eric Borenf9aa9e52017-04-10 09:56:10 -0400964 )
Eric Borenf9aa9e52017-04-10 09:56:10 -0400965 if 'Win' in builder:
966 test += api.platform('win', 64)
Eric Boren4c7754c2017-04-10 08:19:10 -0400967
Kevin Lubick2dafbd72017-08-31 10:39:05 -0400968 if 'Chromecast' in builder:
969 test += api.step_data(
970 'read chromecast ip',
971 stdout=api.raw_io.output('192.168.1.2:5555'))
972
Eric Borenf9aa9e52017-04-10 09:56:10 -0400973 if 'ChromeOS' in builder:
974 test += api.step_data(
975 'read chromeos ip',
976 stdout=api.raw_io.output('{"user_ip":"foo@127.0.0.1"}'))
Eric Boren4c7754c2017-04-10 08:19:10 -0400977
978
Eric Borenf9aa9e52017-04-10 09:56:10 -0400979 yield test
Eric Boren4c7754c2017-04-10 08:19:10 -0400980
Kevin Lubick9ef6de72017-10-15 21:05:58 -0400981 builder = 'Test-Win2k8-MSVC-GCE-CPU-AVX2-x86_64-Release-All'
Kevin Lubickfe079d42017-04-12 08:31:48 -0400982 yield (
983 api.test('trybot') +
984 api.properties(buildername=builder,
985 revision='abc123',
986 path_config='kitchen',
987 swarm_out_dir='[SWARM_OUT_DIR]') +
988 api.properties(patch_storage='gerrit') +
989 api.properties.tryserver(
990 buildername=builder,
991 gerrit_project='skia',
992 gerrit_url='https://skia-review.googlesource.com/',
993 )+
994 api.path.exists(
995 api.path['start_dir'].join('skia'),
996 api.path['start_dir'].join('skia', 'infra', 'bots', 'assets',
997 'skimage', 'VERSION'),
998 api.path['start_dir'].join('skia', 'infra', 'bots', 'assets',
999 'skp', 'VERSION'),
1000 api.path['start_dir'].join('skia', 'infra', 'bots', 'assets',
1001 'svg', 'VERSION'),
1002 api.path['start_dir'].join('tmp', 'uninteresting_hashes.txt')
1003 )
1004 )
1005
Kevin Lubick9ef6de72017-10-15 21:05:58 -04001006 builder = 'Test-Debian9-GCC-GCE-CPU-AVX2-x86_64-Debug-All'
borenet1ed2ae42016-07-26 11:52:17 -07001007 yield (
Eric Boren4c7754c2017-04-10 08:19:10 -04001008 api.test('failed_dm') +
1009 api.properties(buildername=builder,
borenet1ed2ae42016-07-26 11:52:17 -07001010 revision='abc123',
1011 path_config='kitchen',
1012 swarm_out_dir='[SWARM_OUT_DIR]') +
1013 api.path.exists(
Ravi Mistry9bcca6a2016-11-21 16:06:19 -05001014 api.path['start_dir'].join('skia'),
1015 api.path['start_dir'].join('skia', 'infra', 'bots', 'assets',
Eric Boren4c7754c2017-04-10 08:19:10 -04001016 'skimage', 'VERSION'),
Ravi Mistry9bcca6a2016-11-21 16:06:19 -05001017 api.path['start_dir'].join('skia', 'infra', 'bots', 'assets',
Eric Boren4c7754c2017-04-10 08:19:10 -04001018 'skp', 'VERSION'),
Ravi Mistry9bcca6a2016-11-21 16:06:19 -05001019 api.path['start_dir'].join('skia', 'infra', 'bots', 'assets',
Eric Boren4c7754c2017-04-10 08:19:10 -04001020 'svg', 'VERSION'),
Ravi Mistry9bcca6a2016-11-21 16:06:19 -05001021 api.path['start_dir'].join('tmp', 'uninteresting_hashes.txt')
Eric Boren4c7754c2017-04-10 08:19:10 -04001022 ) +
1023 api.step_data('symbolized dm', retcode=1)
1024 )
1025
Kevin Lubick9ef6de72017-10-15 21:05:58 -04001026 builder = 'Test-Android-Clang-Nexus7-GPU-Tegra3-arm-Release-All-Android'
Eric Boren4c7754c2017-04-10 08:19:10 -04001027 yield (
1028 api.test('failed_get_hashes') +
1029 api.properties(buildername=builder,
Eric Boren4c7754c2017-04-10 08:19:10 -04001030 revision='abc123',
1031 path_config='kitchen',
1032 swarm_out_dir='[SWARM_OUT_DIR]') +
1033 api.path.exists(
1034 api.path['start_dir'].join('skia'),
1035 api.path['start_dir'].join('skia', 'infra', 'bots', 'assets',
1036 'skimage', 'VERSION'),
1037 api.path['start_dir'].join('skia', 'infra', 'bots', 'assets',
1038 'skp', 'VERSION'),
1039 api.path['start_dir'].join('skia', 'infra', 'bots', 'assets',
1040 'svg', 'VERSION'),
1041 api.path['start_dir'].join('tmp', 'uninteresting_hashes.txt')
1042 ) +
1043 api.step_data('get uninteresting hashes', retcode=1)
1044 )
1045
Kevin Lubick9ef6de72017-10-15 21:05:58 -04001046 builder = ('Test-Android-Clang-NexusPlayer-CPU-Moorefield-x86-'
1047 'Debug-All-Android')
Eric Boren4c7754c2017-04-10 08:19:10 -04001048 yield (
1049 api.test('failed_push') +
1050 api.properties(buildername=builder,
Eric Boren4c7754c2017-04-10 08:19:10 -04001051 revision='abc123',
1052 path_config='kitchen',
1053 swarm_out_dir='[SWARM_OUT_DIR]') +
1054 api.path.exists(
1055 api.path['start_dir'].join('skia'),
1056 api.path['start_dir'].join('skia', 'infra', 'bots', 'assets',
1057 'skimage', 'VERSION'),
1058 api.path['start_dir'].join('skia', 'infra', 'bots', 'assets',
1059 'skp', 'VERSION'),
1060 api.path['start_dir'].join('skia', 'infra', 'bots', 'assets',
1061 'svg', 'VERSION'),
1062 api.path['start_dir'].join('tmp', 'uninteresting_hashes.txt')
1063 ) +
1064 api.step_data('push [START_DIR]/skia/resources/* '+
1065 '/sdcard/revenge_of_the_skiabot/resources', retcode=1)
1066 )
1067
Ben Wagner1a2b3f02017-10-26 15:13:38 -04001068 builder = 'Test-Android-Clang-Nexus7-GPU-Tegra3-arm-Debug-All-Android'
Eric Boren4c7754c2017-04-10 08:19:10 -04001069 yield (
1070 api.test('failed_pull') +
1071 api.properties(buildername=builder,
Eric Boren4c7754c2017-04-10 08:19:10 -04001072 revision='abc123',
1073 path_config='kitchen',
1074 swarm_out_dir='[SWARM_OUT_DIR]') +
1075 api.path.exists(
1076 api.path['start_dir'].join('skia'),
1077 api.path['start_dir'].join('skia', 'infra', 'bots', 'assets',
1078 'skimage', 'VERSION'),
1079 api.path['start_dir'].join('skia', 'infra', 'bots', 'assets',
1080 'skp', 'VERSION'),
1081 api.path['start_dir'].join('skia', 'infra', 'bots', 'assets',
1082 'svg', 'VERSION'),
1083 api.path['start_dir'].join('tmp', 'uninteresting_hashes.txt')
1084 ) +
1085 api.step_data('dm', retcode=1) +
1086 api.step_data('pull /sdcard/revenge_of_the_skiabot/dm_out '+
1087 '[CUSTOM_[SWARM_OUT_DIR]]/dm', retcode=1)
borenetbfa5b452016-10-19 10:13:32 -07001088 )
Eric Boren053d7a42017-09-15 08:35:31 -04001089
1090 yield (
Kevin Lubick451b7432017-09-15 14:44:12 -04001091 api.test('internal_bot_1') +
Eric Boren053d7a42017-09-15 08:35:31 -04001092 api.properties(buildername=builder,
1093 revision='abc123',
1094 path_config='kitchen',
1095 swarm_out_dir='[SWARM_OUT_DIR]',
Kevin Lubick451b7432017-09-15 14:44:12 -04001096 internal_hardware_label=1) +
Eric Boren053d7a42017-09-15 08:35:31 -04001097 api.path.exists(
1098 api.path['start_dir'].join('skia'),
1099 api.path['start_dir'].join('skia', 'infra', 'bots', 'assets',
1100 'skimage', 'VERSION'),
1101 api.path['start_dir'].join('skia', 'infra', 'bots', 'assets',
1102 'skp', 'VERSION'),
1103 api.path['start_dir'].join('skia', 'infra', 'bots', 'assets',
1104 'svg', 'VERSION'),
1105 api.path['start_dir'].join('tmp', 'uninteresting_hashes.txt')
1106 )
1107 )
Kevin Lubickbd27d1d2017-10-13 08:01:49 -04001108
1109 yield (
1110 api.test('internal_bot_2') +
1111 api.properties(buildername=builder,
1112 revision='abc123',
1113 path_config='kitchen',
1114 swarm_out_dir='[SWARM_OUT_DIR]',
1115 internal_hardware_label=2) +
1116 api.path.exists(
1117 api.path['start_dir'].join('skia'),
1118 api.path['start_dir'].join('skia', 'infra', 'bots', 'assets',
1119 'skimage', 'VERSION'),
1120 api.path['start_dir'].join('skia', 'infra', 'bots', 'assets',
1121 'skp', 'VERSION'),
1122 api.path['start_dir'].join('skia', 'infra', 'bots', 'assets',
1123 'svg', 'VERSION'),
1124 api.path['start_dir'].join('tmp', 'uninteresting_hashes.txt')
1125 )
1126 )