blob: 4d2a4aada15daae388d22baaaae42ef70a2deefa [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 Osman5e117772018-06-20 14:53:06 -040095 configs.extend([gl_prefix, gl_prefix + 'srgb', gl_prefix + 'esrgb'])
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 Osman5e117772018-06-20 14:53:06 -0400107 configs.extend(['gles', 'glessrgb', 'glesesrgb'])
Ben Wagner32fa5102017-08-10 21:25:55 -0400108
Ben Wagner32fa5102017-08-10 21:25:55 -0400109 if 'CommandBuffer' in bot:
110 configs = ['commandbuffer']
111 if 'Vulkan' in bot:
Chris Daltonaec79e62018-05-29 12:02:19 -0600112 configs = ['vk']
Ben Wagner32fa5102017-08-10 21:25:55 -0400113
114 if 'ANGLE' in bot:
115 # Test only ANGLE configs.
116 configs = ['angle_d3d11_es2']
117 if sample_count is not '':
118 configs.append('angle_d3d11_es2_msaa' + sample_count)
Ben Wagner7464a262018-04-19 15:49:18 -0400119 if 'QuadroP400' in bot:
120 # See skia:7823 and chromium:693090.
121 configs.append('angle_gl_es2')
122 if sample_count is not '':
123 configs.append('angle_gl_es2_msaa' + sample_count)
Ben Wagner32fa5102017-08-10 21:25:55 -0400124
125 if 'ChromeOS' in bot:
126 # Just run GLES for now - maybe add gles_msaa4 in the future
127 configs = ['gles']
Eric Boren4c7754c2017-04-10 08:19:10 -0400128
129 args.append('--config')
130 args.extend(configs)
131
Brian Osmanc49d11e2017-09-22 09:44:35 -0400132 # By default, we test with GPU threading enabled. Leave PixelC devices
133 # running without threads, just to get some coverage of that code path.
134 if 'PixelC' in bot:
135 args.extend(['--gpuThreads', '0'])
136
Eric Boren4c7754c2017-04-10 08:19:10 -0400137 if 'Valgrind' in bot:
138 # Don't care about Valgrind performance.
139 args.extend(['--loops', '1'])
140 args.extend(['--samples', '1'])
141 # Ensure that the bot framework does not think we have timed out.
142 args.extend(['--keepAlive', 'true'])
143
Ben Wagner47ac0242017-06-27 13:44:36 -0400144 # Some people don't like verbose output.
145 verbose = False
146
Eric Boren4c7754c2017-04-10 08:19:10 -0400147 match = []
148 if 'Android' in bot:
149 # Segfaults when run as GPU bench. Very large texture?
150 match.append('~blurroundrect')
151 match.append('~patch_grid') # skia:2847
152 match.append('~desk_carsvg')
Eric Boren4c7754c2017-04-10 08:19:10 -0400153 if 'Nexus5' in bot:
154 match.append('~keymobi_shop_mobileweb_ebay_com.skp') # skia:5178
155 if 'iOS' in bot:
156 match.append('~blurroundrect')
157 match.append('~patch_grid') # skia:2847
158 match.append('~desk_carsvg')
159 match.append('~keymobi')
160 match.append('~path_hairline')
161 match.append('~GLInstancedArraysBench') # skia:4714
162 if 'IntelIris540' in bot and 'ANGLE' in bot:
163 match.append('~tile_image_filter_tiled_64') # skia:6082
Ben Wagner22195442017-11-30 15:34:24 -0500164 if 'Vulkan' in bot and 'IntelIris540' in bot and 'Win' in bot:
Eric Boren4c7754c2017-04-10 08:19:10 -0400165 # skia:6398
166 match.append('~GM_varied_text_clipped_lcd')
167 match.append('~GM_varied_text_ignorable_clip_lcd')
Mike Reed1d2678f2017-07-05 13:10:42 -0400168 match.append('~blendmode_mask_DstATop')
169 match.append('~blendmode_mask_SrcIn')
170 match.append('~blendmode_mask_SrcOut')
171 match.append('~blendmode_mask_Src')
Eric Boren4c7754c2017-04-10 08:19:10 -0400172 match.append('~fontscaler_lcd')
173 match.append('~rotated_rects_aa_alternating_transparent_and_opaque_src')
174 match.append('~rotated_rects_aa_changing_transparent_src')
175 match.append('~rotated_rects_aa_same_transparent_src')
176 match.append('~shadermask_LCD_FF')
177 match.append('~srcmode_rects_1')
178 match.append('~text_16_LCD_88')
179 match.append('~text_16_LCD_BK')
180 match.append('~text_16_LCD_FF')
181 match.append('~text_16_LCD_WT')
Greg Daniel139eb802017-07-19 10:12:49 -0400182 # skia:6863
183 match.append('~desk_skbug6850overlay2')
Greg Daniele0996532017-08-07 14:56:26 -0400184 match.append('~desk_googlespreadsheet')
Greg Daniela6717ce2018-01-29 10:04:41 -0500185 match.append('~desk_carsvg')
Ben Wagnera7f32052018-03-01 15:25:16 -0500186 if ('Vulkan' in bot and ('RadeonR9M470X' in bot or 'RadeonHD7770' in bot) and
187 'Win' in bot):
Ben Wagner84447e02018-02-28 15:51:30 -0500188 # skia:7677
189 match.append('~path_text_clipped_uncached')
Chris Dalton2b937f52018-05-17 10:17:10 -0600190 if 'MoltenVK' in bot:
191 # skbug.com/7962
192 match.append('~^path_text_clipped_uncached$')
193 match.append('~^path_text_uncached$')
Eric Boren89cd3572017-06-28 13:50:22 -0400194 if ('Intel' in bot and api.vars.is_linux and not 'Vulkan' in bot):
Ben Wagner47ac0242017-06-27 13:44:36 -0400195 # TODO(dogben): Track down what's causing bots to die.
196 verbose = True
Ben Wagnerb8427032017-11-18 19:04:25 -0500197 if 'IntelHD405' in bot and api.vars.is_linux and 'Vulkan' in bot:
Ben Wagner32eb5ba2017-11-20 13:46:20 -0500198 # skia:7322
Greg Daniele81f7b32018-05-22 13:13:18 -0400199 match.append('~desk_carsvg.skp_1')
Ben Wagnerb8427032017-11-18 19:04:25 -0500200 match.append('~desk_tiger8svg.skp_1')
Greg Daniele81f7b32018-05-22 13:13:18 -0400201 match.append('~desk_wowwiki.skp')
Stephan Altmuellere9a284d2018-03-14 15:02:22 -0400202 match.append('~keymobi_sfgate.skp_1')
Ben Wagnerb8427032017-11-18 19:04:25 -0500203 match.append('~keymobi_techcrunch_com.skp_1.1')
Stephan Altmuellere9a284d2018-03-14 15:02:22 -0400204 match.append('~keymobi_techcrunch.skp_1.1')
205 match.append('~keymobi_techcrunch.skp_1.1_mpd')
Ben Wagnerb8427032017-11-18 19:04:25 -0500206 match.append('~tabl_gamedeksiam.skp_1.1')
207 match.append('~tabl_pravda.skp_1')
208 match.append('~top25desk_ebay_com.skp_1.1')
Stephan Altmuellere9a284d2018-03-14 15:02:22 -0400209 match.append('~top25desk_ebay.skp_1.1')
210 match.append('~top25desk_ebay.skp_1.1_mpd')
Eric Boren4c7754c2017-04-10 08:19:10 -0400211 if 'Vulkan' in bot and 'NexusPlayer' in bot:
Greg Daniel514e9d82017-07-06 09:25:15 -0400212 match.append('~blendmode_') # skia:6691
Ben Wagner314d7c22018-01-03 11:04:30 -0500213 if ('ASAN' in bot or 'UBSAN' in bot) and 'CPU' in bot:
Ben Wagner7d0cd9c2017-12-04 12:28:37 -0500214 # floor2int_undef benches undefined behavior, so ASAN correctly complains.
Ben Wagneradf17dc2017-09-12 23:41:00 -0400215 match.append('~^floor2int_undef$')
Eric Boren4c7754c2017-04-10 08:19:10 -0400216
217 # We do not need or want to benchmark the decodes of incomplete images.
218 # In fact, in nanobench we assert that the full image decode succeeds.
219 match.append('~inc0.gif')
220 match.append('~inc1.gif')
221 match.append('~incInterlaced.gif')
222 match.append('~inc0.jpg')
223 match.append('~incGray.jpg')
224 match.append('~inc0.wbmp')
225 match.append('~inc1.wbmp')
226 match.append('~inc0.webp')
227 match.append('~inc1.webp')
228 match.append('~inc0.ico')
229 match.append('~inc1.ico')
230 match.append('~inc0.png')
231 match.append('~inc1.png')
232 match.append('~inc2.png')
233 match.append('~inc12.png')
234 match.append('~inc13.png')
235 match.append('~inc14.png')
236 match.append('~inc0.webp')
237 match.append('~inc1.webp')
238
239 if match:
240 args.append('--match')
241 args.extend(match)
242
Ben Wagner47ac0242017-06-27 13:44:36 -0400243 if verbose:
244 args.append('--verbose')
245
Eric Boren4c7754c2017-04-10 08:19:10 -0400246 return args
247
248
249def perf_steps(api):
250 """Run Skia benchmarks."""
Eric Boren72f66682018-05-18 07:36:55 -0400251 b = api.properties['buildername']
252 if upload_perf_results(b):
Eric Boren4c7754c2017-04-10 08:19:10 -0400253 api.flavor.create_clean_device_dir(
254 api.flavor.device_dirs.perf_data_dir)
255
256 # Run nanobench.
257 properties = [
258 '--properties',
Eric Boren72f66682018-05-18 07:36:55 -0400259 'gitHash', api.properties['revision'],
Eric Boren4c7754c2017-04-10 08:19:10 -0400260 ]
261 if api.vars.is_trybot:
262 properties.extend([
263 'issue', api.vars.issue,
264 'patchset', api.vars.patchset,
265 'patch_storage', api.vars.patch_storage,
266 ])
Eric Borenf9aa9e52017-04-10 09:56:10 -0400267 properties.extend(['swarming_bot_id', api.vars.swarming_bot_id])
268 properties.extend(['swarming_task_id', api.vars.swarming_task_id])
Eric Boren4c7754c2017-04-10 08:19:10 -0400269
270 target = 'nanobench'
271 args = [
272 target,
Eric Boren4c7754c2017-04-10 08:19:10 -0400273 '-i', api.flavor.device_dirs.resource_dir,
274 '--skps', api.flavor.device_dirs.skp_dir,
275 '--images', api.flavor.device_path_join(
276 api.flavor.device_dirs.images_dir, 'nanobench'),
277 ]
278
279 # Do not run svgs on Valgrind.
280 if 'Valgrind' not in api.vars.builder_name:
Ben Wagner0ecc2b7e2017-11-09 22:10:44 -0500281 args.extend(['--svgs', api.flavor.device_dirs.svg_dir])
Eric Boren4c7754c2017-04-10 08:19:10 -0400282
Eric Boren89cd3572017-06-28 13:50:22 -0400283 args.extend(nanobench_flags(api, api.vars.builder_name))
Eric Boren4c7754c2017-04-10 08:19:10 -0400284
285 if 'Chromecast' in api.vars.builder_cfg.get('os', ''):
286 # Due to limited disk space, run a watered down perf run on Chromecast.
Ben Wagner32fa5102017-08-10 21:25:55 -0400287 args = [target]
Kevin Lubickb6d09b72017-06-15 15:21:17 -0400288 if api.vars.builder_cfg.get('cpu_or_gpu') == 'CPU':
Ben Wagner32fa5102017-08-10 21:25:55 -0400289 args.extend(['--nogpu', '--config', '8888'])
Kevin Lubickb6d09b72017-06-15 15:21:17 -0400290 elif api.vars.builder_cfg.get('cpu_or_gpu') == 'GPU':
Ben Wagner32fa5102017-08-10 21:25:55 -0400291 args.extend(['--nocpu', '--config', 'gles'])
Kevin Lubickb6d09b72017-06-15 15:21:17 -0400292 args.extend([
Kevin Lubickffce0792017-05-24 15:30:35 -0400293 '-i', api.flavor.device_dirs.resource_dir,
294 '--images', api.flavor.device_path_join(
Kevin Lubickc2f3e8d2018-01-24 15:48:26 -0500295 api.flavor.device_dirs.resource_dir, 'images', 'color_wheel.jpg'),
Kevin Lubickc78a2d72017-06-01 15:51:06 -0400296 '--skps', api.flavor.device_dirs.skp_dir,
Kevin Lubickffce0792017-05-24 15:30:35 -0400297 '--pre_log',
Kevin Lubick5d750ed2018-01-22 11:32:39 -0500298 '--match', # skia:6687
Kevin Lubickffce0792017-05-24 15:30:35 -0400299 '~matrixconvolution',
300 '~blur_image_filter',
301 '~blur_0.01',
302 '~GM_animated-image-blurs',
Brian Salomon44acb5b2017-07-18 19:59:24 -0400303 '~blendmode_mask_',
Kevin Lubick5d750ed2018-01-22 11:32:39 -0500304 '~desk_carsvg.skp',
Chris Dalton035fcdf2017-11-07 15:34:22 -0700305 '~^path_text_clipped', # Bot times out; skia:7190
Kevin Lubick03bd9ee2018-01-29 10:30:02 -0500306 '~shapes_rrect_inner_rrect_50_500x500', # skia:7551
Kevin Lubickb6d09b72017-06-15 15:21:17 -0400307 ])
Eric Boren4c7754c2017-04-10 08:19:10 -0400308
Eric Boren72f66682018-05-18 07:36:55 -0400309 if upload_perf_results(b):
Eric Boren4c7754c2017-04-10 08:19:10 -0400310 now = api.time.utcnow()
311 ts = int(calendar.timegm(now.utctimetuple()))
312 json_path = api.flavor.device_path_join(
313 api.flavor.device_dirs.perf_data_dir,
Eric Boren72f66682018-05-18 07:36:55 -0400314 'nanobench_%s_%d.json' % (api.properties['revision'], ts))
Eric Boren4c7754c2017-04-10 08:19:10 -0400315 args.extend(['--outResultsFile', json_path])
316 args.extend(properties)
317
Kevin Lubick9ef6de72017-10-15 21:05:58 -0400318 keys_blacklist = ['configuration', 'role', 'test_filter']
Eric Boren4c7754c2017-04-10 08:19:10 -0400319 args.append('--key')
320 for k in sorted(api.vars.builder_cfg.keys()):
321 if not k in keys_blacklist:
322 args.extend([k, api.vars.builder_cfg[k]])
323
Eric Boren4c7754c2017-04-10 08:19:10 -0400324 # See skia:2789.
Ben Wagner37491d22017-12-13 13:00:47 -0500325 if 'AbandonGpuContext' in api.vars.extra_tokens:
Ben Wagner32fa5102017-08-10 21:25:55 -0400326 args.extend(['--abandonGpuContext'])
Eric Boren4c7754c2017-04-10 08:19:10 -0400327
Ben Wagner5655ba42017-10-02 10:48:32 -0400328 api.run(api.flavor.step, target, cmd=args,
329 abort_on_failure=False)
Eric Boren4c7754c2017-04-10 08:19:10 -0400330
331 # Copy results to swarming out dir.
Eric Boren72f66682018-05-18 07:36:55 -0400332 if upload_perf_results(b):
333 api.file.ensure_directory(
334 'makedirs perf_dir',
Eric Borencd0a98c2018-06-20 13:23:16 -0400335 api.flavor.host_dirs.perf_data_dir)
Eric Boren4c7754c2017-04-10 08:19:10 -0400336 api.flavor.copy_directory_contents_to_host(
337 api.flavor.device_dirs.perf_data_dir,
Eric Boren72f66682018-05-18 07:36:55 -0400338 api.flavor.host_dirs.perf_data_dir)
Eric Boren4c7754c2017-04-10 08:19:10 -0400339
340
borenet1ed2ae42016-07-26 11:52:17 -0700341def RunSteps(api):
Eric Borenb7023162018-05-04 13:46:15 -0400342 api.vars.setup()
343 api.file.ensure_directory('makedirs tmp_dir', api.vars.tmp_dir)
344 api.flavor.setup()
345
Eric Boren896af752017-04-24 13:22:56 -0400346 env = {}
Eric Boren4c7754c2017-04-10 08:19:10 -0400347 if 'iOS' in api.vars.builder_name:
348 env['IOS_BUNDLE_ID'] = 'com.google.nanobench'
Stephan Altmueller63e843d2017-04-25 11:38:38 -0400349 env['IOS_MOUNT_POINT'] = api.vars.slave_dir.join('mnt_iosdevice')
Eric Boren896af752017-04-24 13:22:56 -0400350 with api.env(env):
Eric Boren4c7754c2017-04-10 08:19:10 -0400351 try:
352 if 'Chromecast' in api.vars.builder_name:
353 api.flavor.install(resources=True, skps=True)
354 else:
355 api.flavor.install_everything()
356 perf_steps(api)
357 finally:
358 api.flavor.cleanup_steps()
359 api.run.check_failure()
360
361
Eric Borenf9aa9e52017-04-10 09:56:10 -0400362TEST_BUILDERS = [
Kevin Lubick9ef6de72017-10-15 21:05:58 -0400363 'Perf-Android-Clang-Nexus5-GPU-Adreno330-arm-Debug-All-Android',
Kevin Lubick9ef6de72017-10-15 21:05:58 -0400364 'Perf-Android-Clang-NexusPlayer-GPU-PowerVR-x86-Release-All-Android_Vulkan',
365 'Perf-Android-Clang-PixelC-GPU-TegraX1-arm64-Release-All-Android_Skpbench',
Kevin Lubickd7af1db2017-11-02 12:03:22 -0400366 'Perf-ChromeOS-Clang-ASUSChromebookFlipC100-GPU-MaliT764-arm-Release-All',
Kevin Lubick9ef6de72017-10-15 21:05:58 -0400367 'Perf-Chromecast-GCC-Chorizo-CPU-Cortex_A7-arm-Debug-All',
368 'Perf-Chromecast-GCC-Chorizo-GPU-Cortex_A7-arm-Release-All',
Ben Wagnerbee6cac2017-12-04 11:15:58 -0500369 'Perf-Debian9-Clang-GCE-CPU-AVX2-x86_64-Debug-All-ASAN',
Kevin Lubick88611a12018-04-26 09:46:45 -0400370 'Perf-Debian9-Clang-NUC5PPYH-GPU-IntelHD405-x86_64-Debug-All-Vulkan',
Kevin Lubick88611a12018-04-26 09:46:45 -0400371 'Perf-Debian9-Clang-NUC7i5BNK-GPU-IntelIris640-x86_64-Release-All',
Kevin Lubick9ef6de72017-10-15 21:05:58 -0400372 ('Perf-Mac-Clang-MacMini7.1-GPU-IntelIris5100-x86_64-Release-All-'
Kevin Lubick88611a12018-04-26 09:46:45 -0400373 'CommandBuffer'),
Chris Dalton2b937f52018-05-17 10:17:10 -0600374 ('Perf-Mac-Clang-MacBookPro11.5-GPU-RadeonHD8870M-x86_64-Release-All-'
375 'MoltenVK_Vulkan'),
Kevin Lubick9ef6de72017-10-15 21:05:58 -0400376 ('Perf-Ubuntu17-GCC-Golo-GPU-QuadroP400-x86_64-Release-All-'
Kevin Lubick88611a12018-04-26 09:46:45 -0400377 'Valgrind_AbandonGpuContext_SK_CPU_LIMIT_SSE41'),
Ben Wagner84447e02018-02-28 15:51:30 -0500378 'Perf-Win10-Clang-AlphaR2-GPU-RadeonR9M470X-x86_64-Release-All-Vulkan',
Ben Wagner7464a262018-04-19 15:49:18 -0400379 'Perf-Win10-Clang-Golo-GPU-QuadroP400-x86_64-Release-All-ANGLE',
Ben Wagnerb2fd61a2017-10-23 16:01:44 -0400380 'Perf-Win10-Clang-NUC6i5SYK-GPU-IntelIris540-x86_64-Release-All-ANGLE',
Kevin Lubick9ef6de72017-10-15 21:05:58 -0400381 'Perf-Win10-Clang-NUC6i5SYK-GPU-IntelIris540-x86_64-Release-All-Vulkan',
Kevin Lubick9ef6de72017-10-15 21:05:58 -0400382 'Perf-iOS-Clang-iPadPro-GPU-GT7800-arm64-Release-All',
Eric Borenf9aa9e52017-04-10 09:56:10 -0400383]
borenet1ed2ae42016-07-26 11:52:17 -0700384
385
386def GenTests(api):
Eric Borenf9aa9e52017-04-10 09:56:10 -0400387 for builder in TEST_BUILDERS:
388 test = (
389 api.test(builder) +
390 api.properties(buildername=builder,
391 revision='abc123',
392 path_config='kitchen',
393 swarm_out_dir='[SWARM_OUT_DIR]') +
394 api.path.exists(
395 api.path['start_dir'].join('skia'),
396 api.path['start_dir'].join('skia', 'infra', 'bots', 'assets',
Eric Boren4c7754c2017-04-10 08:19:10 -0400397 'skimage', 'VERSION'),
Eric Borenf9aa9e52017-04-10 09:56:10 -0400398 api.path['start_dir'].join('skia', 'infra', 'bots', 'assets',
Eric Boren4c7754c2017-04-10 08:19:10 -0400399 'skp', 'VERSION'),
Eric Borenf9aa9e52017-04-10 09:56:10 -0400400 api.path['start_dir'].join('tmp', 'uninteresting_hashes.txt')
Ben Wagnerf835c222017-04-30 11:14:51 -0400401 ) +
402 api.step_data('get swarming bot id',
403 stdout=api.raw_io.output('skia-bot-123')) +
404 api.step_data('get swarming task id',
405 stdout=api.raw_io.output('123456'))
Eric Borenf9aa9e52017-04-10 09:56:10 -0400406 )
Eric Borenf9aa9e52017-04-10 09:56:10 -0400407 if 'Win' in builder:
408 test += api.platform('win', 64)
Eric Boren4c7754c2017-04-10 08:19:10 -0400409
Eric Borenf9aa9e52017-04-10 09:56:10 -0400410 if 'Chromecast' in builder:
411 test += api.step_data(
412 'read chromecast ip',
413 stdout=api.raw_io.output('192.168.1.2:5555'))
414
415 if 'ChromeOS' in builder:
416 test += api.step_data(
417 'read chromeos ip',
418 stdout=api.raw_io.output('{"user_ip":"foo@127.0.0.1"}'))
419
420 yield test
Eric Boren4c7754c2017-04-10 08:19:10 -0400421
Kevin Lubick9ef6de72017-10-15 21:05:58 -0400422 builder = 'Perf-Win10-Clang-NUCD34010WYKH-GPU-IntelHD4400-x86_64-Release-All'
Kevin Lubickfe079d42017-04-12 08:31:48 -0400423 yield (
424 api.test('trybot') +
425 api.properties(buildername=builder,
426 revision='abc123',
427 path_config='kitchen',
428 swarm_out_dir='[SWARM_OUT_DIR]') +
429 api.properties(patch_storage='gerrit') +
430 api.properties.tryserver(
431 buildername=builder,
432 gerrit_project='skia',
433 gerrit_url='https://skia-review.googlesource.com/',
434 )+
435 api.path.exists(
436 api.path['start_dir'].join('skia'),
437 api.path['start_dir'].join('skia', 'infra', 'bots', 'assets',
438 'skimage', 'VERSION'),
439 api.path['start_dir'].join('skia', 'infra', 'bots', 'assets',
440 'skp', 'VERSION'),
441 api.path['start_dir'].join('skia', 'infra', 'bots', 'assets',
442 'svg', 'VERSION'),
443 api.path['start_dir'].join('tmp', 'uninteresting_hashes.txt')
444 )
445 )