blob: 8ca7872f0ff1efcda78f9ad1b93178337eabd551 [file] [log] [blame]
borenet1ed2ae42016-07-26 11:52:17 -07001# Copyright 2016 The Chromium Authors. All rights reserved.
2# Use of this source code is governed by a BSD-style license that can be
3# found in the LICENSE file.
4
5
6# Recipe module for Skia Swarming test.
7
8
9DEPS = [
borenetbc20a702016-08-03 10:38:44 -070010 'build/file',
borenet1436a092016-08-03 08:23:10 -070011 'core',
borenet1ed2ae42016-07-26 11:52:17 -070012 'recipe_engine/json',
13 'recipe_engine/path',
14 'recipe_engine/platform',
15 'recipe_engine/properties',
borenetbc20a702016-08-03 10:38:44 -070016 'recipe_engine/python',
borenet1ed2ae42016-07-26 11:52:17 -070017 'recipe_engine/raw_io',
borenetbc20a702016-08-03 10:38:44 -070018 'flavor',
borenet1436a092016-08-03 08:23:10 -070019 'run',
borenetbc20a702016-08-03 10:38:44 -070020 'vars',
borenet1ed2ae42016-07-26 11:52:17 -070021]
22
23
24TEST_BUILDERS = {
25 'client.skia': {
26 'skiabot-linux-swarm-000': [
mtkleindf5df812016-09-12 12:24:38 -070027 'Test-Android-Clang-AndroidOne-CPU-MT6582-arm-Release-GN_Android',
mtklein122fac32016-09-19 07:26:41 -070028 'Test-Android-Clang-AndroidOne-GPU-Mali400MP2-arm-Release-GN_Android',
Ben Wagner52245152016-11-02 13:11:05 -040029 'Test-Android-Clang-GalaxyS7-GPU-Adreno530-arm64-Debug-GN_Android',
mtklein122fac32016-09-19 07:26:41 -070030 'Test-Android-Clang-NVIDIA_Shield-GPU-TegraX1-arm64-Debug-GN_Android',
31 'Test-Android-Clang-Nexus10-GPU-MaliT604-arm-Release-GN_Android',
32 'Test-Android-Clang-Nexus6-GPU-Adreno420-arm-Debug-GN_Android',
egdaniel15ba6d92016-09-20 12:39:29 -070033 'Test-Android-Clang-Nexus6p-GPU-Adreno430-arm64-Debug-GN_Android_Vulkan',
mtklein122fac32016-09-19 07:26:41 -070034 'Test-Android-Clang-Nexus7-GPU-Tegra3-arm-Debug-GN_Android',
mtklein122fac32016-09-19 07:26:41 -070035 'Test-Android-Clang-NexusPlayer-CPU-SSE4-x86-Release-GN_Android',
Ben Wagner25509582016-11-04 11:31:05 -040036 'Test-Android-Clang-PixelC-GPU-TegraX1-arm64-Debug-GN_Android',
borenet2c3112d2016-08-05 06:30:10 -070037 'Test-Mac-Clang-MacMini4.1-GPU-GeForce320M-x86_64-Debug',
38 'Test-Mac-Clang-MacMini6.2-CPU-AVX-x86_64-Debug',
39 'Test-Mac-Clang-MacMini6.2-GPU-HD4000-x86_64-Debug-CommandBuffer',
borenet2c3112d2016-08-05 06:30:10 -070040 'Test-Ubuntu-GCC-GCE-CPU-AVX2-x86-Debug',
borenet1ed2ae42016-07-26 11:52:17 -070041 'Test-Ubuntu-GCC-GCE-CPU-AVX2-x86_64-Debug',
mtklein2b3c2a32016-09-08 08:39:34 -070042 'Test-Ubuntu-GCC-GCE-CPU-AVX2-x86_64-Debug-ASAN',
borenet1ed2ae42016-07-26 11:52:17 -070043 'Test-Ubuntu-GCC-GCE-CPU-AVX2-x86_64-Debug-MSAN',
rmistrybcba19d2016-08-11 12:36:58 -070044 'Test-Ubuntu-GCC-GCE-CPU-AVX2-x86_64-Release-Shared',
borenet2c3112d2016-08-05 06:30:10 -070045 'Test-Ubuntu-GCC-GCE-CPU-AVX2-x86_64-Release-TSAN',
borenet1ed2ae42016-07-26 11:52:17 -070046 'Test-Ubuntu-GCC-ShuttleA-GPU-GTX550Ti-x86_64-Release-Valgrind',
borenet2c3112d2016-08-05 06:30:10 -070047 'Test-Win10-MSVC-ShuttleA-GPU-GTX660-x86_64-Debug-Vulkan',
Ben Wagnercf272b52016-12-29 14:10:04 -050048 'Test-Win10-MSVC-ZBOX-GPU-GTX1070-x86_64-Debug',
borenet1ed2ae42016-07-26 11:52:17 -070049 'Test-Win8-MSVC-ShuttleB-CPU-AVX2-x86_64-Release-Trybot',
borenet2c3112d2016-08-05 06:30:10 -070050 'Test-Win8-MSVC-ShuttleB-GPU-GTX960-x86_64-Debug-ANGLE',
mtkleindf5df812016-09-12 12:24:38 -070051 'Test-iOS-Clang-iPad4-GPU-SGX554-Arm7-Debug',
borenet1ed2ae42016-07-26 11:52:17 -070052 ],
53 },
54}
55
56
borenete2251ac2016-08-05 05:40:59 -070057def dm_flags(bot):
58 args = []
59
60 # 32-bit desktop bots tend to run out of memory, because they have relatively
61 # far more cores than RAM (e.g. 32 cores, 3G RAM). Hold them back a bit.
62 if '-x86-' in bot and not 'NexusPlayer' in bot:
borenet2c3112d2016-08-05 06:30:10 -070063 args.extend('--threads 4'.split(' '))
borenete2251ac2016-08-05 05:40:59 -070064
65 # These are the canonical configs that we would ideally run on all bots. We
66 # may opt out or substitute some below for specific bots
Matt Sarett5de15c82016-12-15 17:24:17 -050067 configs = ['8888', 'srgb', 'gpu', 'gpudft', 'gpusrgb', 'pdf']
borenete2251ac2016-08-05 05:40:59 -070068 # Add in either msaa4 or msaa16 to the canonical set of configs to run
69 if 'Android' in bot or 'iOS' in bot:
70 configs.append('msaa4')
71 else:
72 configs.append('msaa16')
73
Ben Wagner52245152016-11-02 13:11:05 -040074 # The NP produces a long error stream when we run with MSAA. The Tegra3 just
75 # doesn't support it.
76 if ('NexusPlayer' in bot or
borenete2251ac2016-08-05 05:40:59 -070077 'Tegra3' in bot or
Ben Wagnera2225492016-11-03 09:04:31 -040078 # We aren't interested in fixing msaa bugs on iPad4.
Ben Wagnerc0b4d212017-01-01 10:31:22 -050079 'iPad4' in bot or
benjaminwagnerbc02cae2016-09-23 17:45:45 -070080 # skia:5792
Ben Wagnerc0b4d212017-01-01 10:31:22 -050081 'iHD530' in bot or
82 'IntelIris540' in bot):
borenete2251ac2016-08-05 05:40:59 -070083 configs = [x for x in configs if 'msaa' not in x]
84
Brian Salomon42cb4902016-11-03 10:08:47 -040085 # The NP produces different images for dft on every run.
86 if 'NexusPlayer' in bot:
87 configs = [x for x in configs if 'gpudft' not in x]
88
Ben Wagner52245152016-11-02 13:11:05 -040089 # Runs out of memory on Android bots. Everyone else seems fine.
90 if 'Android' in bot:
borenete2251ac2016-08-05 05:40:59 -070091 configs.remove('pdf')
92
93 if '-GCE-' in bot:
mtklein896ddb72016-09-14 10:33:12 -070094 configs.extend(['565'])
Matt Sarett5de15c82016-12-15 17:24:17 -050095 configs.extend(['f16'])
borenete2251ac2016-08-05 05:40:59 -070096 configs.extend(['sp-8888', '2ndpic-8888']) # Test niche uses of SkPicture.
mtklein03591a72016-08-07 13:35:46 -070097 configs.extend(['lite-8888']) # Experimental display list.
borenete2251ac2016-08-05 05:40:59 -070098
99 if '-TSAN' not in bot:
100 if ('TegraK1' in bot or
101 'TegraX1' in bot or
102 'GTX550Ti' in bot or
103 'GTX660' in bot or
104 'GT610' in bot):
105 if 'Android' in bot:
borenet2c3112d2016-08-05 06:30:10 -0700106 configs.append('nvprdit4')
borenete2251ac2016-08-05 05:40:59 -0700107 else:
108 configs.append('nvprdit16')
109
Ben Wagner25509582016-11-04 11:31:05 -0400110 # We want to test the OpenGL config not the GLES config on the Shield
111 if 'NVIDIA_Shield' in bot:
borenete2251ac2016-08-05 05:40:59 -0700112 configs = [x.replace('gpu', 'gl') for x in configs]
113 configs = [x.replace('msaa', 'glmsaa') for x in configs]
114 configs = [x.replace('nvpr', 'glnvpr') for x in configs]
115
116 # NP is running out of RAM when we run all these modes. skia:3255
117 if 'NexusPlayer' not in bot:
118 configs.extend(mode + '-8888' for mode in
119 ['serialize', 'tiles_rt', 'pic'])
120
borenete2251ac2016-08-05 05:40:59 -0700121 # Test instanced rendering on a limited number of platforms
borenet2c3112d2016-08-05 06:30:10 -0700122 if 'Nexus6' in bot:
borenete2251ac2016-08-05 05:40:59 -0700123 configs.append('esinst') # esinst4 isn't working yet on Adreno.
Ben Wagner25509582016-11-04 11:31:05 -0400124 elif 'NVIDIA_Shield' in bot:
borenete2251ac2016-08-05 05:40:59 -0700125 # Multisampled instanced configs use nvpr.
126 configs = [x.replace('glnvpr', 'glinst') for x in configs]
127 configs.append('glinst')
Ben Wagner25509582016-11-04 11:31:05 -0400128 elif 'PixelC' in bot:
129 # Multisampled instanced configs use nvpr.
130 configs = [x.replace('nvpr', 'esinst') for x in configs]
131 configs.append('esinst')
borenete2251ac2016-08-05 05:40:59 -0700132 elif 'MacMini6.2' in bot:
borenet2c3112d2016-08-05 06:30:10 -0700133 configs.extend(['glinst', 'glinst16'])
borenete2251ac2016-08-05 05:40:59 -0700134
135 # CommandBuffer bot *only* runs the command_buffer config.
136 if 'CommandBuffer' in bot:
borenet2c3112d2016-08-05 06:30:10 -0700137 configs = ['commandbuffer']
borenete2251ac2016-08-05 05:40:59 -0700138
Brian Salomon02906202016-10-18 13:36:32 -0400139 # ANGLE bot *only* runs the angle configs
140 if 'ANGLE' in bot:
Brian Salomon4a5e49d2016-10-20 10:14:45 -0400141 configs = ['angle_d3d11_es2',
142 'angle_d3d9_es2',
143 'angle_d3d11_es2_msaa4',
144 'angle_gl_es2']
Brian Salomon02906202016-10-18 13:36:32 -0400145
borenete2251ac2016-08-05 05:40:59 -0700146 # Vulkan bot *only* runs the vk config.
147 if 'Vulkan' in bot:
borenet2c3112d2016-08-05 06:30:10 -0700148 configs = ['vk']
borenete2251ac2016-08-05 05:40:59 -0700149
150 args.append('--config')
151 args.extend(configs)
152
153 # Run tests, gms, and image decoding tests everywhere.
rmistry70c43ef2016-08-12 07:25:53 -0700154 args.extend('--src tests gm image colorImage svg'.split(' '))
borenete2251ac2016-08-05 05:40:59 -0700155
156 if 'GalaxyS' in bot:
157 args.extend(('--threads', '0'))
158
mtklein09b352f2016-09-15 06:24:03 -0700159 blacklisted = []
160 def blacklist(quad):
161 config, src, options, name = quad.split(' ') if type(quad) is str else quad
162 if config == '_' or config in configs:
163 blacklisted.extend([config, src, options, name])
borenete2251ac2016-08-05 05:40:59 -0700164
165 # TODO: ???
mtklein09b352f2016-09-15 06:24:03 -0700166 blacklist('f16 _ _ dstreadshuffle')
167 blacklist('f16 image _ _')
mtklein09b352f2016-09-15 06:24:03 -0700168 blacklist('gpusrgb image _ _')
mtklein1bf8e6e2016-09-15 11:02:05 -0700169 blacklist('glsrgb image _ _')
borenete2251ac2016-08-05 05:40:59 -0700170
Matt Sarett5de15c82016-12-15 17:24:17 -0500171 # Decoder tests are now performing gamma correct decodes. This means
172 # that, when viewing the results, we need to perform a gamma correct
173 # encode to PNG. Therefore, we run the image tests in srgb mode instead
174 # of 8888.
175 blacklist('8888 image _ _')
176
borenete2251ac2016-08-05 05:40:59 -0700177 if 'Valgrind' in bot:
178 # These take 18+ hours to run.
mtklein09b352f2016-09-15 06:24:03 -0700179 blacklist('pdf gm _ fontmgr_iter')
180 blacklist('pdf _ _ PANO_20121023_214540.jpg')
181 blacklist('pdf skp _ worldjournal')
182 blacklist('pdf skp _ desk_baidu.skp')
183 blacklist('pdf skp _ desk_wikipedia.skp')
fmalita7de57792016-10-03 11:07:36 -0700184 blacklist('_ svg _ _')
borenete2251ac2016-08-05 05:40:59 -0700185
186 if 'iOS' in bot:
mtklein09b352f2016-09-15 06:24:03 -0700187 blacklist('gpu skp _ _')
188 blacklist('msaa skp _ _')
189 blacklist('msaa16 gm _ tilemodesProcess')
borenete2251ac2016-08-05 05:40:59 -0700190
191 if 'Mac' in bot or 'iOS' in bot:
192 # CG fails on questionable bmps
mtklein09b352f2016-09-15 06:24:03 -0700193 blacklist('_ image gen_platf rgba32abf.bmp')
194 blacklist('_ image gen_platf rgb24prof.bmp')
195 blacklist('_ image gen_platf rgb24lprof.bmp')
196 blacklist('_ image gen_platf 8bpp-pixeldata-cropped.bmp')
197 blacklist('_ image gen_platf 4bpp-pixeldata-cropped.bmp')
198 blacklist('_ image gen_platf 32bpp-pixeldata-cropped.bmp')
199 blacklist('_ image gen_platf 24bpp-pixeldata-cropped.bmp')
borenete2251ac2016-08-05 05:40:59 -0700200
201 # CG has unpredictable behavior on this questionable gif
202 # It's probably using uninitialized memory
mtklein09b352f2016-09-15 06:24:03 -0700203 blacklist('_ image gen_platf frame_larger_than_image.gif')
borenete2251ac2016-08-05 05:40:59 -0700204
msarett16b15dd2016-09-20 05:50:16 -0700205 # CG has unpredictable behavior on incomplete pngs
206 # skbug.com/5774
207 blacklist('_ image gen_platf inc0.png')
208 blacklist('_ image gen_platf inc1.png')
209 blacklist('_ image gen_platf inc2.png')
210 blacklist('_ image gen_platf inc3.png')
211 blacklist('_ image gen_platf inc4.png')
212 blacklist('_ image gen_platf inc5.png')
213 blacklist('_ image gen_platf inc6.png')
214 blacklist('_ image gen_platf inc7.png')
215 blacklist('_ image gen_platf inc8.png')
216 blacklist('_ image gen_platf inc9.png')
217 blacklist('_ image gen_platf inc10.png')
218 blacklist('_ image gen_platf inc11.png')
219 blacklist('_ image gen_platf inc12.png')
220 blacklist('_ image gen_platf inc13.png')
221 blacklist('_ image gen_platf inc14.png')
222
borenete2251ac2016-08-05 05:40:59 -0700223 # WIC fails on questionable bmps
224 if 'Win' in bot:
mtklein09b352f2016-09-15 06:24:03 -0700225 blacklist('_ image gen_platf rle8-height-negative.bmp')
226 blacklist('_ image gen_platf rle4-height-negative.bmp')
227 blacklist('_ image gen_platf pal8os2v2.bmp')
228 blacklist('_ image gen_platf pal8os2v2-16.bmp')
229 blacklist('_ image gen_platf rgba32abf.bmp')
230 blacklist('_ image gen_platf rgb24prof.bmp')
231 blacklist('_ image gen_platf rgb24lprof.bmp')
232 blacklist('_ image gen_platf 8bpp-pixeldata-cropped.bmp')
233 blacklist('_ image gen_platf 4bpp-pixeldata-cropped.bmp')
234 blacklist('_ image gen_platf 32bpp-pixeldata-cropped.bmp')
235 blacklist('_ image gen_platf 24bpp-pixeldata-cropped.bmp')
borenete2251ac2016-08-05 05:40:59 -0700236 if 'x86_64' in bot and 'CPU' in bot:
237 # This GM triggers a SkSmallAllocator assert.
mtklein09b352f2016-09-15 06:24:03 -0700238 blacklist('_ gm _ composeshader_bitmap')
borenete2251ac2016-08-05 05:40:59 -0700239
240 if 'Android' in bot or 'iOS' in bot:
241 # This test crashes the N9 (perhaps because of large malloc/frees). It also
242 # is fairly slow and not platform-specific. So we just disable it on all of
243 # Android and iOS. skia:5438
mtklein09b352f2016-09-15 06:24:03 -0700244 blacklist('_ test _ GrShape')
borenete2251ac2016-08-05 05:40:59 -0700245
246 if 'Win8' in bot:
247 # bungeman: "Doesn't work on Windows anyway, produces unstable GMs with
248 # 'Unexpected error' from DirectWrite"
mtklein09b352f2016-09-15 06:24:03 -0700249 blacklist('_ gm _ fontscalerdistortable')
fmalitab5b6de92016-08-16 07:08:48 -0700250 # skia:5636
mtklein09b352f2016-09-15 06:24:03 -0700251 blacklist('_ svg _ Nebraska-StateSeal.svg')
borenete2251ac2016-08-05 05:40:59 -0700252
253 # skia:4095
254 bad_serialize_gms = ['bleed_image',
255 'c_gms',
256 'colortype',
257 'colortype_xfermodes',
258 'drawfilter',
259 'fontmgr_bounds_0.75_0',
260 'fontmgr_bounds_1_-0.25',
261 'fontmgr_bounds',
262 'fontmgr_match',
fmalitace2fc6a2016-08-26 10:13:39 -0700263 'fontmgr_iter',
264 'imagemasksubset']
borenete2251ac2016-08-05 05:40:59 -0700265
266 # skia:5589
267 bad_serialize_gms.extend(['bitmapfilters',
268 'bitmapshaders',
269 'bleed',
270 'bleed_alpha_bmp',
271 'bleed_alpha_bmp_shader',
272 'convex_poly_clip',
273 'extractalpha',
274 'filterbitmap_checkerboard_32_32_g8',
275 'filterbitmap_image_mandrill_64',
276 'shadows',
277 'simpleaaclip_aaclip'])
278 # skia:5595
279 bad_serialize_gms.extend(['composeshader_bitmap',
280 'scaled_tilemodes_npot',
281 'scaled_tilemodes'])
liyuqianbfebe222016-11-14 11:17:16 -0800282
mtklein768dc8f2016-09-20 15:41:29 -0700283 # skia:5778
284 bad_serialize_gms.append('typefacerendering_pfaMac')
liyuqianbfebe222016-11-14 11:17:16 -0800285 # skia:5942
286 bad_serialize_gms.append('parsedpaths')
Florin Malitaca795352016-11-16 14:45:34 -0500287
288 # these use a custom image generator which doesn't serialize
289 bad_serialize_gms.append('ImageGeneratorExternal_rect')
290 bad_serialize_gms.append('ImageGeneratorExternal_shader')
291
borenete2251ac2016-08-05 05:40:59 -0700292 for test in bad_serialize_gms:
mtklein09b352f2016-09-15 06:24:03 -0700293 blacklist(['serialize-8888', 'gm', '_', test])
borenete2251ac2016-08-05 05:40:59 -0700294
295 if 'Mac' not in bot:
296 for test in ['bleed_alpha_image', 'bleed_alpha_image_shader']:
mtklein09b352f2016-09-15 06:24:03 -0700297 blacklist(['serialize-8888', 'gm', '_', test])
borenete2251ac2016-08-05 05:40:59 -0700298 # It looks like we skip these only for out-of-memory concerns.
299 if 'Win' in bot or 'Android' in bot:
300 for test in ['verylargebitmap', 'verylarge_picture_image']:
mtklein09b352f2016-09-15 06:24:03 -0700301 blacklist(['serialize-8888', 'gm', '_', test])
borenete2251ac2016-08-05 05:40:59 -0700302
303 # skia:4769
304 for test in ['drawfilter']:
mtklein09b352f2016-09-15 06:24:03 -0700305 blacklist([ 'sp-8888', 'gm', '_', test])
306 blacklist([ 'pic-8888', 'gm', '_', test])
307 blacklist(['2ndpic-8888', 'gm', '_', test])
308 blacklist([ 'lite-8888', 'gm', '_', test])
borenete2251ac2016-08-05 05:40:59 -0700309 # skia:4703
310 for test in ['image-cacherator-from-picture',
311 'image-cacherator-from-raster',
312 'image-cacherator-from-ctable']:
mtklein09b352f2016-09-15 06:24:03 -0700313 blacklist([ 'sp-8888', 'gm', '_', test])
314 blacklist([ 'pic-8888', 'gm', '_', test])
315 blacklist([ '2ndpic-8888', 'gm', '_', test])
316 blacklist(['serialize-8888', 'gm', '_', test])
borenete2251ac2016-08-05 05:40:59 -0700317
fmalitaed387722016-09-30 06:14:49 -0700318 # GM that requires raster-backed canvas
Stan Iliev5f1bb0a2016-12-12 17:39:55 -0500319 for test in ['gamut', 'complexclip4_bw', 'complexclip4_aa']:
fmalitaed387722016-09-30 06:14:49 -0700320 blacklist([ 'sp-8888', 'gm', '_', test])
321 blacklist([ 'pic-8888', 'gm', '_', test])
322 blacklist([ 'lite-8888', 'gm', '_', test])
323 blacklist([ '2ndpic-8888', 'gm', '_', test])
324 blacklist(['serialize-8888', 'gm', '_', test])
325
Stan Iliev9f8bdbb2016-12-14 17:07:37 -0500326 # GM that not support tiles_rt
327 for test in ['complexclip4_bw', 'complexclip4_aa']:
328 blacklist([ 'tiles_rt-8888', 'gm', '_', test])
329
borenete2251ac2016-08-05 05:40:59 -0700330 # Extensions for RAW images
331 r = ["arw", "cr2", "dng", "nef", "nrw", "orf", "raf", "rw2", "pef", "srw",
332 "ARW", "CR2", "DNG", "NEF", "NRW", "ORF", "RAF", "RW2", "PEF", "SRW"]
333
334 # skbug.com/4888
335 # Blacklist RAW images (and a few large PNGs) on GPU bots
336 # until we can resolve failures
337 if 'GPU' in bot:
mtklein09b352f2016-09-15 06:24:03 -0700338 blacklist('_ image _ interlaced1.png')
339 blacklist('_ image _ interlaced2.png')
340 blacklist('_ image _ interlaced3.png')
borenete2251ac2016-08-05 05:40:59 -0700341 for raw_ext in r:
mtklein09b352f2016-09-15 06:24:03 -0700342 blacklist('_ image _ .%s' % raw_ext)
borenete2251ac2016-08-05 05:40:59 -0700343
borenete2251ac2016-08-05 05:40:59 -0700344 # Large image that overwhelms older Mac bots
borenet2c3112d2016-08-05 06:30:10 -0700345 if 'MacMini4.1-GPU' in bot:
mtklein09b352f2016-09-15 06:24:03 -0700346 blacklist('_ image _ abnormal.wbmp')
347 blacklist(['msaa16', 'gm', '_', 'blurcircles'])
borenete2251ac2016-08-05 05:40:59 -0700348
349 match = []
350 if 'Valgrind' in bot: # skia:3021
351 match.append('~Threaded')
352
borenete2251ac2016-08-05 05:40:59 -0700353 if 'AndroidOne' in bot: # skia:4711
borenet2c3112d2016-08-05 06:30:10 -0700354 match.append('~WritePixels')
borenete2251ac2016-08-05 05:40:59 -0700355
356 if 'NexusPlayer' in bot:
borenet2c3112d2016-08-05 06:30:10 -0700357 match.append('~ResourceCache')
borenete2251ac2016-08-05 05:40:59 -0700358
359 if 'Nexus10' in bot: # skia:5509
borenet2c3112d2016-08-05 06:30:10 -0700360 match.append('~CopySurface')
borenete2251ac2016-08-05 05:40:59 -0700361
Ben Wagnercf272b52016-12-29 14:10:04 -0500362 if 'GTX1070' in bot and 'Win' in bot: # skia:6080
363 match.append('~DeferredTextureImage')
364
borenet2c3112d2016-08-05 06:30:10 -0700365 if 'ANGLE' in bot and 'Debug' in bot:
borenete2251ac2016-08-05 05:40:59 -0700366 match.append('~GLPrograms') # skia:4717
367
368 if 'MSAN' in bot:
369 match.extend(['~Once', '~Shared']) # Not sure what's up with these tests.
370
borenet2c3112d2016-08-05 06:30:10 -0700371 if 'TSAN' in bot:
borenete2251ac2016-08-05 05:40:59 -0700372 match.extend(['~ReadWriteAlpha']) # Flaky on TSAN-covered on nvidia bots.
Mike Klein4d7bb932016-10-19 12:18:01 -0400373 match.extend(['~RGBA4444TextureTest', # Flakier than they are important.
374 '~RGB565TextureTest'])
borenete2251ac2016-08-05 05:40:59 -0700375
egdaniel15ba6d92016-09-20 12:39:29 -0700376 if 'Vulkan' in bot and 'Adreno' in bot:
377 # skia:5777
378 match.extend(['~XfermodeImageFilterCroppedInput',
379 '~GrTextureStripAtlasFlush',
380 '~CopySurface'])
381
mtklein09b352f2016-09-15 06:24:03 -0700382 if blacklisted:
borenete2251ac2016-08-05 05:40:59 -0700383 args.append('--blacklist')
mtklein09b352f2016-09-15 06:24:03 -0700384 args.extend(blacklisted)
borenete2251ac2016-08-05 05:40:59 -0700385
386 if match:
387 args.append('--match')
388 args.extend(match)
389
390 # These bots run out of memory running RAW codec tests. Do not run them in
391 # parallel
392 if ('NexusPlayer' in bot or 'Nexus5' in bot or 'Nexus9' in bot
393 or 'Win8-MSVC-ShuttleB' in bot):
394 args.append('--noRAW_threading')
395
396 return args
397
398
borenetbc20a702016-08-03 10:38:44 -0700399def key_params(api):
400 """Build a unique key from the builder name (as a list).
401
402 E.g. arch x86 gpu GeForce320M mode MacMini4.1 os Mac10.6
403 """
404 # Don't bother to include role, which is always Test.
405 # TryBots are uploaded elsewhere so they can use the same key.
406 blacklist = ['role', 'is_trybot']
407
408 flat = []
409 for k in sorted(api.vars.builder_cfg.keys()):
410 if k not in blacklist:
411 flat.append(k)
412 flat.append(api.vars.builder_cfg[k])
413 return flat
414
415
416def test_steps(api):
417 """Run the DM test."""
418 use_hash_file = False
419 if api.vars.upload_dm_results:
420 # This must run before we write anything into
421 # api.flavor.device_dirs.dm_dir or we may end up deleting our
422 # output on machines where they're the same.
423 api.flavor.create_clean_host_dir(api.vars.dm_dir)
424 host_dm_dir = str(api.vars.dm_dir)
425 device_dm_dir = str(api.flavor.device_dirs.dm_dir)
426 if host_dm_dir != device_dm_dir:
427 api.flavor.create_clean_device_dir(device_dm_dir)
428
429 # Obtain the list of already-generated hashes.
430 hash_filename = 'uninteresting_hashes.txt'
431
432 # Ensure that the tmp_dir exists.
433 api.run.run_once(api.file.makedirs,
434 'tmp_dir',
435 api.vars.tmp_dir,
436 infra_step=True)
437
438 host_hashes_file = api.vars.tmp_dir.join(hash_filename)
439 hashes_file = api.flavor.device_path_join(
440 api.flavor.device_dirs.tmp_dir, hash_filename)
441 api.run(
442 api.python.inline,
443 'get uninteresting hashes',
444 program="""
445 import contextlib
446 import math
447 import socket
448 import sys
449 import time
450 import urllib2
451
452 HASHES_URL = 'https://gold.skia.org/_/hashes'
453 RETRIES = 5
454 TIMEOUT = 60
455 WAIT_BASE = 15
456
457 socket.setdefaulttimeout(TIMEOUT)
458 for retry in range(RETRIES):
459 try:
460 with contextlib.closing(
461 urllib2.urlopen(HASHES_URL, timeout=TIMEOUT)) as w:
462 hashes = w.read()
463 with open(sys.argv[1], 'w') as f:
464 f.write(hashes)
465 break
466 except Exception as e:
467 print 'Failed to get uninteresting hashes from %s:' % HASHES_URL
468 print e
469 if retry == RETRIES:
470 raise
471 waittime = WAIT_BASE * math.pow(2, retry)
472 print 'Retry in %d seconds.' % waittime
473 time.sleep(waittime)
474 """,
475 args=[host_hashes_file],
476 cwd=api.vars.skia_dir,
477 abort_on_failure=False,
478 fail_build_on_failure=False,
479 infra_step=True)
480
481 if api.path.exists(host_hashes_file):
482 api.flavor.copy_file_to_device(host_hashes_file, hashes_file)
483 use_hash_file = True
484
485 # Run DM.
486 properties = [
487 'gitHash', api.vars.got_revision,
488 'master', api.vars.master_name,
489 'builder', api.vars.builder_name,
490 'build_number', api.vars.build_number,
491 ]
492 if api.vars.is_trybot:
493 properties.extend([
rmistry3f1c9c02016-08-24 05:07:06 -0700494 'issue', api.vars.issue,
495 'patchset', api.vars.patchset,
496 'patch_storage', api.vars.patch_storage,
borenetbc20a702016-08-03 10:38:44 -0700497 ])
borenetbfa5b452016-10-19 10:13:32 -0700498 if api.vars.no_buildbot:
499 properties.extend(['no_buildbot', 'True'])
500 properties.extend(['swarming_bot_id', api.vars.swarming_bot_id])
501 properties.extend(['swarming_task_id', api.vars.swarming_task_id])
borenetbc20a702016-08-03 10:38:44 -0700502
503 args = [
504 'dm',
505 '--undefok', # This helps branches that may not know new flags.
506 '--resourcePath', api.flavor.device_dirs.resource_dir,
507 '--skps', api.flavor.device_dirs.skp_dir,
508 '--images', api.flavor.device_path_join(
509 api.flavor.device_dirs.images_dir, 'dm'),
510 '--colorImages', api.flavor.device_path_join(
511 api.flavor.device_dirs.images_dir, 'colorspace'),
512 '--nameByHash',
513 '--properties'
514 ] + properties
515
rmistry70c43ef2016-08-12 07:25:53 -0700516 args.extend(['--svgs', api.flavor.device_dirs.svg_dir])
rmistrybcba19d2016-08-11 12:36:58 -0700517
borenetbc20a702016-08-03 10:38:44 -0700518 args.append('--key')
519 args.extend(key_params(api))
520 if use_hash_file:
521 args.extend(['--uninterestingHashesFile', hashes_file])
522 if api.vars.upload_dm_results:
523 args.extend(['--writePath', api.flavor.device_dirs.dm_dir])
524
525 skip_flag = None
526 if api.vars.builder_cfg.get('cpu_or_gpu') == 'CPU':
527 skip_flag = '--nogpu'
528 elif api.vars.builder_cfg.get('cpu_or_gpu') == 'GPU':
529 skip_flag = '--nocpu'
530 if skip_flag:
531 args.append(skip_flag)
borenete2251ac2016-08-05 05:40:59 -0700532 args.extend(dm_flags(api.vars.builder_name))
borenetbc20a702016-08-03 10:38:44 -0700533
534 api.run(api.flavor.step, 'dm', cmd=args,
borenetd460a3c2016-08-05 05:18:05 -0700535 abort_on_failure=False,
536 env=api.vars.default_env)
borenetbc20a702016-08-03 10:38:44 -0700537
538 if api.vars.upload_dm_results:
539 # Copy images and JSON to host machine if needed.
540 api.flavor.copy_directory_contents_to_host(
541 api.flavor.device_dirs.dm_dir, api.vars.dm_dir)
542
543 # See skia:2789.
544 if ('Valgrind' in api.vars.builder_name and
545 api.vars.builder_cfg.get('cpu_or_gpu') == 'GPU'):
546 abandonGpuContext = list(args)
547 abandonGpuContext.append('--abandonGpuContext')
548 api.run(api.flavor.step, 'dm --abandonGpuContext',
549 cmd=abandonGpuContext, abort_on_failure=False)
550 preAbandonGpuContext = list(args)
551 preAbandonGpuContext.append('--preAbandonGpuContext')
552 api.run(api.flavor.step, 'dm --preAbandonGpuContext',
553 cmd=preAbandonGpuContext, abort_on_failure=False,
554 env=api.vars.default_env)
555
556
borenet1ed2ae42016-07-26 11:52:17 -0700557def RunSteps(api):
borenet1436a092016-08-03 08:23:10 -0700558 api.core.setup()
mtkleindf5df812016-09-12 12:24:38 -0700559 try:
Kevin Lubickb03b5ac2016-11-14 13:42:27 -0500560 api.flavor.install_everything()
mtkleindf5df812016-09-12 12:24:38 -0700561 test_steps(api)
562 finally:
563 api.flavor.cleanup_steps()
borenet1436a092016-08-03 08:23:10 -0700564 api.run.check_failure()
borenet1ed2ae42016-07-26 11:52:17 -0700565
566
567def GenTests(api):
borenet1ed2ae42016-07-26 11:52:17 -0700568 for mastername, slaves in TEST_BUILDERS.iteritems():
569 for slavename, builders_by_slave in slaves.iteritems():
570 for builder in builders_by_slave:
571 test = (
572 api.test(builder) +
573 api.properties(buildername=builder,
574 mastername=mastername,
575 slavename=slavename,
576 buildnumber=5,
577 revision='abc123',
578 path_config='kitchen',
579 swarm_out_dir='[SWARM_OUT_DIR]') +
580 api.path.exists(
Ravi Mistry9bcca6a2016-11-21 16:06:19 -0500581 api.path['start_dir'].join('skia'),
582 api.path['start_dir'].join('skia', 'infra', 'bots', 'assets',
borenet1ed2ae42016-07-26 11:52:17 -0700583 'skimage', 'VERSION'),
Ravi Mistry9bcca6a2016-11-21 16:06:19 -0500584 api.path['start_dir'].join('skia', 'infra', 'bots', 'assets',
borenet1ed2ae42016-07-26 11:52:17 -0700585 'skp', 'VERSION'),
Ravi Mistry9bcca6a2016-11-21 16:06:19 -0500586 api.path['start_dir'].join('skia', 'infra', 'bots', 'assets',
rmistrybcba19d2016-08-11 12:36:58 -0700587 'svg', 'VERSION'),
Ravi Mistry9bcca6a2016-11-21 16:06:19 -0500588 api.path['start_dir'].join('tmp', 'uninteresting_hashes.txt')
borenet1ed2ae42016-07-26 11:52:17 -0700589 )
590 )
borenet1ed2ae42016-07-26 11:52:17 -0700591 if 'Trybot' in builder:
592 test += api.properties(issue=500,
593 patchset=1,
594 rietveld='https://codereview.chromium.org')
595 if 'Win' in builder:
596 test += api.platform('win', 64)
597
598
599 yield test
600
601 builder = 'Test-Ubuntu-GCC-GCE-CPU-AVX2-x86_64-Debug'
602 yield (
603 api.test('failed_dm') +
604 api.properties(buildername=builder,
605 mastername='client.skia',
606 slavename='skiabot-linux-swarm-000',
607 buildnumber=6,
608 revision='abc123',
609 path_config='kitchen',
610 swarm_out_dir='[SWARM_OUT_DIR]') +
611 api.path.exists(
Ravi Mistry9bcca6a2016-11-21 16:06:19 -0500612 api.path['start_dir'].join('skia'),
613 api.path['start_dir'].join('skia', 'infra', 'bots', 'assets',
borenet1ed2ae42016-07-26 11:52:17 -0700614 'skimage', 'VERSION'),
Ravi Mistry9bcca6a2016-11-21 16:06:19 -0500615 api.path['start_dir'].join('skia', 'infra', 'bots', 'assets',
borenet1ed2ae42016-07-26 11:52:17 -0700616 'skp', 'VERSION'),
Ravi Mistry9bcca6a2016-11-21 16:06:19 -0500617 api.path['start_dir'].join('skia', 'infra', 'bots', 'assets',
rmistrybcba19d2016-08-11 12:36:58 -0700618 'svg', 'VERSION'),
Ravi Mistry9bcca6a2016-11-21 16:06:19 -0500619 api.path['start_dir'].join('tmp', 'uninteresting_hashes.txt')
borenet1ed2ae42016-07-26 11:52:17 -0700620 ) +
621 api.step_data('dm', retcode=1)
622 )
623
mtklein122fac32016-09-19 07:26:41 -0700624 builder = 'Test-Android-Clang-Nexus7-GPU-Tegra3-arm-Debug-GN_Android'
borenet1ed2ae42016-07-26 11:52:17 -0700625 yield (
626 api.test('failed_get_hashes') +
627 api.properties(buildername=builder,
628 mastername='client.skia',
629 slavename='skiabot-linux-swarm-000',
630 buildnumber=6,
631 revision='abc123',
632 path_config='kitchen',
633 swarm_out_dir='[SWARM_OUT_DIR]') +
634 api.path.exists(
Ravi Mistry9bcca6a2016-11-21 16:06:19 -0500635 api.path['start_dir'].join('skia'),
636 api.path['start_dir'].join('skia', 'infra', 'bots', 'assets',
borenet1ed2ae42016-07-26 11:52:17 -0700637 'skimage', 'VERSION'),
Ravi Mistry9bcca6a2016-11-21 16:06:19 -0500638 api.path['start_dir'].join('skia', 'infra', 'bots', 'assets',
borenet1ed2ae42016-07-26 11:52:17 -0700639 'skp', 'VERSION'),
Ravi Mistry9bcca6a2016-11-21 16:06:19 -0500640 api.path['start_dir'].join('skia', 'infra', 'bots', 'assets',
rmistrybcba19d2016-08-11 12:36:58 -0700641 'svg', 'VERSION'),
Ravi Mistry9bcca6a2016-11-21 16:06:19 -0500642 api.path['start_dir'].join('tmp', 'uninteresting_hashes.txt')
borenet1ed2ae42016-07-26 11:52:17 -0700643 ) +
borenet1ed2ae42016-07-26 11:52:17 -0700644 api.step_data('get uninteresting hashes', retcode=1)
645 )
646
mtklein122fac32016-09-19 07:26:41 -0700647 builder = 'Test-iOS-Clang-iPad4-GPU-SGX554-Arm7-Debug'
borenet1ed2ae42016-07-26 11:52:17 -0700648 yield (
649 api.test('missing_SKP_VERSION_device') +
650 api.properties(buildername=builder,
651 mastername='client.skia',
652 slavename='skiabot-linux-swarm-000',
653 buildnumber=6,
654 revision='abc123',
655 path_config='kitchen',
656 swarm_out_dir='[SWARM_OUT_DIR]') +
657 api.path.exists(
Ravi Mistry9bcca6a2016-11-21 16:06:19 -0500658 api.path['start_dir'].join('skia'),
659 api.path['start_dir'].join('skia', 'infra', 'bots', 'assets',
borenet1ed2ae42016-07-26 11:52:17 -0700660 'skimage', 'VERSION'),
Ravi Mistry9bcca6a2016-11-21 16:06:19 -0500661 api.path['start_dir'].join('skia', 'infra', 'bots', 'assets',
borenet1ed2ae42016-07-26 11:52:17 -0700662 'skp', 'VERSION'),
Ravi Mistry9bcca6a2016-11-21 16:06:19 -0500663 api.path['start_dir'].join('skia', 'infra', 'bots', 'assets',
rmistrybcba19d2016-08-11 12:36:58 -0700664 'svg', 'VERSION'),
Ravi Mistry9bcca6a2016-11-21 16:06:19 -0500665 api.path['start_dir'].join('tmp', 'uninteresting_hashes.txt')
borenet1ed2ae42016-07-26 11:52:17 -0700666 ) +
mtklein122fac32016-09-19 07:26:41 -0700667 api.step_data('read SKP_VERSION', retcode=1)
borenet1ed2ae42016-07-26 11:52:17 -0700668 )
669
670 builder = 'Test-Win8-MSVC-ShuttleB-CPU-AVX2-x86_64-Release-Trybot'
671 yield (
672 api.test('big_issue_number') +
673 api.properties(buildername=builder,
674 mastername='client.skia.compile',
675 slavename='skiabot-linux-swarm-000',
676 buildnumber=5,
677 revision='abc123',
678 path_config='kitchen',
679 swarm_out_dir='[SWARM_OUT_DIR]',
680 rietveld='https://codereview.chromium.org',
681 patchset=1,
682 issue=2147533002L) +
683 api.path.exists(
Ravi Mistry9bcca6a2016-11-21 16:06:19 -0500684 api.path['start_dir'].join('skia'),
685 api.path['start_dir'].join('skia', 'infra', 'bots', 'assets',
borenet1ed2ae42016-07-26 11:52:17 -0700686 'skimage', 'VERSION'),
Ravi Mistry9bcca6a2016-11-21 16:06:19 -0500687 api.path['start_dir'].join('skia', 'infra', 'bots', 'assets',
borenet1ed2ae42016-07-26 11:52:17 -0700688 'skp', 'VERSION'),
Ravi Mistry9bcca6a2016-11-21 16:06:19 -0500689 api.path['start_dir'].join('skia', 'infra', 'bots', 'assets',
rmistrybcba19d2016-08-11 12:36:58 -0700690 'svg', 'VERSION'),
Ravi Mistry9bcca6a2016-11-21 16:06:19 -0500691 api.path['start_dir'].join('tmp', 'uninteresting_hashes.txt')
borenet1ed2ae42016-07-26 11:52:17 -0700692 ) +
693 api.platform('win', 64)
694 )
rmistry3f1c9c02016-08-24 05:07:06 -0700695
696 builder = 'Test-Ubuntu-GCC-GCE-CPU-AVX2-x86-Debug-Trybot'
rmistry3f1c9c02016-08-24 05:07:06 -0700697 yield (
698 api.test('recipe_with_gerrit_patch') +
699 api.properties(
700 buildername=builder,
701 mastername='client.skia',
702 slavename='skiabot-linux-swarm-000',
703 buildnumber=5,
704 path_config='kitchen',
705 swarm_out_dir='[SWARM_OUT_DIR]',
706 revision='abc123',
borenet96b38422016-10-27 06:35:51 -0700707 patch_storage='gerrit') +
708 api.properties.tryserver(
709 buildername=builder,
710 gerrit_project='skia',
711 gerrit_url='https://skia-review.googlesource.com/',
712 )
rmistry3f1c9c02016-08-24 05:07:06 -0700713 )
borenetbfa5b452016-10-19 10:13:32 -0700714
715 yield (
716 api.test('nobuildbot') +
717 api.properties(
718 buildername=builder,
719 mastername='client.skia',
720 slavename='skiabot-linux-swarm-000',
721 buildnumber=5,
722 path_config='kitchen',
723 swarm_out_dir='[SWARM_OUT_DIR]',
724 revision='abc123',
725 nobuildbot='True',
borenet96b38422016-10-27 06:35:51 -0700726 patch_storage='gerrit') +
727 api.properties.tryserver(
728 buildername=builder,
729 gerrit_project='skia',
730 gerrit_url='https://skia-review.googlesource.com/',
731 ) +
borenetbfa5b452016-10-19 10:13:32 -0700732 api.step_data('get swarming bot id',
733 stdout=api.raw_io.output('skia-bot-123')) +
734 api.step_data('get swarming task id', stdout=api.raw_io.output('123456'))
735 )