blob: f6ef00c999269e7dd0c4b11b10e5b5344540ff4d [file] [log] [blame]
borenet1ed2ae42016-07-26 11:52:17 -07001# Copyright 2016 The Chromium Authors. All rights reserved.
2# Use of this source code is governed by a BSD-style license that can be
3# found in the LICENSE file.
4
5
6# Recipe module for Skia Swarming test.
7
8
9DEPS = [
borenetbc20a702016-08-03 10:38:44 -070010 'build/file',
borenet1436a092016-08-03 08:23:10 -070011 'core',
borenet1ed2ae42016-07-26 11:52:17 -070012 'recipe_engine/json',
13 'recipe_engine/path',
14 'recipe_engine/platform',
15 'recipe_engine/properties',
borenetbc20a702016-08-03 10:38:44 -070016 'recipe_engine/python',
borenet1ed2ae42016-07-26 11:52:17 -070017 'recipe_engine/raw_io',
borenetbc20a702016-08-03 10:38:44 -070018 'flavor',
borenet1436a092016-08-03 08:23:10 -070019 'run',
borenetbc20a702016-08-03 10:38:44 -070020 'vars',
borenet1ed2ae42016-07-26 11:52:17 -070021]
22
23
24TEST_BUILDERS = {
25 'client.skia': {
26 'skiabot-linux-swarm-000': [
mtkleindf5df812016-09-12 12:24:38 -070027 'Test-Android-Clang-AndroidOne-CPU-MT6582-arm-Release-GN_Android',
mtklein122fac32016-09-19 07:26:41 -070028 'Test-Android-Clang-AndroidOne-GPU-Mali400MP2-arm-Release-GN_Android',
Ben Wagner52245152016-11-02 13:11:05 -040029 'Test-Android-Clang-GalaxyS7-GPU-Adreno530-arm64-Debug-GN_Android',
mtklein122fac32016-09-19 07:26:41 -070030 'Test-Android-Clang-NVIDIA_Shield-GPU-TegraX1-arm64-Debug-GN_Android',
31 'Test-Android-Clang-Nexus10-GPU-MaliT604-arm-Release-GN_Android',
32 'Test-Android-Clang-Nexus6-GPU-Adreno420-arm-Debug-GN_Android',
egdaniel15ba6d92016-09-20 12:39:29 -070033 'Test-Android-Clang-Nexus6p-GPU-Adreno430-arm64-Debug-GN_Android_Vulkan',
mtklein122fac32016-09-19 07:26:41 -070034 'Test-Android-Clang-Nexus7-GPU-Tegra3-arm-Debug-GN_Android',
mtklein122fac32016-09-19 07:26:41 -070035 'Test-Android-Clang-NexusPlayer-CPU-SSE4-x86-Release-GN_Android',
Ben Wagner25509582016-11-04 11:31:05 -040036 'Test-Android-Clang-PixelC-GPU-TegraX1-arm64-Debug-GN_Android',
borenet2c3112d2016-08-05 06:30:10 -070037 'Test-Mac-Clang-MacMini4.1-GPU-GeForce320M-x86_64-Debug',
38 'Test-Mac-Clang-MacMini6.2-CPU-AVX-x86_64-Debug',
39 'Test-Mac-Clang-MacMini6.2-GPU-HD4000-x86_64-Debug-CommandBuffer',
borenet2c3112d2016-08-05 06:30:10 -070040 'Test-Ubuntu-GCC-GCE-CPU-AVX2-x86-Debug',
borenet1ed2ae42016-07-26 11:52:17 -070041 'Test-Ubuntu-GCC-GCE-CPU-AVX2-x86_64-Debug',
mtklein2b3c2a32016-09-08 08:39:34 -070042 'Test-Ubuntu-GCC-GCE-CPU-AVX2-x86_64-Debug-ASAN',
borenet1ed2ae42016-07-26 11:52:17 -070043 'Test-Ubuntu-GCC-GCE-CPU-AVX2-x86_64-Debug-MSAN',
rmistrybcba19d2016-08-11 12:36:58 -070044 'Test-Ubuntu-GCC-GCE-CPU-AVX2-x86_64-Release-Shared',
borenet2c3112d2016-08-05 06:30:10 -070045 'Test-Ubuntu-GCC-GCE-CPU-AVX2-x86_64-Release-TSAN',
borenet1ed2ae42016-07-26 11:52:17 -070046 'Test-Ubuntu-GCC-ShuttleA-GPU-GTX550Ti-x86_64-Release-Valgrind',
borenet2c3112d2016-08-05 06:30:10 -070047 'Test-Win10-MSVC-ShuttleA-GPU-GTX660-x86_64-Debug-Vulkan',
borenet1ed2ae42016-07-26 11:52:17 -070048 'Test-Win8-MSVC-ShuttleB-CPU-AVX2-x86_64-Release-Trybot',
borenet2c3112d2016-08-05 06:30:10 -070049 'Test-Win8-MSVC-ShuttleB-GPU-GTX960-x86_64-Debug-ANGLE',
mtkleindf5df812016-09-12 12:24:38 -070050 'Test-iOS-Clang-iPad4-GPU-SGX554-Arm7-Debug',
borenet1ed2ae42016-07-26 11:52:17 -070051 ],
52 },
53}
54
55
borenete2251ac2016-08-05 05:40:59 -070056def dm_flags(bot):
57 args = []
58
59 # 32-bit desktop bots tend to run out of memory, because they have relatively
60 # far more cores than RAM (e.g. 32 cores, 3G RAM). Hold them back a bit.
61 if '-x86-' in bot and not 'NexusPlayer' in bot:
borenet2c3112d2016-08-05 06:30:10 -070062 args.extend('--threads 4'.split(' '))
borenete2251ac2016-08-05 05:40:59 -070063
64 # These are the canonical configs that we would ideally run on all bots. We
65 # may opt out or substitute some below for specific bots
Ben Wagner52245152016-11-02 13:11:05 -040066 configs = ['8888', 'gpu', 'gpudft', 'gpusrgb', 'pdf']
borenete2251ac2016-08-05 05:40:59 -070067 # Add in either msaa4 or msaa16 to the canonical set of configs to run
68 if 'Android' in bot or 'iOS' in bot:
69 configs.append('msaa4')
70 else:
71 configs.append('msaa16')
72
Ben Wagner52245152016-11-02 13:11:05 -040073 # The NP produces a long error stream when we run with MSAA. The Tegra3 just
74 # doesn't support it.
75 if ('NexusPlayer' in bot or
borenete2251ac2016-08-05 05:40:59 -070076 'Tegra3' in bot or
Ben Wagnera2225492016-11-03 09:04:31 -040077 # We aren't interested in fixing msaa bugs on iPad4.
78 'iPad4' in bot or
benjaminwagnerbc02cae2016-09-23 17:45:45 -070079 # skia:5792
80 'iHD530' in bot):
borenete2251ac2016-08-05 05:40:59 -070081 configs = [x for x in configs if 'msaa' not in x]
82
Brian Salomon42cb4902016-11-03 10:08:47 -040083 # The NP produces different images for dft on every run.
84 if 'NexusPlayer' in bot:
85 configs = [x for x in configs if 'gpudft' not in x]
86
Ben Wagner52245152016-11-02 13:11:05 -040087 # Runs out of memory on Android bots. Everyone else seems fine.
88 if 'Android' in bot:
borenete2251ac2016-08-05 05:40:59 -070089 configs.remove('pdf')
90
91 if '-GCE-' in bot:
mtklein896ddb72016-09-14 10:33:12 -070092 configs.extend(['565'])
borenete2251ac2016-08-05 05:40:59 -070093 configs.extend(['f16', 'srgb']) # Gamma-correct formats.
94 configs.extend(['sp-8888', '2ndpic-8888']) # Test niche uses of SkPicture.
mtklein03591a72016-08-07 13:35:46 -070095 configs.extend(['lite-8888']) # Experimental display list.
borenete2251ac2016-08-05 05:40:59 -070096
97 if '-TSAN' not in bot:
98 if ('TegraK1' in bot or
99 'TegraX1' in bot or
100 'GTX550Ti' in bot or
101 'GTX660' in bot or
102 'GT610' in bot):
103 if 'Android' in bot:
borenet2c3112d2016-08-05 06:30:10 -0700104 configs.append('nvprdit4')
borenete2251ac2016-08-05 05:40:59 -0700105 else:
106 configs.append('nvprdit16')
107
Ben Wagner25509582016-11-04 11:31:05 -0400108 # We want to test the OpenGL config not the GLES config on the Shield
109 if 'NVIDIA_Shield' in bot:
borenete2251ac2016-08-05 05:40:59 -0700110 configs = [x.replace('gpu', 'gl') for x in configs]
111 configs = [x.replace('msaa', 'glmsaa') for x in configs]
112 configs = [x.replace('nvpr', 'glnvpr') for x in configs]
113
114 # NP is running out of RAM when we run all these modes. skia:3255
115 if 'NexusPlayer' not in bot:
116 configs.extend(mode + '-8888' for mode in
117 ['serialize', 'tiles_rt', 'pic'])
118
borenete2251ac2016-08-05 05:40:59 -0700119 # Test instanced rendering on a limited number of platforms
borenet2c3112d2016-08-05 06:30:10 -0700120 if 'Nexus6' in bot:
borenete2251ac2016-08-05 05:40:59 -0700121 configs.append('esinst') # esinst4 isn't working yet on Adreno.
Ben Wagner25509582016-11-04 11:31:05 -0400122 elif 'NVIDIA_Shield' in bot:
borenete2251ac2016-08-05 05:40:59 -0700123 # Multisampled instanced configs use nvpr.
124 configs = [x.replace('glnvpr', 'glinst') for x in configs]
125 configs.append('glinst')
Ben Wagner25509582016-11-04 11:31:05 -0400126 elif 'PixelC' in bot:
127 # Multisampled instanced configs use nvpr.
128 configs = [x.replace('nvpr', 'esinst') for x in configs]
129 configs.append('esinst')
borenete2251ac2016-08-05 05:40:59 -0700130 elif 'MacMini6.2' in bot:
borenet2c3112d2016-08-05 06:30:10 -0700131 configs.extend(['glinst', 'glinst16'])
borenete2251ac2016-08-05 05:40:59 -0700132
133 # CommandBuffer bot *only* runs the command_buffer config.
134 if 'CommandBuffer' in bot:
borenet2c3112d2016-08-05 06:30:10 -0700135 configs = ['commandbuffer']
borenete2251ac2016-08-05 05:40:59 -0700136
Brian Salomon02906202016-10-18 13:36:32 -0400137 # ANGLE bot *only* runs the angle configs
138 if 'ANGLE' in bot:
Brian Salomon4a5e49d2016-10-20 10:14:45 -0400139 configs = ['angle_d3d11_es2',
140 'angle_d3d9_es2',
141 'angle_d3d11_es2_msaa4',
142 'angle_gl_es2']
Brian Salomon02906202016-10-18 13:36:32 -0400143
borenete2251ac2016-08-05 05:40:59 -0700144 # Vulkan bot *only* runs the vk config.
145 if 'Vulkan' in bot:
borenet2c3112d2016-08-05 06:30:10 -0700146 configs = ['vk']
borenete2251ac2016-08-05 05:40:59 -0700147
148 args.append('--config')
149 args.extend(configs)
150
151 # Run tests, gms, and image decoding tests everywhere.
rmistry70c43ef2016-08-12 07:25:53 -0700152 args.extend('--src tests gm image colorImage svg'.split(' '))
borenete2251ac2016-08-05 05:40:59 -0700153
154 if 'GalaxyS' in bot:
155 args.extend(('--threads', '0'))
156
mtklein09b352f2016-09-15 06:24:03 -0700157 blacklisted = []
158 def blacklist(quad):
159 config, src, options, name = quad.split(' ') if type(quad) is str else quad
160 if config == '_' or config in configs:
161 blacklisted.extend([config, src, options, name])
borenete2251ac2016-08-05 05:40:59 -0700162
163 # TODO: ???
mtklein09b352f2016-09-15 06:24:03 -0700164 blacklist('f16 _ _ dstreadshuffle')
165 blacklist('f16 image _ _')
166 blacklist('srgb image _ _')
167 blacklist('gpusrgb image _ _')
mtklein1bf8e6e2016-09-15 11:02:05 -0700168 blacklist('glsrgb image _ _')
borenete2251ac2016-08-05 05:40:59 -0700169
170 if 'Valgrind' in bot:
171 # These take 18+ hours to run.
mtklein09b352f2016-09-15 06:24:03 -0700172 blacklist('pdf gm _ fontmgr_iter')
173 blacklist('pdf _ _ PANO_20121023_214540.jpg')
174 blacklist('pdf skp _ worldjournal')
175 blacklist('pdf skp _ desk_baidu.skp')
176 blacklist('pdf skp _ desk_wikipedia.skp')
fmalita7de57792016-10-03 11:07:36 -0700177 blacklist('_ svg _ _')
borenete2251ac2016-08-05 05:40:59 -0700178
179 if 'iOS' in bot:
mtklein09b352f2016-09-15 06:24:03 -0700180 blacklist('gpu skp _ _')
181 blacklist('msaa skp _ _')
182 blacklist('msaa16 gm _ tilemodesProcess')
borenete2251ac2016-08-05 05:40:59 -0700183
184 if 'Mac' in bot or 'iOS' in bot:
185 # CG fails on questionable bmps
mtklein09b352f2016-09-15 06:24:03 -0700186 blacklist('_ image gen_platf rgba32abf.bmp')
187 blacklist('_ image gen_platf rgb24prof.bmp')
188 blacklist('_ image gen_platf rgb24lprof.bmp')
189 blacklist('_ image gen_platf 8bpp-pixeldata-cropped.bmp')
190 blacklist('_ image gen_platf 4bpp-pixeldata-cropped.bmp')
191 blacklist('_ image gen_platf 32bpp-pixeldata-cropped.bmp')
192 blacklist('_ image gen_platf 24bpp-pixeldata-cropped.bmp')
borenete2251ac2016-08-05 05:40:59 -0700193
194 # CG has unpredictable behavior on this questionable gif
195 # It's probably using uninitialized memory
mtklein09b352f2016-09-15 06:24:03 -0700196 blacklist('_ image gen_platf frame_larger_than_image.gif')
borenete2251ac2016-08-05 05:40:59 -0700197
msarett16b15dd2016-09-20 05:50:16 -0700198 # CG has unpredictable behavior on incomplete pngs
199 # skbug.com/5774
200 blacklist('_ image gen_platf inc0.png')
201 blacklist('_ image gen_platf inc1.png')
202 blacklist('_ image gen_platf inc2.png')
203 blacklist('_ image gen_platf inc3.png')
204 blacklist('_ image gen_platf inc4.png')
205 blacklist('_ image gen_platf inc5.png')
206 blacklist('_ image gen_platf inc6.png')
207 blacklist('_ image gen_platf inc7.png')
208 blacklist('_ image gen_platf inc8.png')
209 blacklist('_ image gen_platf inc9.png')
210 blacklist('_ image gen_platf inc10.png')
211 blacklist('_ image gen_platf inc11.png')
212 blacklist('_ image gen_platf inc12.png')
213 blacklist('_ image gen_platf inc13.png')
214 blacklist('_ image gen_platf inc14.png')
215
borenete2251ac2016-08-05 05:40:59 -0700216 # WIC fails on questionable bmps
217 if 'Win' in bot:
mtklein09b352f2016-09-15 06:24:03 -0700218 blacklist('_ image gen_platf rle8-height-negative.bmp')
219 blacklist('_ image gen_platf rle4-height-negative.bmp')
220 blacklist('_ image gen_platf pal8os2v2.bmp')
221 blacklist('_ image gen_platf pal8os2v2-16.bmp')
222 blacklist('_ image gen_platf rgba32abf.bmp')
223 blacklist('_ image gen_platf rgb24prof.bmp')
224 blacklist('_ image gen_platf rgb24lprof.bmp')
225 blacklist('_ image gen_platf 8bpp-pixeldata-cropped.bmp')
226 blacklist('_ image gen_platf 4bpp-pixeldata-cropped.bmp')
227 blacklist('_ image gen_platf 32bpp-pixeldata-cropped.bmp')
228 blacklist('_ image gen_platf 24bpp-pixeldata-cropped.bmp')
borenete2251ac2016-08-05 05:40:59 -0700229 if 'x86_64' in bot and 'CPU' in bot:
230 # This GM triggers a SkSmallAllocator assert.
mtklein09b352f2016-09-15 06:24:03 -0700231 blacklist('_ gm _ composeshader_bitmap')
borenete2251ac2016-08-05 05:40:59 -0700232
233 if 'Android' in bot or 'iOS' in bot:
234 # This test crashes the N9 (perhaps because of large malloc/frees). It also
235 # is fairly slow and not platform-specific. So we just disable it on all of
236 # Android and iOS. skia:5438
mtklein09b352f2016-09-15 06:24:03 -0700237 blacklist('_ test _ GrShape')
borenete2251ac2016-08-05 05:40:59 -0700238
239 if 'Win8' in bot:
240 # bungeman: "Doesn't work on Windows anyway, produces unstable GMs with
241 # 'Unexpected error' from DirectWrite"
mtklein09b352f2016-09-15 06:24:03 -0700242 blacklist('_ gm _ fontscalerdistortable')
fmalitab5b6de92016-08-16 07:08:48 -0700243 # skia:5636
mtklein09b352f2016-09-15 06:24:03 -0700244 blacklist('_ svg _ Nebraska-StateSeal.svg')
borenete2251ac2016-08-05 05:40:59 -0700245
246 # skia:4095
247 bad_serialize_gms = ['bleed_image',
248 'c_gms',
249 'colortype',
250 'colortype_xfermodes',
251 'drawfilter',
252 'fontmgr_bounds_0.75_0',
253 'fontmgr_bounds_1_-0.25',
254 'fontmgr_bounds',
255 'fontmgr_match',
fmalitace2fc6a2016-08-26 10:13:39 -0700256 'fontmgr_iter',
257 'imagemasksubset']
borenete2251ac2016-08-05 05:40:59 -0700258
259 # skia:5589
260 bad_serialize_gms.extend(['bitmapfilters',
261 'bitmapshaders',
262 'bleed',
263 'bleed_alpha_bmp',
264 'bleed_alpha_bmp_shader',
265 'convex_poly_clip',
266 'extractalpha',
267 'filterbitmap_checkerboard_32_32_g8',
268 'filterbitmap_image_mandrill_64',
269 'shadows',
270 'simpleaaclip_aaclip'])
271 # skia:5595
272 bad_serialize_gms.extend(['composeshader_bitmap',
273 'scaled_tilemodes_npot',
274 'scaled_tilemodes'])
liyuqianbfebe222016-11-14 11:17:16 -0800275
mtklein768dc8f2016-09-20 15:41:29 -0700276 # skia:5778
277 bad_serialize_gms.append('typefacerendering_pfaMac')
liyuqianbfebe222016-11-14 11:17:16 -0800278 # skia:5942
279 bad_serialize_gms.append('parsedpaths')
Florin Malitaca795352016-11-16 14:45:34 -0500280
281 # these use a custom image generator which doesn't serialize
282 bad_serialize_gms.append('ImageGeneratorExternal_rect')
283 bad_serialize_gms.append('ImageGeneratorExternal_shader')
284
borenete2251ac2016-08-05 05:40:59 -0700285 for test in bad_serialize_gms:
mtklein09b352f2016-09-15 06:24:03 -0700286 blacklist(['serialize-8888', 'gm', '_', test])
borenete2251ac2016-08-05 05:40:59 -0700287
288 if 'Mac' not in bot:
289 for test in ['bleed_alpha_image', 'bleed_alpha_image_shader']:
mtklein09b352f2016-09-15 06:24:03 -0700290 blacklist(['serialize-8888', 'gm', '_', test])
borenete2251ac2016-08-05 05:40:59 -0700291 # It looks like we skip these only for out-of-memory concerns.
292 if 'Win' in bot or 'Android' in bot:
293 for test in ['verylargebitmap', 'verylarge_picture_image']:
mtklein09b352f2016-09-15 06:24:03 -0700294 blacklist(['serialize-8888', 'gm', '_', test])
borenete2251ac2016-08-05 05:40:59 -0700295
296 # skia:4769
297 for test in ['drawfilter']:
mtklein09b352f2016-09-15 06:24:03 -0700298 blacklist([ 'sp-8888', 'gm', '_', test])
299 blacklist([ 'pic-8888', 'gm', '_', test])
300 blacklist(['2ndpic-8888', 'gm', '_', test])
301 blacklist([ 'lite-8888', 'gm', '_', test])
borenete2251ac2016-08-05 05:40:59 -0700302 # skia:4703
303 for test in ['image-cacherator-from-picture',
304 'image-cacherator-from-raster',
305 'image-cacherator-from-ctable']:
mtklein09b352f2016-09-15 06:24:03 -0700306 blacklist([ 'sp-8888', 'gm', '_', test])
307 blacklist([ 'pic-8888', 'gm', '_', test])
308 blacklist([ '2ndpic-8888', 'gm', '_', test])
309 blacklist(['serialize-8888', 'gm', '_', test])
borenete2251ac2016-08-05 05:40:59 -0700310
fmalitaed387722016-09-30 06:14:49 -0700311 # GM that requires raster-backed canvas
Stan Iliev5f1bb0a2016-12-12 17:39:55 -0500312 for test in ['gamut', 'complexclip4_bw', 'complexclip4_aa']:
fmalitaed387722016-09-30 06:14:49 -0700313 blacklist([ 'sp-8888', 'gm', '_', test])
314 blacklist([ 'pic-8888', 'gm', '_', test])
315 blacklist([ 'lite-8888', 'gm', '_', test])
316 blacklist([ '2ndpic-8888', 'gm', '_', test])
317 blacklist(['serialize-8888', 'gm', '_', test])
318
Stan Iliev9f8bdbb2016-12-14 17:07:37 -0500319 # GM that not support tiles_rt
320 for test in ['complexclip4_bw', 'complexclip4_aa']:
321 blacklist([ 'tiles_rt-8888', 'gm', '_', test])
322
borenete2251ac2016-08-05 05:40:59 -0700323 # Extensions for RAW images
324 r = ["arw", "cr2", "dng", "nef", "nrw", "orf", "raf", "rw2", "pef", "srw",
325 "ARW", "CR2", "DNG", "NEF", "NRW", "ORF", "RAF", "RW2", "PEF", "SRW"]
326
327 # skbug.com/4888
328 # Blacklist RAW images (and a few large PNGs) on GPU bots
329 # until we can resolve failures
330 if 'GPU' in bot:
mtklein09b352f2016-09-15 06:24:03 -0700331 blacklist('_ image _ interlaced1.png')
332 blacklist('_ image _ interlaced2.png')
333 blacklist('_ image _ interlaced3.png')
borenete2251ac2016-08-05 05:40:59 -0700334 for raw_ext in r:
mtklein09b352f2016-09-15 06:24:03 -0700335 blacklist('_ image _ .%s' % raw_ext)
borenete2251ac2016-08-05 05:40:59 -0700336
borenete2251ac2016-08-05 05:40:59 -0700337 # Large image that overwhelms older Mac bots
borenet2c3112d2016-08-05 06:30:10 -0700338 if 'MacMini4.1-GPU' in bot:
mtklein09b352f2016-09-15 06:24:03 -0700339 blacklist('_ image _ abnormal.wbmp')
340 blacklist(['msaa16', 'gm', '_', 'blurcircles'])
borenete2251ac2016-08-05 05:40:59 -0700341
342 match = []
343 if 'Valgrind' in bot: # skia:3021
344 match.append('~Threaded')
345
borenete2251ac2016-08-05 05:40:59 -0700346 if 'AndroidOne' in bot: # skia:4711
borenet2c3112d2016-08-05 06:30:10 -0700347 match.append('~WritePixels')
borenete2251ac2016-08-05 05:40:59 -0700348
349 if 'NexusPlayer' in bot:
borenet2c3112d2016-08-05 06:30:10 -0700350 match.append('~ResourceCache')
borenete2251ac2016-08-05 05:40:59 -0700351
352 if 'Nexus10' in bot: # skia:5509
borenet2c3112d2016-08-05 06:30:10 -0700353 match.append('~CopySurface')
borenete2251ac2016-08-05 05:40:59 -0700354
borenet2c3112d2016-08-05 06:30:10 -0700355 if 'ANGLE' in bot and 'Debug' in bot:
borenete2251ac2016-08-05 05:40:59 -0700356 match.append('~GLPrograms') # skia:4717
357
358 if 'MSAN' in bot:
359 match.extend(['~Once', '~Shared']) # Not sure what's up with these tests.
360
borenet2c3112d2016-08-05 06:30:10 -0700361 if 'TSAN' in bot:
borenete2251ac2016-08-05 05:40:59 -0700362 match.extend(['~ReadWriteAlpha']) # Flaky on TSAN-covered on nvidia bots.
Mike Klein4d7bb932016-10-19 12:18:01 -0400363 match.extend(['~RGBA4444TextureTest', # Flakier than they are important.
364 '~RGB565TextureTest'])
borenete2251ac2016-08-05 05:40:59 -0700365
egdaniel15ba6d92016-09-20 12:39:29 -0700366 if 'Vulkan' in bot and 'Adreno' in bot:
367 # skia:5777
368 match.extend(['~XfermodeImageFilterCroppedInput',
369 '~GrTextureStripAtlasFlush',
370 '~CopySurface'])
371
mtklein09b352f2016-09-15 06:24:03 -0700372 if blacklisted:
borenete2251ac2016-08-05 05:40:59 -0700373 args.append('--blacklist')
mtklein09b352f2016-09-15 06:24:03 -0700374 args.extend(blacklisted)
borenete2251ac2016-08-05 05:40:59 -0700375
376 if match:
377 args.append('--match')
378 args.extend(match)
379
380 # These bots run out of memory running RAW codec tests. Do not run them in
381 # parallel
382 if ('NexusPlayer' in bot or 'Nexus5' in bot or 'Nexus9' in bot
383 or 'Win8-MSVC-ShuttleB' in bot):
384 args.append('--noRAW_threading')
385
386 return args
387
388
borenetbc20a702016-08-03 10:38:44 -0700389def key_params(api):
390 """Build a unique key from the builder name (as a list).
391
392 E.g. arch x86 gpu GeForce320M mode MacMini4.1 os Mac10.6
393 """
394 # Don't bother to include role, which is always Test.
395 # TryBots are uploaded elsewhere so they can use the same key.
396 blacklist = ['role', 'is_trybot']
397
398 flat = []
399 for k in sorted(api.vars.builder_cfg.keys()):
400 if k not in blacklist:
401 flat.append(k)
402 flat.append(api.vars.builder_cfg[k])
403 return flat
404
405
406def test_steps(api):
407 """Run the DM test."""
408 use_hash_file = False
409 if api.vars.upload_dm_results:
410 # This must run before we write anything into
411 # api.flavor.device_dirs.dm_dir or we may end up deleting our
412 # output on machines where they're the same.
413 api.flavor.create_clean_host_dir(api.vars.dm_dir)
414 host_dm_dir = str(api.vars.dm_dir)
415 device_dm_dir = str(api.flavor.device_dirs.dm_dir)
416 if host_dm_dir != device_dm_dir:
417 api.flavor.create_clean_device_dir(device_dm_dir)
418
419 # Obtain the list of already-generated hashes.
420 hash_filename = 'uninteresting_hashes.txt'
421
422 # Ensure that the tmp_dir exists.
423 api.run.run_once(api.file.makedirs,
424 'tmp_dir',
425 api.vars.tmp_dir,
426 infra_step=True)
427
428 host_hashes_file = api.vars.tmp_dir.join(hash_filename)
429 hashes_file = api.flavor.device_path_join(
430 api.flavor.device_dirs.tmp_dir, hash_filename)
431 api.run(
432 api.python.inline,
433 'get uninteresting hashes',
434 program="""
435 import contextlib
436 import math
437 import socket
438 import sys
439 import time
440 import urllib2
441
442 HASHES_URL = 'https://gold.skia.org/_/hashes'
443 RETRIES = 5
444 TIMEOUT = 60
445 WAIT_BASE = 15
446
447 socket.setdefaulttimeout(TIMEOUT)
448 for retry in range(RETRIES):
449 try:
450 with contextlib.closing(
451 urllib2.urlopen(HASHES_URL, timeout=TIMEOUT)) as w:
452 hashes = w.read()
453 with open(sys.argv[1], 'w') as f:
454 f.write(hashes)
455 break
456 except Exception as e:
457 print 'Failed to get uninteresting hashes from %s:' % HASHES_URL
458 print e
459 if retry == RETRIES:
460 raise
461 waittime = WAIT_BASE * math.pow(2, retry)
462 print 'Retry in %d seconds.' % waittime
463 time.sleep(waittime)
464 """,
465 args=[host_hashes_file],
466 cwd=api.vars.skia_dir,
467 abort_on_failure=False,
468 fail_build_on_failure=False,
469 infra_step=True)
470
471 if api.path.exists(host_hashes_file):
472 api.flavor.copy_file_to_device(host_hashes_file, hashes_file)
473 use_hash_file = True
474
475 # Run DM.
476 properties = [
477 'gitHash', api.vars.got_revision,
478 'master', api.vars.master_name,
479 'builder', api.vars.builder_name,
480 'build_number', api.vars.build_number,
481 ]
482 if api.vars.is_trybot:
483 properties.extend([
rmistry3f1c9c02016-08-24 05:07:06 -0700484 'issue', api.vars.issue,
485 'patchset', api.vars.patchset,
486 'patch_storage', api.vars.patch_storage,
borenetbc20a702016-08-03 10:38:44 -0700487 ])
borenetbfa5b452016-10-19 10:13:32 -0700488 if api.vars.no_buildbot:
489 properties.extend(['no_buildbot', 'True'])
490 properties.extend(['swarming_bot_id', api.vars.swarming_bot_id])
491 properties.extend(['swarming_task_id', api.vars.swarming_task_id])
borenetbc20a702016-08-03 10:38:44 -0700492
493 args = [
494 'dm',
495 '--undefok', # This helps branches that may not know new flags.
496 '--resourcePath', api.flavor.device_dirs.resource_dir,
497 '--skps', api.flavor.device_dirs.skp_dir,
498 '--images', api.flavor.device_path_join(
499 api.flavor.device_dirs.images_dir, 'dm'),
500 '--colorImages', api.flavor.device_path_join(
501 api.flavor.device_dirs.images_dir, 'colorspace'),
502 '--nameByHash',
503 '--properties'
504 ] + properties
505
rmistry70c43ef2016-08-12 07:25:53 -0700506 args.extend(['--svgs', api.flavor.device_dirs.svg_dir])
rmistrybcba19d2016-08-11 12:36:58 -0700507
borenetbc20a702016-08-03 10:38:44 -0700508 args.append('--key')
509 args.extend(key_params(api))
510 if use_hash_file:
511 args.extend(['--uninterestingHashesFile', hashes_file])
512 if api.vars.upload_dm_results:
513 args.extend(['--writePath', api.flavor.device_dirs.dm_dir])
514
515 skip_flag = None
516 if api.vars.builder_cfg.get('cpu_or_gpu') == 'CPU':
517 skip_flag = '--nogpu'
518 elif api.vars.builder_cfg.get('cpu_or_gpu') == 'GPU':
519 skip_flag = '--nocpu'
520 if skip_flag:
521 args.append(skip_flag)
borenete2251ac2016-08-05 05:40:59 -0700522 args.extend(dm_flags(api.vars.builder_name))
borenetbc20a702016-08-03 10:38:44 -0700523
524 api.run(api.flavor.step, 'dm', cmd=args,
borenetd460a3c2016-08-05 05:18:05 -0700525 abort_on_failure=False,
526 env=api.vars.default_env)
borenetbc20a702016-08-03 10:38:44 -0700527
528 if api.vars.upload_dm_results:
529 # Copy images and JSON to host machine if needed.
530 api.flavor.copy_directory_contents_to_host(
531 api.flavor.device_dirs.dm_dir, api.vars.dm_dir)
532
533 # See skia:2789.
534 if ('Valgrind' in api.vars.builder_name and
535 api.vars.builder_cfg.get('cpu_or_gpu') == 'GPU'):
536 abandonGpuContext = list(args)
537 abandonGpuContext.append('--abandonGpuContext')
538 api.run(api.flavor.step, 'dm --abandonGpuContext',
539 cmd=abandonGpuContext, abort_on_failure=False)
540 preAbandonGpuContext = list(args)
541 preAbandonGpuContext.append('--preAbandonGpuContext')
542 api.run(api.flavor.step, 'dm --preAbandonGpuContext',
543 cmd=preAbandonGpuContext, abort_on_failure=False,
544 env=api.vars.default_env)
545
546
borenet1ed2ae42016-07-26 11:52:17 -0700547def RunSteps(api):
borenet1436a092016-08-03 08:23:10 -0700548 api.core.setup()
mtkleindf5df812016-09-12 12:24:38 -0700549 try:
Kevin Lubickb03b5ac2016-11-14 13:42:27 -0500550 api.flavor.install_everything()
mtkleindf5df812016-09-12 12:24:38 -0700551 test_steps(api)
552 finally:
553 api.flavor.cleanup_steps()
borenet1436a092016-08-03 08:23:10 -0700554 api.run.check_failure()
borenet1ed2ae42016-07-26 11:52:17 -0700555
556
557def GenTests(api):
borenet1ed2ae42016-07-26 11:52:17 -0700558 for mastername, slaves in TEST_BUILDERS.iteritems():
559 for slavename, builders_by_slave in slaves.iteritems():
560 for builder in builders_by_slave:
561 test = (
562 api.test(builder) +
563 api.properties(buildername=builder,
564 mastername=mastername,
565 slavename=slavename,
566 buildnumber=5,
567 revision='abc123',
568 path_config='kitchen',
569 swarm_out_dir='[SWARM_OUT_DIR]') +
570 api.path.exists(
Ravi Mistry9bcca6a2016-11-21 16:06:19 -0500571 api.path['start_dir'].join('skia'),
572 api.path['start_dir'].join('skia', 'infra', 'bots', 'assets',
borenet1ed2ae42016-07-26 11:52:17 -0700573 'skimage', 'VERSION'),
Ravi Mistry9bcca6a2016-11-21 16:06:19 -0500574 api.path['start_dir'].join('skia', 'infra', 'bots', 'assets',
borenet1ed2ae42016-07-26 11:52:17 -0700575 'skp', 'VERSION'),
Ravi Mistry9bcca6a2016-11-21 16:06:19 -0500576 api.path['start_dir'].join('skia', 'infra', 'bots', 'assets',
rmistrybcba19d2016-08-11 12:36:58 -0700577 'svg', 'VERSION'),
Ravi Mistry9bcca6a2016-11-21 16:06:19 -0500578 api.path['start_dir'].join('tmp', 'uninteresting_hashes.txt')
borenet1ed2ae42016-07-26 11:52:17 -0700579 )
580 )
borenet1ed2ae42016-07-26 11:52:17 -0700581 if 'Trybot' in builder:
582 test += api.properties(issue=500,
583 patchset=1,
584 rietveld='https://codereview.chromium.org')
585 if 'Win' in builder:
586 test += api.platform('win', 64)
587
588
589 yield test
590
591 builder = 'Test-Ubuntu-GCC-GCE-CPU-AVX2-x86_64-Debug'
592 yield (
593 api.test('failed_dm') +
594 api.properties(buildername=builder,
595 mastername='client.skia',
596 slavename='skiabot-linux-swarm-000',
597 buildnumber=6,
598 revision='abc123',
599 path_config='kitchen',
600 swarm_out_dir='[SWARM_OUT_DIR]') +
601 api.path.exists(
Ravi Mistry9bcca6a2016-11-21 16:06:19 -0500602 api.path['start_dir'].join('skia'),
603 api.path['start_dir'].join('skia', 'infra', 'bots', 'assets',
borenet1ed2ae42016-07-26 11:52:17 -0700604 'skimage', 'VERSION'),
Ravi Mistry9bcca6a2016-11-21 16:06:19 -0500605 api.path['start_dir'].join('skia', 'infra', 'bots', 'assets',
borenet1ed2ae42016-07-26 11:52:17 -0700606 'skp', 'VERSION'),
Ravi Mistry9bcca6a2016-11-21 16:06:19 -0500607 api.path['start_dir'].join('skia', 'infra', 'bots', 'assets',
rmistrybcba19d2016-08-11 12:36:58 -0700608 'svg', 'VERSION'),
Ravi Mistry9bcca6a2016-11-21 16:06:19 -0500609 api.path['start_dir'].join('tmp', 'uninteresting_hashes.txt')
borenet1ed2ae42016-07-26 11:52:17 -0700610 ) +
611 api.step_data('dm', retcode=1)
612 )
613
mtklein122fac32016-09-19 07:26:41 -0700614 builder = 'Test-Android-Clang-Nexus7-GPU-Tegra3-arm-Debug-GN_Android'
borenet1ed2ae42016-07-26 11:52:17 -0700615 yield (
616 api.test('failed_get_hashes') +
617 api.properties(buildername=builder,
618 mastername='client.skia',
619 slavename='skiabot-linux-swarm-000',
620 buildnumber=6,
621 revision='abc123',
622 path_config='kitchen',
623 swarm_out_dir='[SWARM_OUT_DIR]') +
624 api.path.exists(
Ravi Mistry9bcca6a2016-11-21 16:06:19 -0500625 api.path['start_dir'].join('skia'),
626 api.path['start_dir'].join('skia', 'infra', 'bots', 'assets',
borenet1ed2ae42016-07-26 11:52:17 -0700627 'skimage', 'VERSION'),
Ravi Mistry9bcca6a2016-11-21 16:06:19 -0500628 api.path['start_dir'].join('skia', 'infra', 'bots', 'assets',
borenet1ed2ae42016-07-26 11:52:17 -0700629 'skp', 'VERSION'),
Ravi Mistry9bcca6a2016-11-21 16:06:19 -0500630 api.path['start_dir'].join('skia', 'infra', 'bots', 'assets',
rmistrybcba19d2016-08-11 12:36:58 -0700631 'svg', 'VERSION'),
Ravi Mistry9bcca6a2016-11-21 16:06:19 -0500632 api.path['start_dir'].join('tmp', 'uninteresting_hashes.txt')
borenet1ed2ae42016-07-26 11:52:17 -0700633 ) +
borenet1ed2ae42016-07-26 11:52:17 -0700634 api.step_data('get uninteresting hashes', retcode=1)
635 )
636
mtklein122fac32016-09-19 07:26:41 -0700637 builder = 'Test-iOS-Clang-iPad4-GPU-SGX554-Arm7-Debug'
borenet1ed2ae42016-07-26 11:52:17 -0700638 yield (
639 api.test('missing_SKP_VERSION_device') +
640 api.properties(buildername=builder,
641 mastername='client.skia',
642 slavename='skiabot-linux-swarm-000',
643 buildnumber=6,
644 revision='abc123',
645 path_config='kitchen',
646 swarm_out_dir='[SWARM_OUT_DIR]') +
647 api.path.exists(
Ravi Mistry9bcca6a2016-11-21 16:06:19 -0500648 api.path['start_dir'].join('skia'),
649 api.path['start_dir'].join('skia', 'infra', 'bots', 'assets',
borenet1ed2ae42016-07-26 11:52:17 -0700650 'skimage', 'VERSION'),
Ravi Mistry9bcca6a2016-11-21 16:06:19 -0500651 api.path['start_dir'].join('skia', 'infra', 'bots', 'assets',
borenet1ed2ae42016-07-26 11:52:17 -0700652 'skp', 'VERSION'),
Ravi Mistry9bcca6a2016-11-21 16:06:19 -0500653 api.path['start_dir'].join('skia', 'infra', 'bots', 'assets',
rmistrybcba19d2016-08-11 12:36:58 -0700654 'svg', 'VERSION'),
Ravi Mistry9bcca6a2016-11-21 16:06:19 -0500655 api.path['start_dir'].join('tmp', 'uninteresting_hashes.txt')
borenet1ed2ae42016-07-26 11:52:17 -0700656 ) +
mtklein122fac32016-09-19 07:26:41 -0700657 api.step_data('read SKP_VERSION', retcode=1)
borenet1ed2ae42016-07-26 11:52:17 -0700658 )
659
660 builder = 'Test-Win8-MSVC-ShuttleB-CPU-AVX2-x86_64-Release-Trybot'
661 yield (
662 api.test('big_issue_number') +
663 api.properties(buildername=builder,
664 mastername='client.skia.compile',
665 slavename='skiabot-linux-swarm-000',
666 buildnumber=5,
667 revision='abc123',
668 path_config='kitchen',
669 swarm_out_dir='[SWARM_OUT_DIR]',
670 rietveld='https://codereview.chromium.org',
671 patchset=1,
672 issue=2147533002L) +
673 api.path.exists(
Ravi Mistry9bcca6a2016-11-21 16:06:19 -0500674 api.path['start_dir'].join('skia'),
675 api.path['start_dir'].join('skia', 'infra', 'bots', 'assets',
borenet1ed2ae42016-07-26 11:52:17 -0700676 'skimage', 'VERSION'),
Ravi Mistry9bcca6a2016-11-21 16:06:19 -0500677 api.path['start_dir'].join('skia', 'infra', 'bots', 'assets',
borenet1ed2ae42016-07-26 11:52:17 -0700678 'skp', 'VERSION'),
Ravi Mistry9bcca6a2016-11-21 16:06:19 -0500679 api.path['start_dir'].join('skia', 'infra', 'bots', 'assets',
rmistrybcba19d2016-08-11 12:36:58 -0700680 'svg', 'VERSION'),
Ravi Mistry9bcca6a2016-11-21 16:06:19 -0500681 api.path['start_dir'].join('tmp', 'uninteresting_hashes.txt')
borenet1ed2ae42016-07-26 11:52:17 -0700682 ) +
683 api.platform('win', 64)
684 )
rmistry3f1c9c02016-08-24 05:07:06 -0700685
686 builder = 'Test-Ubuntu-GCC-GCE-CPU-AVX2-x86-Debug-Trybot'
rmistry3f1c9c02016-08-24 05:07:06 -0700687 yield (
688 api.test('recipe_with_gerrit_patch') +
689 api.properties(
690 buildername=builder,
691 mastername='client.skia',
692 slavename='skiabot-linux-swarm-000',
693 buildnumber=5,
694 path_config='kitchen',
695 swarm_out_dir='[SWARM_OUT_DIR]',
696 revision='abc123',
borenet96b38422016-10-27 06:35:51 -0700697 patch_storage='gerrit') +
698 api.properties.tryserver(
699 buildername=builder,
700 gerrit_project='skia',
701 gerrit_url='https://skia-review.googlesource.com/',
702 )
rmistry3f1c9c02016-08-24 05:07:06 -0700703 )
borenetbfa5b452016-10-19 10:13:32 -0700704
705 yield (
706 api.test('nobuildbot') +
707 api.properties(
708 buildername=builder,
709 mastername='client.skia',
710 slavename='skiabot-linux-swarm-000',
711 buildnumber=5,
712 path_config='kitchen',
713 swarm_out_dir='[SWARM_OUT_DIR]',
714 revision='abc123',
715 nobuildbot='True',
borenet96b38422016-10-27 06:35:51 -0700716 patch_storage='gerrit') +
717 api.properties.tryserver(
718 buildername=builder,
719 gerrit_project='skia',
720 gerrit_url='https://skia-review.googlesource.com/',
721 ) +
borenetbfa5b452016-10-19 10:13:32 -0700722 api.step_data('get swarming bot id',
723 stdout=api.raw_io.output('skia-bot-123')) +
724 api.step_data('get swarming task id', stdout=api.raw_io.output('123456'))
725 )