Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(84)

Side by Side Diff: tools/dm_flags.py

Issue 2215803002: Move builder_spec, [dm|nanobench]_flags, builder_name_schema to recipes (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Add missing blacklist Created 4 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « tools/dm_flags.json ('k') | tools/nanobench_flags.json » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 #
2 # Copyright 2015 Google Inc.
3 #
4 # Use of this source code is governed by a BSD-style license that can be
5 # found in the LICENSE file.
6 #
7
8 #!/usr/bin/env python
9
10 usage = '''
11 Write extra flags to outfile for DM based on the bot name:
12 $ python dm_flags.py outfile Test-Ubuntu-GCC-GCE-CPU-AVX2-x86-Debug
13 Or run self-tests:
14 $ python dm_flags.py test
15 '''
16
17 import inspect
18 import json
19 import os
20 import sys
21
22
23 def lineno():
24 caller = inspect.stack()[1] # Up one level to our caller.
25 return inspect.getframeinfo(caller[0]).lineno
26
27
28 cov_start = lineno()+1 # We care about coverage starting just past this def.
29 def get_args(bot):
30 args = []
31
32 # 32-bit desktop bots tend to run out of memory, because they have relatively
33 # far more cores than RAM (e.g. 32 cores, 3G RAM). Hold them back a bit.
34 if '-x86-' in bot and not 'NexusPlayer' in bot:
35 args.extend('--threads 4'.split(' '))
36
37 # These are the canonical configs that we would ideally run on all bots. We
38 # may opt out or substitute some below for specific bots
39 configs = ['565', '8888', 'gpu', 'gpusrgb', 'pdf']
40 # Add in either msaa4 or msaa16 to the canonical set of configs to run
41 if 'Android' in bot or 'iOS' in bot:
42 configs.append('msaa4')
43 else:
44 configs.append('msaa16')
45
46 # With msaa, the S4 crashes and the NP produces a long error stream when we
47 # run with MSAA. The Tegra2 and Tegra3 just don't support it. No record of
48 # why we're not running msaa on iOS, probably started with gpu config and just
49 # haven't tried.
50 if ('GalaxyS4' in bot or
51 'NexusPlayer' in bot or
52 'Tegra3' in bot or
53 'iOS' in bot):
54 configs = [x for x in configs if 'msaa' not in x]
55
56 # Runs out of memory on Android bots and Daisy. Everyone else seems fine.
57 if 'Android' in bot or 'Daisy' in bot:
58 configs.remove('pdf')
59
60 if '-GCE-' in bot:
61 configs.extend(['f16', 'srgb']) # Gamma-correct formats.
62 configs.extend(['sp-8888', '2ndpic-8888']) # Test niche uses of SkPicture.
63
64 if '-TSAN' not in bot:
65 if ('TegraK1' in bot or
66 'TegraX1' in bot or
67 'GTX550Ti' in bot or
68 'GTX660' in bot or
69 'GT610' in bot):
70 if 'Android' in bot:
71 configs.append('nvprdit4')
72 else:
73 configs.append('nvprdit16')
74
75 # We want to test the OpenGL config not the GLES config on the X1
76 if 'TegraX1' in bot:
77 configs = [x.replace('gpu', 'gl') for x in configs]
78 configs = [x.replace('msaa', 'glmsaa') for x in configs]
79 configs = [x.replace('nvpr', 'glnvpr') for x in configs]
80
81 # NP is running out of RAM when we run all these modes. skia:3255
82 if 'NexusPlayer' not in bot:
83 configs.extend(mode + '-8888' for mode in
84 ['serialize', 'tiles_rt', 'pic'])
85
86 if 'ANGLE' in bot:
87 configs.append('angle')
88
89 # We want to run gpudft on atleast the mali 400
90 if 'GalaxyS3' in bot:
91 configs.append('gpudft')
92
93 # Test instanced rendering on a limited number of platforms
94 if 'Nexus6' in bot:
95 configs.append('esinst') # esinst4 isn't working yet on Adreno.
96 elif 'TegraX1' in bot:
97 # Multisampled instanced configs use nvpr.
98 configs = [x.replace('glnvpr', 'glinst') for x in configs]
99 configs.append('glinst')
100 elif 'MacMini6.2' in bot:
101 configs.extend(['glinst', 'glinst16'])
102
103 # CommandBuffer bot *only* runs the command_buffer config.
104 if 'CommandBuffer' in bot:
105 configs = ['commandbuffer']
106
107 # Vulkan bot *only* runs the vk config.
108 if 'Vulkan' in bot:
109 configs = ['vk']
110
111 args.append('--config')
112 args.extend(configs)
113
114 # Run tests, gms, and image decoding tests everywhere.
115 args.extend('--src tests gm image'.split(' '))
116
117 if 'GalaxyS' in bot:
118 args.extend(('--threads', '0'))
119
120 blacklist = []
121
122 # TODO: ???
123 blacklist.extend('f16 _ _ dstreadshuffle'.split(' '))
124 blacklist.extend('f16 image _ _'.split(' '))
125 blacklist.extend('srgb image _ _'.split(' '))
126 blacklist.extend('gpusrgb image _ _'.split(' '))
127
128 # Certain gm's on win7 gpu and pdf are never finishing and keeping the test
129 # running forever
130 if 'Win7' in bot:
131 blacklist.extend('msaa16 gm _ colorwheelnative'.split(' '))
132 blacklist.extend('pdf gm _ fontmgr_iter_factory'.split(' '))
133
134 if 'Valgrind' in bot:
135 # These take 18+ hours to run.
136 blacklist.extend('pdf gm _ fontmgr_iter'.split(' '))
137 blacklist.extend('pdf _ _ PANO_20121023_214540.jpg'.split(' '))
138 blacklist.extend('pdf skp _ worldjournal'.split(' '))
139 blacklist.extend('pdf skp _ desk_baidu.skp'.split(' '))
140 blacklist.extend('pdf skp _ desk_wikipedia.skp'.split(' '))
141
142 if 'iOS' in bot:
143 blacklist.extend('gpu skp _ _ msaa skp _ _'.split(' '))
144 blacklist.extend('msaa16 gm _ tilemodesProcess'.split(' '))
145
146 if 'Mac' in bot or 'iOS' in bot:
147 # CG fails on questionable bmps
148 blacklist.extend('_ image gen_platf rgba32abf.bmp'.split(' '))
149 blacklist.extend('_ image gen_platf rgb24prof.bmp'.split(' '))
150 blacklist.extend('_ image gen_platf rgb24lprof.bmp'.split(' '))
151 blacklist.extend('_ image gen_platf 8bpp-pixeldata-cropped.bmp'.split(' '))
152 blacklist.extend('_ image gen_platf 4bpp-pixeldata-cropped.bmp'.split(' '))
153 blacklist.extend('_ image gen_platf 32bpp-pixeldata-cropped.bmp'.split(' '))
154 blacklist.extend('_ image gen_platf 24bpp-pixeldata-cropped.bmp'.split(' '))
155
156 # CG has unpredictable behavior on this questionable gif
157 # It's probably using uninitialized memory
158 blacklist.extend('_ image gen_platf frame_larger_than_image.gif'.split(' '))
159
160 # WIC fails on questionable bmps
161 if 'Win' in bot:
162 blacklist.extend('_ image gen_platf rle8-height-negative.bmp'.split(' '))
163 blacklist.extend('_ image gen_platf rle4-height-negative.bmp'.split(' '))
164 blacklist.extend('_ image gen_platf pal8os2v2.bmp'.split(' '))
165 blacklist.extend('_ image gen_platf pal8os2v2-16.bmp'.split(' '))
166 blacklist.extend('_ image gen_platf rgba32abf.bmp'.split(' '))
167 blacklist.extend('_ image gen_platf rgb24prof.bmp'.split(' '))
168 blacklist.extend('_ image gen_platf rgb24lprof.bmp'.split(' '))
169 blacklist.extend('_ image gen_platf 8bpp-pixeldata-cropped.bmp'.split(' '))
170 blacklist.extend('_ image gen_platf 4bpp-pixeldata-cropped.bmp'.split(' '))
171 blacklist.extend('_ image gen_platf 32bpp-pixeldata-cropped.bmp'.split(' '))
172 blacklist.extend('_ image gen_platf 24bpp-pixeldata-cropped.bmp'.split(' '))
173 if 'x86_64' in bot and 'CPU' in bot:
174 # This GM triggers a SkSmallAllocator assert.
175 blacklist.extend('_ gm _ composeshader_bitmap'.split(' '))
176
177 if 'Android' in bot or 'iOS' in bot:
178 # This test crashes the N9 (perhaps because of large malloc/frees). It also
179 # is fairly slow and not platform-specific. So we just disable it on all of
180 # Android and iOS. skia:5438
181 blacklist.extend('_ test _ GrShape'.split(' '))
182
183 if 'Win8' in bot:
184 # bungeman: "Doesn't work on Windows anyway, produces unstable GMs with
185 # 'Unexpected error' from DirectWrite"
186 blacklist.extend('_ gm _ fontscalerdistortable'.split(' '))
187
188 # skia:4095
189 bad_serialize_gms = ['bleed_image',
190 'c_gms',
191 'colortype',
192 'colortype_xfermodes',
193 'drawfilter',
194 'fontmgr_bounds_0.75_0',
195 'fontmgr_bounds_1_-0.25',
196 'fontmgr_bounds',
197 'fontmgr_match',
198 'fontmgr_iter']
199 # skia:5589
200 bad_serialize_gms.extend(['bitmapfilters',
201 'bitmapshaders',
202 'bleed',
203 'bleed_alpha_bmp',
204 'bleed_alpha_bmp_shader',
205 'convex_poly_clip',
206 'extractalpha',
207 'filterbitmap_checkerboard_32_32_g8',
208 'filterbitmap_image_mandrill_64',
209 'shadows',
210 'simpleaaclip_aaclip'])
211 # skia:5595
212 bad_serialize_gms.extend(['composeshader_bitmap',
213 'scaled_tilemodes_npot',
214 'scaled_tilemodes'])
215 for test in bad_serialize_gms:
216 blacklist.extend(['serialize-8888', 'gm', '_', test])
217
218 if 'Mac' not in bot:
219 for test in ['bleed_alpha_image', 'bleed_alpha_image_shader']:
220 blacklist.extend(['serialize-8888', 'gm', '_', test])
221 # It looks like we skip these only for out-of-memory concerns.
222 if 'Win' in bot or 'Android' in bot:
223 for test in ['verylargebitmap', 'verylarge_picture_image']:
224 blacklist.extend(['serialize-8888', 'gm', '_', test])
225
226 # skia:4769
227 for test in ['drawfilter']:
228 blacklist.extend([ 'sp-8888', 'gm', '_', test])
229 blacklist.extend([ 'pic-8888', 'gm', '_', test])
230 blacklist.extend(['2ndpic-8888', 'gm', '_', test])
231 # skia:4703
232 for test in ['image-cacherator-from-picture',
233 'image-cacherator-from-raster',
234 'image-cacherator-from-ctable']:
235 blacklist.extend([ 'sp-8888', 'gm', '_', test])
236 blacklist.extend([ 'pic-8888', 'gm', '_', test])
237 blacklist.extend([ '2ndpic-8888', 'gm', '_', test])
238 blacklist.extend(['serialize-8888', 'gm', '_', test])
239
240 # Extensions for RAW images
241 r = ["arw", "cr2", "dng", "nef", "nrw", "orf", "raf", "rw2", "pef", "srw",
242 "ARW", "CR2", "DNG", "NEF", "NRW", "ORF", "RAF", "RW2", "PEF", "SRW"]
243
244 # skbug.com/4888
245 # Blacklist RAW images (and a few large PNGs) on GPU bots
246 # until we can resolve failures
247 if 'GPU' in bot:
248 blacklist.extend('_ image _ interlaced1.png'.split(' '))
249 blacklist.extend('_ image _ interlaced2.png'.split(' '))
250 blacklist.extend('_ image _ interlaced3.png'.split(' '))
251 for raw_ext in r:
252 blacklist.extend(('_ image _ .%s' % raw_ext).split(' '))
253
254 if 'Nexus9' in bot:
255 for raw_ext in r:
256 blacklist.extend(('_ image _ .%s' % raw_ext).split(' '))
257
258 # Large image that overwhelms older Mac bots
259 if 'MacMini4.1-GPU' in bot:
260 blacklist.extend('_ image _ abnormal.wbmp'.split(' '))
261 blacklist.extend(['msaa16', 'gm', '_', 'blurcircles'])
262
263 match = []
264 if 'Valgrind' in bot: # skia:3021
265 match.append('~Threaded')
266
267 if 'GalaxyS3' in bot: # skia:1699
268 match.append('~WritePixels')
269
270 if 'AndroidOne' in bot: # skia:4711
271 match.append('~WritePixels')
272
273 if 'NexusPlayer' in bot:
274 match.append('~ResourceCache')
275
276 if 'Nexus10' in bot: # skia:5509
277 match.append('~CopySurface')
278
279 if 'GalaxyS4' in bot: # skia:4079
280 match.append('~imagefiltersclipped')
281 match.append('~imagefilterscropexpand')
282 match.append('~scaled_tilemodes_npot')
283 match.append('~bleed_image') # skia:4367
284 match.append('~ReadPixels') # skia:4368
285
286 if 'ANGLE' in bot and 'Debug' in bot:
287 match.append('~GLPrograms') # skia:4717
288
289 if 'MSAN' in bot:
290 match.extend(['~Once', '~Shared']) # Not sure what's up with these tests.
291
292 if 'TSAN' in bot:
293 match.extend(['~ReadWriteAlpha']) # Flaky on TSAN-covered on nvidia bots.
294
295 if blacklist:
296 args.append('--blacklist')
297 args.extend(blacklist)
298
299 if match:
300 args.append('--match')
301 args.extend(match)
302
303 # These bots run out of memory running RAW codec tests. Do not run them in
304 # parallel
305 if ('NexusPlayer' in bot or 'Nexus5' in bot or 'Nexus9' in bot
306 or 'Win8-MSVC-ShuttleB' in bot):
307 args.append('--noRAW_threading')
308
309 return args
310 cov_end = lineno() # Don't care about code coverage past here.
311
312
313 def self_test():
314 args = {}
315 cases = [
316 'Pretend-iOS-Bot',
317 'Test-Android-GCC-AndroidOne-GPU-Mali400MP2-Arm7-Release',
318 'Test-Android-GCC-GalaxyS3-GPU-Mali400-Arm7-Debug',
319 'Test-Android-GCC-GalaxyS4-GPU-SGX544-Arm7-Release',
320 'Test-Android-GCC-Nexus6-GPU-Adreno420-Arm7-Debug',
321 'Test-Android-GCC-Nexus7-GPU-Tegra3-Arm7-Release',
322 'Test-Android-GCC-Nexus9-GPU-TegraK1-Arm64-Debug',
323 'Test-Android-GCC-Nexus10-GPU-MaliT604-Arm7-Debug',
324 'Test-Android-GCC-NexusPlayer-CPU-SSSE3-x86-Release',
325 'Test-Android-GCC-NVIDIA_Shield-GPU-TegraX1-Arm64-Release',
326 'Test-Mac-Clang-MacMini4.1-GPU-GeForce320M-x86_64-Release',
327 'Test-Mac-Clang-MacMini6.2-GPU-HD4000-x86_64-Debug-CommandBuffer',
328 'Test-Mac-Clang-MacMini6.2-GPU-HD4000-x86_64-Debug',
329 'Test-Mac10.8-Clang-MacMini4.1-CPU-SSE4-x86_64-Release',
330 'Test-Ubuntu-GCC-GCE-CPU-AVX2-x86_64-Debug-MSAN',
331 'Test-Ubuntu-GCC-GCE-CPU-AVX2-x86_64-Release-TSAN',
332 'Test-Ubuntu-GCC-GCE-CPU-AVX2-x86_64-Release-Valgrind',
333 'Test-Ubuntu-GCC-ShuttleA-GPU-GTX550Ti-x86_64-Release-Valgrind',
334 'Test-Win-MSVC-GCE-CPU-AVX2-x86_64-Debug',
335 'Test-Win10-MSVC-ShuttleA-GPU-GTX660-x86_64-Debug-Vulkan',
336 'Test-Win7-MSVC-ShuttleA-GPU-HD2000-x86-Debug-ANGLE',
337 'Test-Win8-MSVC-GCE-CPU-AVX2-x86_64-Debug',
338 ]
339 this_file = os.path.basename(__file__)
340
341 try:
342 import coverage
343 cov = coverage.coverage()
344 cov.start()
345 for case in cases:
346 args[case] = get_args(case)
347 cov.stop()
348
349 _, _, not_run, _ = cov.analysis(this_file)
350 filtered = [line for line in not_run if line > cov_start and line < cov_end]
351 if filtered:
352 print 'Lines not covered by test cases: ', filtered
353 sys.exit(1)
354 except ImportError:
355 print ("We cannot guarantee that this files tests are comprehensive " +
356 "without coverage.py. Please install it when you get a chance.")
357
358 golden = this_file.replace('.py', '.json')
359 with open(os.path.join(os.path.dirname(__file__), golden), 'w') as f:
360 json.dump(args, f, indent=2, sort_keys=True)
361
362
363 if __name__ == '__main__':
364 if len(sys.argv) == 2 and sys.argv[1] == 'test':
365 self_test()
366 sys.exit(0)
367
368 if len(sys.argv) != 3:
369 print usage
370 sys.exit(1)
371
372 with open(sys.argv[1], 'w') as out:
373 json.dump(get_args(sys.argv[2]), out)
OLDNEW
« no previous file with comments | « tools/dm_flags.json ('k') | tools/nanobench_flags.json » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698