blob: 767e38e8aeae6adf606c38df50fbbde8569d3b1c [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
borenete2251ac2016-08-05 05:40:59 -0700319 # Extensions for RAW images
320 r = ["arw", "cr2", "dng", "nef", "nrw", "orf", "raf", "rw2", "pef", "srw",
321 "ARW", "CR2", "DNG", "NEF", "NRW", "ORF", "RAF", "RW2", "PEF", "SRW"]
322
323 # skbug.com/4888
324 # Blacklist RAW images (and a few large PNGs) on GPU bots
325 # until we can resolve failures
326 if 'GPU' in bot:
mtklein09b352f2016-09-15 06:24:03 -0700327 blacklist('_ image _ interlaced1.png')
328 blacklist('_ image _ interlaced2.png')
329 blacklist('_ image _ interlaced3.png')
borenete2251ac2016-08-05 05:40:59 -0700330 for raw_ext in r:
mtklein09b352f2016-09-15 06:24:03 -0700331 blacklist('_ image _ .%s' % raw_ext)
borenete2251ac2016-08-05 05:40:59 -0700332
borenete2251ac2016-08-05 05:40:59 -0700333 # Large image that overwhelms older Mac bots
borenet2c3112d2016-08-05 06:30:10 -0700334 if 'MacMini4.1-GPU' in bot:
mtklein09b352f2016-09-15 06:24:03 -0700335 blacklist('_ image _ abnormal.wbmp')
336 blacklist(['msaa16', 'gm', '_', 'blurcircles'])
borenete2251ac2016-08-05 05:40:59 -0700337
338 match = []
339 if 'Valgrind' in bot: # skia:3021
340 match.append('~Threaded')
341
borenete2251ac2016-08-05 05:40:59 -0700342 if 'AndroidOne' in bot: # skia:4711
borenet2c3112d2016-08-05 06:30:10 -0700343 match.append('~WritePixels')
borenete2251ac2016-08-05 05:40:59 -0700344
345 if 'NexusPlayer' in bot:
borenet2c3112d2016-08-05 06:30:10 -0700346 match.append('~ResourceCache')
borenete2251ac2016-08-05 05:40:59 -0700347
348 if 'Nexus10' in bot: # skia:5509
borenet2c3112d2016-08-05 06:30:10 -0700349 match.append('~CopySurface')
borenete2251ac2016-08-05 05:40:59 -0700350
borenet2c3112d2016-08-05 06:30:10 -0700351 if 'ANGLE' in bot and 'Debug' in bot:
borenete2251ac2016-08-05 05:40:59 -0700352 match.append('~GLPrograms') # skia:4717
353
354 if 'MSAN' in bot:
355 match.extend(['~Once', '~Shared']) # Not sure what's up with these tests.
356
borenet2c3112d2016-08-05 06:30:10 -0700357 if 'TSAN' in bot:
borenete2251ac2016-08-05 05:40:59 -0700358 match.extend(['~ReadWriteAlpha']) # Flaky on TSAN-covered on nvidia bots.
Mike Klein4d7bb932016-10-19 12:18:01 -0400359 match.extend(['~RGBA4444TextureTest', # Flakier than they are important.
360 '~RGB565TextureTest'])
borenete2251ac2016-08-05 05:40:59 -0700361
egdaniel15ba6d92016-09-20 12:39:29 -0700362 if 'Vulkan' in bot and 'Adreno' in bot:
363 # skia:5777
364 match.extend(['~XfermodeImageFilterCroppedInput',
365 '~GrTextureStripAtlasFlush',
366 '~CopySurface'])
367
mtklein09b352f2016-09-15 06:24:03 -0700368 if blacklisted:
borenete2251ac2016-08-05 05:40:59 -0700369 args.append('--blacklist')
mtklein09b352f2016-09-15 06:24:03 -0700370 args.extend(blacklisted)
borenete2251ac2016-08-05 05:40:59 -0700371
372 if match:
373 args.append('--match')
374 args.extend(match)
375
376 # These bots run out of memory running RAW codec tests. Do not run them in
377 # parallel
378 if ('NexusPlayer' in bot or 'Nexus5' in bot or 'Nexus9' in bot
379 or 'Win8-MSVC-ShuttleB' in bot):
380 args.append('--noRAW_threading')
381
382 return args
383
384
borenetbc20a702016-08-03 10:38:44 -0700385def key_params(api):
386 """Build a unique key from the builder name (as a list).
387
388 E.g. arch x86 gpu GeForce320M mode MacMini4.1 os Mac10.6
389 """
390 # Don't bother to include role, which is always Test.
391 # TryBots are uploaded elsewhere so they can use the same key.
392 blacklist = ['role', 'is_trybot']
393
394 flat = []
395 for k in sorted(api.vars.builder_cfg.keys()):
396 if k not in blacklist:
397 flat.append(k)
398 flat.append(api.vars.builder_cfg[k])
399 return flat
400
401
402def test_steps(api):
403 """Run the DM test."""
404 use_hash_file = False
405 if api.vars.upload_dm_results:
406 # This must run before we write anything into
407 # api.flavor.device_dirs.dm_dir or we may end up deleting our
408 # output on machines where they're the same.
409 api.flavor.create_clean_host_dir(api.vars.dm_dir)
410 host_dm_dir = str(api.vars.dm_dir)
411 device_dm_dir = str(api.flavor.device_dirs.dm_dir)
412 if host_dm_dir != device_dm_dir:
413 api.flavor.create_clean_device_dir(device_dm_dir)
414
415 # Obtain the list of already-generated hashes.
416 hash_filename = 'uninteresting_hashes.txt'
417
418 # Ensure that the tmp_dir exists.
419 api.run.run_once(api.file.makedirs,
420 'tmp_dir',
421 api.vars.tmp_dir,
422 infra_step=True)
423
424 host_hashes_file = api.vars.tmp_dir.join(hash_filename)
425 hashes_file = api.flavor.device_path_join(
426 api.flavor.device_dirs.tmp_dir, hash_filename)
427 api.run(
428 api.python.inline,
429 'get uninteresting hashes',
430 program="""
431 import contextlib
432 import math
433 import socket
434 import sys
435 import time
436 import urllib2
437
438 HASHES_URL = 'https://gold.skia.org/_/hashes'
439 RETRIES = 5
440 TIMEOUT = 60
441 WAIT_BASE = 15
442
443 socket.setdefaulttimeout(TIMEOUT)
444 for retry in range(RETRIES):
445 try:
446 with contextlib.closing(
447 urllib2.urlopen(HASHES_URL, timeout=TIMEOUT)) as w:
448 hashes = w.read()
449 with open(sys.argv[1], 'w') as f:
450 f.write(hashes)
451 break
452 except Exception as e:
453 print 'Failed to get uninteresting hashes from %s:' % HASHES_URL
454 print e
455 if retry == RETRIES:
456 raise
457 waittime = WAIT_BASE * math.pow(2, retry)
458 print 'Retry in %d seconds.' % waittime
459 time.sleep(waittime)
460 """,
461 args=[host_hashes_file],
462 cwd=api.vars.skia_dir,
463 abort_on_failure=False,
464 fail_build_on_failure=False,
465 infra_step=True)
466
467 if api.path.exists(host_hashes_file):
468 api.flavor.copy_file_to_device(host_hashes_file, hashes_file)
469 use_hash_file = True
470
471 # Run DM.
472 properties = [
473 'gitHash', api.vars.got_revision,
474 'master', api.vars.master_name,
475 'builder', api.vars.builder_name,
476 'build_number', api.vars.build_number,
477 ]
478 if api.vars.is_trybot:
479 properties.extend([
rmistry3f1c9c02016-08-24 05:07:06 -0700480 'issue', api.vars.issue,
481 'patchset', api.vars.patchset,
482 'patch_storage', api.vars.patch_storage,
borenetbc20a702016-08-03 10:38:44 -0700483 ])
borenetbfa5b452016-10-19 10:13:32 -0700484 if api.vars.no_buildbot:
485 properties.extend(['no_buildbot', 'True'])
486 properties.extend(['swarming_bot_id', api.vars.swarming_bot_id])
487 properties.extend(['swarming_task_id', api.vars.swarming_task_id])
borenetbc20a702016-08-03 10:38:44 -0700488
489 args = [
490 'dm',
491 '--undefok', # This helps branches that may not know new flags.
492 '--resourcePath', api.flavor.device_dirs.resource_dir,
493 '--skps', api.flavor.device_dirs.skp_dir,
494 '--images', api.flavor.device_path_join(
495 api.flavor.device_dirs.images_dir, 'dm'),
496 '--colorImages', api.flavor.device_path_join(
497 api.flavor.device_dirs.images_dir, 'colorspace'),
498 '--nameByHash',
499 '--properties'
500 ] + properties
501
rmistry70c43ef2016-08-12 07:25:53 -0700502 args.extend(['--svgs', api.flavor.device_dirs.svg_dir])
rmistrybcba19d2016-08-11 12:36:58 -0700503
borenetbc20a702016-08-03 10:38:44 -0700504 args.append('--key')
505 args.extend(key_params(api))
506 if use_hash_file:
507 args.extend(['--uninterestingHashesFile', hashes_file])
508 if api.vars.upload_dm_results:
509 args.extend(['--writePath', api.flavor.device_dirs.dm_dir])
510
511 skip_flag = None
512 if api.vars.builder_cfg.get('cpu_or_gpu') == 'CPU':
513 skip_flag = '--nogpu'
514 elif api.vars.builder_cfg.get('cpu_or_gpu') == 'GPU':
515 skip_flag = '--nocpu'
516 if skip_flag:
517 args.append(skip_flag)
borenete2251ac2016-08-05 05:40:59 -0700518 args.extend(dm_flags(api.vars.builder_name))
borenetbc20a702016-08-03 10:38:44 -0700519
520 api.run(api.flavor.step, 'dm', cmd=args,
borenetd460a3c2016-08-05 05:18:05 -0700521 abort_on_failure=False,
522 env=api.vars.default_env)
borenetbc20a702016-08-03 10:38:44 -0700523
524 if api.vars.upload_dm_results:
525 # Copy images and JSON to host machine if needed.
526 api.flavor.copy_directory_contents_to_host(
527 api.flavor.device_dirs.dm_dir, api.vars.dm_dir)
528
529 # See skia:2789.
530 if ('Valgrind' in api.vars.builder_name and
531 api.vars.builder_cfg.get('cpu_or_gpu') == 'GPU'):
532 abandonGpuContext = list(args)
533 abandonGpuContext.append('--abandonGpuContext')
534 api.run(api.flavor.step, 'dm --abandonGpuContext',
535 cmd=abandonGpuContext, abort_on_failure=False)
536 preAbandonGpuContext = list(args)
537 preAbandonGpuContext.append('--preAbandonGpuContext')
538 api.run(api.flavor.step, 'dm --preAbandonGpuContext',
539 cmd=preAbandonGpuContext, abort_on_failure=False,
540 env=api.vars.default_env)
541
542
borenet1ed2ae42016-07-26 11:52:17 -0700543def RunSteps(api):
borenet1436a092016-08-03 08:23:10 -0700544 api.core.setup()
mtkleindf5df812016-09-12 12:24:38 -0700545 try:
Kevin Lubickb03b5ac2016-11-14 13:42:27 -0500546 api.flavor.install_everything()
mtkleindf5df812016-09-12 12:24:38 -0700547 test_steps(api)
548 finally:
549 api.flavor.cleanup_steps()
borenet1436a092016-08-03 08:23:10 -0700550 api.run.check_failure()
borenet1ed2ae42016-07-26 11:52:17 -0700551
552
553def GenTests(api):
borenet1ed2ae42016-07-26 11:52:17 -0700554 for mastername, slaves in TEST_BUILDERS.iteritems():
555 for slavename, builders_by_slave in slaves.iteritems():
556 for builder in builders_by_slave:
557 test = (
558 api.test(builder) +
559 api.properties(buildername=builder,
560 mastername=mastername,
561 slavename=slavename,
562 buildnumber=5,
563 revision='abc123',
564 path_config='kitchen',
565 swarm_out_dir='[SWARM_OUT_DIR]') +
566 api.path.exists(
Ravi Mistry9bcca6a2016-11-21 16:06:19 -0500567 api.path['start_dir'].join('skia'),
568 api.path['start_dir'].join('skia', 'infra', 'bots', 'assets',
borenet1ed2ae42016-07-26 11:52:17 -0700569 'skimage', 'VERSION'),
Ravi Mistry9bcca6a2016-11-21 16:06:19 -0500570 api.path['start_dir'].join('skia', 'infra', 'bots', 'assets',
borenet1ed2ae42016-07-26 11:52:17 -0700571 'skp', 'VERSION'),
Ravi Mistry9bcca6a2016-11-21 16:06:19 -0500572 api.path['start_dir'].join('skia', 'infra', 'bots', 'assets',
rmistrybcba19d2016-08-11 12:36:58 -0700573 'svg', 'VERSION'),
Ravi Mistry9bcca6a2016-11-21 16:06:19 -0500574 api.path['start_dir'].join('tmp', 'uninteresting_hashes.txt')
borenet1ed2ae42016-07-26 11:52:17 -0700575 )
576 )
borenet1ed2ae42016-07-26 11:52:17 -0700577 if 'Trybot' in builder:
578 test += api.properties(issue=500,
579 patchset=1,
580 rietveld='https://codereview.chromium.org')
581 if 'Win' in builder:
582 test += api.platform('win', 64)
583
584
585 yield test
586
587 builder = 'Test-Ubuntu-GCC-GCE-CPU-AVX2-x86_64-Debug'
588 yield (
589 api.test('failed_dm') +
590 api.properties(buildername=builder,
591 mastername='client.skia',
592 slavename='skiabot-linux-swarm-000',
593 buildnumber=6,
594 revision='abc123',
595 path_config='kitchen',
596 swarm_out_dir='[SWARM_OUT_DIR]') +
597 api.path.exists(
Ravi Mistry9bcca6a2016-11-21 16:06:19 -0500598 api.path['start_dir'].join('skia'),
599 api.path['start_dir'].join('skia', 'infra', 'bots', 'assets',
borenet1ed2ae42016-07-26 11:52:17 -0700600 'skimage', 'VERSION'),
Ravi Mistry9bcca6a2016-11-21 16:06:19 -0500601 api.path['start_dir'].join('skia', 'infra', 'bots', 'assets',
borenet1ed2ae42016-07-26 11:52:17 -0700602 'skp', 'VERSION'),
Ravi Mistry9bcca6a2016-11-21 16:06:19 -0500603 api.path['start_dir'].join('skia', 'infra', 'bots', 'assets',
rmistrybcba19d2016-08-11 12:36:58 -0700604 'svg', 'VERSION'),
Ravi Mistry9bcca6a2016-11-21 16:06:19 -0500605 api.path['start_dir'].join('tmp', 'uninteresting_hashes.txt')
borenet1ed2ae42016-07-26 11:52:17 -0700606 ) +
607 api.step_data('dm', retcode=1)
608 )
609
mtklein122fac32016-09-19 07:26:41 -0700610 builder = 'Test-Android-Clang-Nexus7-GPU-Tegra3-arm-Debug-GN_Android'
borenet1ed2ae42016-07-26 11:52:17 -0700611 yield (
612 api.test('failed_get_hashes') +
613 api.properties(buildername=builder,
614 mastername='client.skia',
615 slavename='skiabot-linux-swarm-000',
616 buildnumber=6,
617 revision='abc123',
618 path_config='kitchen',
619 swarm_out_dir='[SWARM_OUT_DIR]') +
620 api.path.exists(
Ravi Mistry9bcca6a2016-11-21 16:06:19 -0500621 api.path['start_dir'].join('skia'),
622 api.path['start_dir'].join('skia', 'infra', 'bots', 'assets',
borenet1ed2ae42016-07-26 11:52:17 -0700623 'skimage', 'VERSION'),
Ravi Mistry9bcca6a2016-11-21 16:06:19 -0500624 api.path['start_dir'].join('skia', 'infra', 'bots', 'assets',
borenet1ed2ae42016-07-26 11:52:17 -0700625 'skp', 'VERSION'),
Ravi Mistry9bcca6a2016-11-21 16:06:19 -0500626 api.path['start_dir'].join('skia', 'infra', 'bots', 'assets',
rmistrybcba19d2016-08-11 12:36:58 -0700627 'svg', 'VERSION'),
Ravi Mistry9bcca6a2016-11-21 16:06:19 -0500628 api.path['start_dir'].join('tmp', 'uninteresting_hashes.txt')
borenet1ed2ae42016-07-26 11:52:17 -0700629 ) +
borenet1ed2ae42016-07-26 11:52:17 -0700630 api.step_data('get uninteresting hashes', retcode=1)
631 )
632
mtklein122fac32016-09-19 07:26:41 -0700633 builder = 'Test-iOS-Clang-iPad4-GPU-SGX554-Arm7-Debug'
borenet1ed2ae42016-07-26 11:52:17 -0700634 yield (
635 api.test('missing_SKP_VERSION_device') +
636 api.properties(buildername=builder,
637 mastername='client.skia',
638 slavename='skiabot-linux-swarm-000',
639 buildnumber=6,
640 revision='abc123',
641 path_config='kitchen',
642 swarm_out_dir='[SWARM_OUT_DIR]') +
643 api.path.exists(
Ravi Mistry9bcca6a2016-11-21 16:06:19 -0500644 api.path['start_dir'].join('skia'),
645 api.path['start_dir'].join('skia', 'infra', 'bots', 'assets',
borenet1ed2ae42016-07-26 11:52:17 -0700646 'skimage', 'VERSION'),
Ravi Mistry9bcca6a2016-11-21 16:06:19 -0500647 api.path['start_dir'].join('skia', 'infra', 'bots', 'assets',
borenet1ed2ae42016-07-26 11:52:17 -0700648 'skp', 'VERSION'),
Ravi Mistry9bcca6a2016-11-21 16:06:19 -0500649 api.path['start_dir'].join('skia', 'infra', 'bots', 'assets',
rmistrybcba19d2016-08-11 12:36:58 -0700650 'svg', 'VERSION'),
Ravi Mistry9bcca6a2016-11-21 16:06:19 -0500651 api.path['start_dir'].join('tmp', 'uninteresting_hashes.txt')
borenet1ed2ae42016-07-26 11:52:17 -0700652 ) +
mtklein122fac32016-09-19 07:26:41 -0700653 api.step_data('read SKP_VERSION', retcode=1)
borenet1ed2ae42016-07-26 11:52:17 -0700654 )
655
656 builder = 'Test-Win8-MSVC-ShuttleB-CPU-AVX2-x86_64-Release-Trybot'
657 yield (
658 api.test('big_issue_number') +
659 api.properties(buildername=builder,
660 mastername='client.skia.compile',
661 slavename='skiabot-linux-swarm-000',
662 buildnumber=5,
663 revision='abc123',
664 path_config='kitchen',
665 swarm_out_dir='[SWARM_OUT_DIR]',
666 rietveld='https://codereview.chromium.org',
667 patchset=1,
668 issue=2147533002L) +
669 api.path.exists(
Ravi Mistry9bcca6a2016-11-21 16:06:19 -0500670 api.path['start_dir'].join('skia'),
671 api.path['start_dir'].join('skia', 'infra', 'bots', 'assets',
borenet1ed2ae42016-07-26 11:52:17 -0700672 'skimage', 'VERSION'),
Ravi Mistry9bcca6a2016-11-21 16:06:19 -0500673 api.path['start_dir'].join('skia', 'infra', 'bots', 'assets',
borenet1ed2ae42016-07-26 11:52:17 -0700674 'skp', 'VERSION'),
Ravi Mistry9bcca6a2016-11-21 16:06:19 -0500675 api.path['start_dir'].join('skia', 'infra', 'bots', 'assets',
rmistrybcba19d2016-08-11 12:36:58 -0700676 'svg', 'VERSION'),
Ravi Mistry9bcca6a2016-11-21 16:06:19 -0500677 api.path['start_dir'].join('tmp', 'uninteresting_hashes.txt')
borenet1ed2ae42016-07-26 11:52:17 -0700678 ) +
679 api.platform('win', 64)
680 )
rmistry3f1c9c02016-08-24 05:07:06 -0700681
682 builder = 'Test-Ubuntu-GCC-GCE-CPU-AVX2-x86-Debug-Trybot'
rmistry3f1c9c02016-08-24 05:07:06 -0700683 yield (
684 api.test('recipe_with_gerrit_patch') +
685 api.properties(
686 buildername=builder,
687 mastername='client.skia',
688 slavename='skiabot-linux-swarm-000',
689 buildnumber=5,
690 path_config='kitchen',
691 swarm_out_dir='[SWARM_OUT_DIR]',
692 revision='abc123',
borenet96b38422016-10-27 06:35:51 -0700693 patch_storage='gerrit') +
694 api.properties.tryserver(
695 buildername=builder,
696 gerrit_project='skia',
697 gerrit_url='https://skia-review.googlesource.com/',
698 )
rmistry3f1c9c02016-08-24 05:07:06 -0700699 )
borenetbfa5b452016-10-19 10:13:32 -0700700
701 yield (
702 api.test('nobuildbot') +
703 api.properties(
704 buildername=builder,
705 mastername='client.skia',
706 slavename='skiabot-linux-swarm-000',
707 buildnumber=5,
708 path_config='kitchen',
709 swarm_out_dir='[SWARM_OUT_DIR]',
710 revision='abc123',
711 nobuildbot='True',
borenet96b38422016-10-27 06:35:51 -0700712 patch_storage='gerrit') +
713 api.properties.tryserver(
714 buildername=builder,
715 gerrit_project='skia',
716 gerrit_url='https://skia-review.googlesource.com/',
717 ) +
borenetbfa5b452016-10-19 10:13:32 -0700718 api.step_data('get swarming bot id',
719 stdout=api.raw_io.output('skia-bot-123')) +
720 api.step_data('get swarming task id', stdout=api.raw_io.output('123456'))
721 )