blob: 2befd138b10283138dacc0002c51dac41948dca6 [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 perf.
7
8
Eric Boren4c7754c2017-04-10 08:19:10 -04009import calendar
Kevin Lubick587afc92017-10-12 12:21:47 -040010import os
Eric Boren4c7754c2017-04-10 08:19:10 -040011
12
borenet1ed2ae42016-07-26 11:52:17 -070013DEPS = [
Eric Boren896af752017-04-24 13:22:56 -040014 'env',
15 'flavor',
Robert Iannucci8cd50412017-07-07 14:36:58 -070016 'recipe_engine/file',
Eric Boren4c7754c2017-04-10 08:19:10 -040017 'recipe_engine/json',
borenet1ed2ae42016-07-26 11:52:17 -070018 'recipe_engine/path',
19 'recipe_engine/platform',
20 'recipe_engine/properties',
21 'recipe_engine/raw_io',
Eric Boren4c7754c2017-04-10 08:19:10 -040022 'recipe_engine/step',
23 'recipe_engine/time',
24 'run',
Eric Boren4c7754c2017-04-10 08:19:10 -040025 'vars',
borenet1ed2ae42016-07-26 11:52:17 -070026]
27
28
Eric Boren72f66682018-05-18 07:36:55 -040029def upload_perf_results(buildername):
30 if 'Release' not in buildername:
31 return False
32 skip_upload_bots = [
33 'ASAN',
34 'Coverage',
35 'MSAN',
36 'TSAN',
37 'UBSAN',
38 'Valgrind',
39 ]
40 for s in skip_upload_bots:
41 if s in buildername:
42 return False
43 return True
44
45
Eric Boren89cd3572017-06-28 13:50:22 -040046def nanobench_flags(api, bot):
Eric Boren4c7754c2017-04-10 08:19:10 -040047 args = ['--pre_log']
48
49 if 'GPU' in bot:
50 args.append('--images')
51 args.extend(['--gpuStatsDump', 'true'])
52
Eric Boren4c7754c2017-04-10 08:19:10 -040053 args.extend(['--scales', '1.0', '1.1'])
54
55 if 'iOS' in bot:
56 args.extend(['--skps', 'ignore_skps'])
57
Ben Wagner32fa5102017-08-10 21:25:55 -040058 configs = []
59 if api.vars.builder_cfg.get('cpu_or_gpu') == 'CPU':
60 args.append('--nogpu')
61 configs.extend(['8888', 'nonrendering'])
Eric Boren4c7754c2017-04-10 08:19:10 -040062
Ben Wagner32fa5102017-08-10 21:25:55 -040063 if '-GCE-' in bot:
Mike Klein0e4041f2018-06-19 16:00:40 -040064 configs += [
65 'f16',
66 'srgb',
67 'esrgb',
68 'narrow',
69 'enarrow',
70 ]
Eric Boren4c7754c2017-04-10 08:19:10 -040071
Ben Wagner32fa5102017-08-10 21:25:55 -040072 elif api.vars.builder_cfg.get('cpu_or_gpu') == 'GPU':
73 args.append('--nocpu')
74
75 gl_prefix = 'gl'
76 sample_count = '8'
77 if 'Android' in bot or 'iOS' in bot:
78 sample_count = '4'
79 # The NVIDIA_Shield has a regular OpenGL implementation. We bench that
80 # instead of ES.
81 if 'NVIDIA_Shield' not in bot:
82 gl_prefix = 'gles'
83 # The NP produces a long error stream when we run with MSAA.
84 # iOS crashes (skia:6399)
85 # Nexus7 (Tegra3) does not support MSAA.
86 if ('NexusPlayer' in bot or
87 'iOS' in bot or
88 'Nexus7' in bot):
89 sample_count = ''
90 elif 'Intel' in bot:
Eric Boren4c7754c2017-04-10 08:19:10 -040091 sample_count = ''
Ben Wagner32fa5102017-08-10 21:25:55 -040092 elif 'ChromeOS' in bot:
93 gl_prefix = 'gles'
Eric Boren4c7754c2017-04-10 08:19:10 -040094
Brian Osman2a284de2018-06-20 20:59:06 +000095 configs.extend([gl_prefix, gl_prefix + 'srgb'])
Eric Boren4c7754c2017-04-10 08:19:10 -040096 if sample_count is not '':
Ben Wagner32fa5102017-08-10 21:25:55 -040097 configs.append(gl_prefix + 'msaa' + sample_count)
98 if ('TegraX1' in bot or
99 'Quadro' in bot or
100 'GTX' in bot or
101 ('GT610' in bot and 'Ubuntu17' not in bot)):
Robert Phillips0b33cc42018-02-08 08:29:21 -0500102 configs.extend([gl_prefix + 'nvpr' + sample_count])
Eric Boren4c7754c2017-04-10 08:19:10 -0400103
Ben Wagner32fa5102017-08-10 21:25:55 -0400104 # We want to test both the OpenGL config and the GLES config on Linux Intel:
105 # GL is used by Chrome, GLES is used by ChromeOS.
106 if 'Intel' in bot and api.vars.is_linux:
Brian Osman2a284de2018-06-20 20:59:06 +0000107 configs.extend(['gles', 'glessrgb'])
108
109 # The following devices do not support glessrgb.
110 if 'glessrgb' in configs:
111 if ('IntelHD405' in bot or
112 'IntelIris640' in bot or
113 'IntelBayTrail' in bot or
114 'IntelHD2000' in bot or
115 'AndroidOne' in bot or
116 'Nexus7' in bot or
117 'NexusPlayer' in bot):
118 configs.remove('glessrgb')
Ben Wagner32fa5102017-08-10 21:25:55 -0400119
Ben Wagner32fa5102017-08-10 21:25:55 -0400120 if 'CommandBuffer' in bot:
121 configs = ['commandbuffer']
122 if 'Vulkan' in bot:
Chris Daltonaec79e62018-05-29 12:02:19 -0600123 configs = ['vk']
Ben Wagner32fa5102017-08-10 21:25:55 -0400124
125 if 'ANGLE' in bot:
126 # Test only ANGLE configs.
127 configs = ['angle_d3d11_es2']
128 if sample_count is not '':
129 configs.append('angle_d3d11_es2_msaa' + sample_count)
Ben Wagner7464a262018-04-19 15:49:18 -0400130 if 'QuadroP400' in bot:
131 # See skia:7823 and chromium:693090.
132 configs.append('angle_gl_es2')
133 if sample_count is not '':
134 configs.append('angle_gl_es2_msaa' + sample_count)
Ben Wagner32fa5102017-08-10 21:25:55 -0400135
136 if 'ChromeOS' in bot:
137 # Just run GLES for now - maybe add gles_msaa4 in the future
138 configs = ['gles']
Eric Boren4c7754c2017-04-10 08:19:10 -0400139
140 args.append('--config')
141 args.extend(configs)
142
Ben Wagner6f96c022018-06-21 12:12:01 -0400143 # By default, we test with GPU threading enabled, unless specifically
144 # disabled.
145 if 'NoGPUThreads' in bot:
146 args.extend(['--gpuThreads', '0'])
147
Eric Boren4c7754c2017-04-10 08:19:10 -0400148 if 'Valgrind' in bot:
149 # Don't care about Valgrind performance.
150 args.extend(['--loops', '1'])
151 args.extend(['--samples', '1'])
152 # Ensure that the bot framework does not think we have timed out.
153 args.extend(['--keepAlive', 'true'])
154
Ben Wagner47ac0242017-06-27 13:44:36 -0400155 # Some people don't like verbose output.
156 verbose = False
157
Eric Boren4c7754c2017-04-10 08:19:10 -0400158 match = []
159 if 'Android' in bot:
160 # Segfaults when run as GPU bench. Very large texture?
161 match.append('~blurroundrect')
162 match.append('~patch_grid') # skia:2847
163 match.append('~desk_carsvg')
Eric Boren4c7754c2017-04-10 08:19:10 -0400164 if 'Nexus5' in bot:
165 match.append('~keymobi_shop_mobileweb_ebay_com.skp') # skia:5178
166 if 'iOS' in bot:
167 match.append('~blurroundrect')
168 match.append('~patch_grid') # skia:2847
169 match.append('~desk_carsvg')
170 match.append('~keymobi')
171 match.append('~path_hairline')
172 match.append('~GLInstancedArraysBench') # skia:4714
173 if 'IntelIris540' in bot and 'ANGLE' in bot:
174 match.append('~tile_image_filter_tiled_64') # skia:6082
Ben Wagner22195442017-11-30 15:34:24 -0500175 if 'Vulkan' in bot and 'IntelIris540' in bot and 'Win' in bot:
Eric Boren4c7754c2017-04-10 08:19:10 -0400176 # skia:6398
177 match.append('~GM_varied_text_clipped_lcd')
178 match.append('~GM_varied_text_ignorable_clip_lcd')
Mike Reed1d2678f2017-07-05 13:10:42 -0400179 match.append('~blendmode_mask_DstATop')
180 match.append('~blendmode_mask_SrcIn')
181 match.append('~blendmode_mask_SrcOut')
182 match.append('~blendmode_mask_Src')
Eric Boren4c7754c2017-04-10 08:19:10 -0400183 match.append('~fontscaler_lcd')
184 match.append('~rotated_rects_aa_alternating_transparent_and_opaque_src')
185 match.append('~rotated_rects_aa_changing_transparent_src')
186 match.append('~rotated_rects_aa_same_transparent_src')
187 match.append('~shadermask_LCD_FF')
188 match.append('~srcmode_rects_1')
189 match.append('~text_16_LCD_88')
190 match.append('~text_16_LCD_BK')
191 match.append('~text_16_LCD_FF')
192 match.append('~text_16_LCD_WT')
Greg Daniel139eb802017-07-19 10:12:49 -0400193 # skia:6863
194 match.append('~desk_skbug6850overlay2')
Greg Daniele0996532017-08-07 14:56:26 -0400195 match.append('~desk_googlespreadsheet')
Greg Daniela6717ce2018-01-29 10:04:41 -0500196 match.append('~desk_carsvg')
Ben Wagnera7f32052018-03-01 15:25:16 -0500197 if ('Vulkan' in bot and ('RadeonR9M470X' in bot or 'RadeonHD7770' in bot) and
198 'Win' in bot):
Ben Wagner84447e02018-02-28 15:51:30 -0500199 # skia:7677
200 match.append('~path_text_clipped_uncached')
Chris Dalton2b937f52018-05-17 10:17:10 -0600201 if 'MoltenVK' in bot:
202 # skbug.com/7962
203 match.append('~^path_text_clipped_uncached$')
204 match.append('~^path_text_uncached$')
Eric Boren89cd3572017-06-28 13:50:22 -0400205 if ('Intel' in bot and api.vars.is_linux and not 'Vulkan' in bot):
Ben Wagner47ac0242017-06-27 13:44:36 -0400206 # TODO(dogben): Track down what's causing bots to die.
207 verbose = True
Ben Wagnerb8427032017-11-18 19:04:25 -0500208 if 'IntelHD405' in bot and api.vars.is_linux and 'Vulkan' in bot:
Ben Wagner32eb5ba2017-11-20 13:46:20 -0500209 # skia:7322
Greg Daniele81f7b32018-05-22 13:13:18 -0400210 match.append('~desk_carsvg.skp_1')
Ben Wagnerb8427032017-11-18 19:04:25 -0500211 match.append('~desk_tiger8svg.skp_1')
Greg Daniele81f7b32018-05-22 13:13:18 -0400212 match.append('~desk_wowwiki.skp')
Stephan Altmuellere9a284d2018-03-14 15:02:22 -0400213 match.append('~keymobi_sfgate.skp_1')
Ben Wagnerb8427032017-11-18 19:04:25 -0500214 match.append('~keymobi_techcrunch_com.skp_1.1')
Stephan Altmuellere9a284d2018-03-14 15:02:22 -0400215 match.append('~keymobi_techcrunch.skp_1.1')
216 match.append('~keymobi_techcrunch.skp_1.1_mpd')
Ben Wagnerb8427032017-11-18 19:04:25 -0500217 match.append('~tabl_gamedeksiam.skp_1.1')
218 match.append('~tabl_pravda.skp_1')
219 match.append('~top25desk_ebay_com.skp_1.1')
Stephan Altmuellere9a284d2018-03-14 15:02:22 -0400220 match.append('~top25desk_ebay.skp_1.1')
221 match.append('~top25desk_ebay.skp_1.1_mpd')
Eric Boren4c7754c2017-04-10 08:19:10 -0400222 if 'Vulkan' in bot and 'NexusPlayer' in bot:
Greg Daniel514e9d82017-07-06 09:25:15 -0400223 match.append('~blendmode_') # skia:6691
Ben Wagner314d7c22018-01-03 11:04:30 -0500224 if ('ASAN' in bot or 'UBSAN' in bot) and 'CPU' in bot:
Ben Wagner7d0cd9c2017-12-04 12:28:37 -0500225 # floor2int_undef benches undefined behavior, so ASAN correctly complains.
Ben Wagneradf17dc2017-09-12 23:41:00 -0400226 match.append('~^floor2int_undef$')
Eric Boren4c7754c2017-04-10 08:19:10 -0400227
228 # We do not need or want to benchmark the decodes of incomplete images.
229 # In fact, in nanobench we assert that the full image decode succeeds.
230 match.append('~inc0.gif')
231 match.append('~inc1.gif')
232 match.append('~incInterlaced.gif')
233 match.append('~inc0.jpg')
234 match.append('~incGray.jpg')
235 match.append('~inc0.wbmp')
236 match.append('~inc1.wbmp')
237 match.append('~inc0.webp')
238 match.append('~inc1.webp')
239 match.append('~inc0.ico')
240 match.append('~inc1.ico')
241 match.append('~inc0.png')
242 match.append('~inc1.png')
243 match.append('~inc2.png')
244 match.append('~inc12.png')
245 match.append('~inc13.png')
246 match.append('~inc14.png')
247 match.append('~inc0.webp')
248 match.append('~inc1.webp')
249
250 if match:
251 args.append('--match')
252 args.extend(match)
253
Ben Wagner47ac0242017-06-27 13:44:36 -0400254 if verbose:
255 args.append('--verbose')
256
Eric Boren4c7754c2017-04-10 08:19:10 -0400257 return args
258
259
260def perf_steps(api):
261 """Run Skia benchmarks."""
Eric Boren72f66682018-05-18 07:36:55 -0400262 b = api.properties['buildername']
263 if upload_perf_results(b):
Eric Boren4c7754c2017-04-10 08:19:10 -0400264 api.flavor.create_clean_device_dir(
265 api.flavor.device_dirs.perf_data_dir)
266
267 # Run nanobench.
268 properties = [
269 '--properties',
Eric Boren72f66682018-05-18 07:36:55 -0400270 'gitHash', api.properties['revision'],
Eric Boren4c7754c2017-04-10 08:19:10 -0400271 ]
272 if api.vars.is_trybot:
273 properties.extend([
274 'issue', api.vars.issue,
275 'patchset', api.vars.patchset,
276 'patch_storage', api.vars.patch_storage,
277 ])
Eric Borenf9aa9e52017-04-10 09:56:10 -0400278 properties.extend(['swarming_bot_id', api.vars.swarming_bot_id])
279 properties.extend(['swarming_task_id', api.vars.swarming_task_id])
Eric Boren4c7754c2017-04-10 08:19:10 -0400280
281 target = 'nanobench'
282 args = [
283 target,
Eric Boren4c7754c2017-04-10 08:19:10 -0400284 '-i', api.flavor.device_dirs.resource_dir,
285 '--skps', api.flavor.device_dirs.skp_dir,
286 '--images', api.flavor.device_path_join(
287 api.flavor.device_dirs.images_dir, 'nanobench'),
288 ]
289
290 # Do not run svgs on Valgrind.
291 if 'Valgrind' not in api.vars.builder_name:
Ben Wagner0ecc2b7e2017-11-09 22:10:44 -0500292 args.extend(['--svgs', api.flavor.device_dirs.svg_dir])
Eric Boren4c7754c2017-04-10 08:19:10 -0400293
Eric Boren89cd3572017-06-28 13:50:22 -0400294 args.extend(nanobench_flags(api, api.vars.builder_name))
Eric Boren4c7754c2017-04-10 08:19:10 -0400295
296 if 'Chromecast' in api.vars.builder_cfg.get('os', ''):
297 # Due to limited disk space, run a watered down perf run on Chromecast.
Ben Wagner32fa5102017-08-10 21:25:55 -0400298 args = [target]
Kevin Lubickb6d09b72017-06-15 15:21:17 -0400299 if api.vars.builder_cfg.get('cpu_or_gpu') == 'CPU':
Ben Wagner32fa5102017-08-10 21:25:55 -0400300 args.extend(['--nogpu', '--config', '8888'])
Kevin Lubickb6d09b72017-06-15 15:21:17 -0400301 elif api.vars.builder_cfg.get('cpu_or_gpu') == 'GPU':
Ben Wagner32fa5102017-08-10 21:25:55 -0400302 args.extend(['--nocpu', '--config', 'gles'])
Kevin Lubickb6d09b72017-06-15 15:21:17 -0400303 args.extend([
Kevin Lubickffce0792017-05-24 15:30:35 -0400304 '-i', api.flavor.device_dirs.resource_dir,
305 '--images', api.flavor.device_path_join(
Kevin Lubickc2f3e8d2018-01-24 15:48:26 -0500306 api.flavor.device_dirs.resource_dir, 'images', 'color_wheel.jpg'),
Kevin Lubickc78a2d72017-06-01 15:51:06 -0400307 '--skps', api.flavor.device_dirs.skp_dir,
Kevin Lubickffce0792017-05-24 15:30:35 -0400308 '--pre_log',
Kevin Lubick5d750ed2018-01-22 11:32:39 -0500309 '--match', # skia:6687
Kevin Lubickffce0792017-05-24 15:30:35 -0400310 '~matrixconvolution',
311 '~blur_image_filter',
312 '~blur_0.01',
313 '~GM_animated-image-blurs',
Brian Salomon44acb5b2017-07-18 19:59:24 -0400314 '~blendmode_mask_',
Kevin Lubick5d750ed2018-01-22 11:32:39 -0500315 '~desk_carsvg.skp',
Chris Dalton035fcdf2017-11-07 15:34:22 -0700316 '~^path_text_clipped', # Bot times out; skia:7190
Kevin Lubick03bd9ee2018-01-29 10:30:02 -0500317 '~shapes_rrect_inner_rrect_50_500x500', # skia:7551
Kevin Lubickb6d09b72017-06-15 15:21:17 -0400318 ])
Eric Boren4c7754c2017-04-10 08:19:10 -0400319
Eric Boren72f66682018-05-18 07:36:55 -0400320 if upload_perf_results(b):
Eric Boren4c7754c2017-04-10 08:19:10 -0400321 now = api.time.utcnow()
322 ts = int(calendar.timegm(now.utctimetuple()))
323 json_path = api.flavor.device_path_join(
324 api.flavor.device_dirs.perf_data_dir,
Eric Boren72f66682018-05-18 07:36:55 -0400325 'nanobench_%s_%d.json' % (api.properties['revision'], ts))
Eric Boren4c7754c2017-04-10 08:19:10 -0400326 args.extend(['--outResultsFile', json_path])
327 args.extend(properties)
328
Kevin Lubick9ef6de72017-10-15 21:05:58 -0400329 keys_blacklist = ['configuration', 'role', 'test_filter']
Eric Boren4c7754c2017-04-10 08:19:10 -0400330 args.append('--key')
331 for k in sorted(api.vars.builder_cfg.keys()):
332 if not k in keys_blacklist:
333 args.extend([k, api.vars.builder_cfg[k]])
334
Eric Boren4c7754c2017-04-10 08:19:10 -0400335 # See skia:2789.
Ben Wagner37491d22017-12-13 13:00:47 -0500336 if 'AbandonGpuContext' in api.vars.extra_tokens:
Ben Wagner32fa5102017-08-10 21:25:55 -0400337 args.extend(['--abandonGpuContext'])
Eric Boren4c7754c2017-04-10 08:19:10 -0400338
Ben Wagner5655ba42017-10-02 10:48:32 -0400339 api.run(api.flavor.step, target, cmd=args,
340 abort_on_failure=False)
Eric Boren4c7754c2017-04-10 08:19:10 -0400341
342 # Copy results to swarming out dir.
Eric Boren72f66682018-05-18 07:36:55 -0400343 if upload_perf_results(b):
344 api.file.ensure_directory(
345 'makedirs perf_dir',
Eric Borencd0a98c2018-06-20 13:23:16 -0400346 api.flavor.host_dirs.perf_data_dir)
Eric Boren4c7754c2017-04-10 08:19:10 -0400347 api.flavor.copy_directory_contents_to_host(
348 api.flavor.device_dirs.perf_data_dir,
Eric Boren72f66682018-05-18 07:36:55 -0400349 api.flavor.host_dirs.perf_data_dir)
Eric Boren4c7754c2017-04-10 08:19:10 -0400350
351
borenet1ed2ae42016-07-26 11:52:17 -0700352def RunSteps(api):
Eric Borenb7023162018-05-04 13:46:15 -0400353 api.vars.setup()
354 api.file.ensure_directory('makedirs tmp_dir', api.vars.tmp_dir)
355 api.flavor.setup()
356
Eric Boren896af752017-04-24 13:22:56 -0400357 env = {}
Eric Boren4c7754c2017-04-10 08:19:10 -0400358 if 'iOS' in api.vars.builder_name:
359 env['IOS_BUNDLE_ID'] = 'com.google.nanobench'
Stephan Altmueller63e843d2017-04-25 11:38:38 -0400360 env['IOS_MOUNT_POINT'] = api.vars.slave_dir.join('mnt_iosdevice')
Eric Boren896af752017-04-24 13:22:56 -0400361 with api.env(env):
Eric Boren4c7754c2017-04-10 08:19:10 -0400362 try:
363 if 'Chromecast' in api.vars.builder_name:
364 api.flavor.install(resources=True, skps=True)
365 else:
366 api.flavor.install_everything()
367 perf_steps(api)
368 finally:
369 api.flavor.cleanup_steps()
370 api.run.check_failure()
371
372
Eric Borenf9aa9e52017-04-10 09:56:10 -0400373TEST_BUILDERS = [
Kevin Lubick9ef6de72017-10-15 21:05:58 -0400374 'Perf-Android-Clang-Nexus5-GPU-Adreno330-arm-Debug-All-Android',
Ben Wagner6f96c022018-06-21 12:12:01 -0400375 ('Perf-Android-Clang-Nexus5x-GPU-Adreno418-arm64-Release-All-'
376 'Android_NoGPUThreads'),
Kevin Lubick9ef6de72017-10-15 21:05:58 -0400377 'Perf-Android-Clang-NexusPlayer-GPU-PowerVR-x86-Release-All-Android_Vulkan',
Kevin Lubickd7af1db2017-11-02 12:03:22 -0400378 'Perf-ChromeOS-Clang-ASUSChromebookFlipC100-GPU-MaliT764-arm-Release-All',
Kevin Lubick9ef6de72017-10-15 21:05:58 -0400379 'Perf-Chromecast-GCC-Chorizo-CPU-Cortex_A7-arm-Debug-All',
380 'Perf-Chromecast-GCC-Chorizo-GPU-Cortex_A7-arm-Release-All',
Ben Wagnerbee6cac2017-12-04 11:15:58 -0500381 'Perf-Debian9-Clang-GCE-CPU-AVX2-x86_64-Debug-All-ASAN',
Kevin Lubick88611a12018-04-26 09:46:45 -0400382 'Perf-Debian9-Clang-NUC5PPYH-GPU-IntelHD405-x86_64-Debug-All-Vulkan',
Kevin Lubick88611a12018-04-26 09:46:45 -0400383 'Perf-Debian9-Clang-NUC7i5BNK-GPU-IntelIris640-x86_64-Release-All',
Kevin Lubick9ef6de72017-10-15 21:05:58 -0400384 ('Perf-Mac-Clang-MacMini7.1-GPU-IntelIris5100-x86_64-Release-All-'
Kevin Lubick88611a12018-04-26 09:46:45 -0400385 'CommandBuffer'),
Chris Dalton2b937f52018-05-17 10:17:10 -0600386 ('Perf-Mac-Clang-MacBookPro11.5-GPU-RadeonHD8870M-x86_64-Release-All-'
387 'MoltenVK_Vulkan'),
Kevin Lubick9ef6de72017-10-15 21:05:58 -0400388 ('Perf-Ubuntu17-GCC-Golo-GPU-QuadroP400-x86_64-Release-All-'
Kevin Lubick88611a12018-04-26 09:46:45 -0400389 'Valgrind_AbandonGpuContext_SK_CPU_LIMIT_SSE41'),
Ben Wagner84447e02018-02-28 15:51:30 -0500390 'Perf-Win10-Clang-AlphaR2-GPU-RadeonR9M470X-x86_64-Release-All-Vulkan',
Ben Wagner7464a262018-04-19 15:49:18 -0400391 'Perf-Win10-Clang-Golo-GPU-QuadroP400-x86_64-Release-All-ANGLE',
Ben Wagnerb2fd61a2017-10-23 16:01:44 -0400392 'Perf-Win10-Clang-NUC6i5SYK-GPU-IntelIris540-x86_64-Release-All-ANGLE',
Kevin Lubick9ef6de72017-10-15 21:05:58 -0400393 'Perf-Win10-Clang-NUC6i5SYK-GPU-IntelIris540-x86_64-Release-All-Vulkan',
Kevin Lubick9ef6de72017-10-15 21:05:58 -0400394 'Perf-iOS-Clang-iPadPro-GPU-GT7800-arm64-Release-All',
Eric Borenf9aa9e52017-04-10 09:56:10 -0400395]
borenet1ed2ae42016-07-26 11:52:17 -0700396
397
398def GenTests(api):
Eric Borenf9aa9e52017-04-10 09:56:10 -0400399 for builder in TEST_BUILDERS:
400 test = (
401 api.test(builder) +
402 api.properties(buildername=builder,
403 revision='abc123',
404 path_config='kitchen',
405 swarm_out_dir='[SWARM_OUT_DIR]') +
406 api.path.exists(
407 api.path['start_dir'].join('skia'),
408 api.path['start_dir'].join('skia', 'infra', 'bots', 'assets',
Eric Boren4c7754c2017-04-10 08:19:10 -0400409 'skimage', 'VERSION'),
Eric Borenf9aa9e52017-04-10 09:56:10 -0400410 api.path['start_dir'].join('skia', 'infra', 'bots', 'assets',
Eric Boren4c7754c2017-04-10 08:19:10 -0400411 'skp', 'VERSION'),
Eric Borenf9aa9e52017-04-10 09:56:10 -0400412 api.path['start_dir'].join('tmp', 'uninteresting_hashes.txt')
Ben Wagnerf835c222017-04-30 11:14:51 -0400413 ) +
414 api.step_data('get swarming bot id',
415 stdout=api.raw_io.output('skia-bot-123')) +
416 api.step_data('get swarming task id',
417 stdout=api.raw_io.output('123456'))
Eric Borenf9aa9e52017-04-10 09:56:10 -0400418 )
Eric Borenf9aa9e52017-04-10 09:56:10 -0400419 if 'Win' in builder:
420 test += api.platform('win', 64)
Eric Boren4c7754c2017-04-10 08:19:10 -0400421
Eric Borenf9aa9e52017-04-10 09:56:10 -0400422 if 'Chromecast' in builder:
423 test += api.step_data(
424 'read chromecast ip',
425 stdout=api.raw_io.output('192.168.1.2:5555'))
426
427 if 'ChromeOS' in builder:
428 test += api.step_data(
429 'read chromeos ip',
430 stdout=api.raw_io.output('{"user_ip":"foo@127.0.0.1"}'))
431
432 yield test
Eric Boren4c7754c2017-04-10 08:19:10 -0400433
Kevin Lubick9ef6de72017-10-15 21:05:58 -0400434 builder = 'Perf-Win10-Clang-NUCD34010WYKH-GPU-IntelHD4400-x86_64-Release-All'
Kevin Lubickfe079d42017-04-12 08:31:48 -0400435 yield (
436 api.test('trybot') +
437 api.properties(buildername=builder,
438 revision='abc123',
439 path_config='kitchen',
440 swarm_out_dir='[SWARM_OUT_DIR]') +
441 api.properties(patch_storage='gerrit') +
442 api.properties.tryserver(
443 buildername=builder,
444 gerrit_project='skia',
445 gerrit_url='https://skia-review.googlesource.com/',
446 )+
447 api.path.exists(
448 api.path['start_dir'].join('skia'),
449 api.path['start_dir'].join('skia', 'infra', 'bots', 'assets',
450 'skimage', 'VERSION'),
451 api.path['start_dir'].join('skia', 'infra', 'bots', 'assets',
452 'skp', 'VERSION'),
453 api.path['start_dir'].join('skia', 'infra', 'bots', 'assets',
454 'svg', 'VERSION'),
455 api.path['start_dir'].join('tmp', 'uninteresting_hashes.txt')
456 )
457 )