blob: b330fdcf36882a991fa86713113841ecce13ce46 [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
10
11
borenet1ed2ae42016-07-26 11:52:17 -070012DEPS = [
Eric Boren4c7754c2017-04-10 08:19:10 -040013 'core',
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 Boren89cd3572017-06-28 13:50:22 -040029def nanobench_flags(api, bot):
Eric Boren4c7754c2017-04-10 08:19:10 -040030 args = ['--pre_log']
31
32 if 'GPU' in bot:
33 args.append('--images')
34 args.extend(['--gpuStatsDump', 'true'])
35
36 if 'Android' in bot and 'GPU' in bot:
37 args.extend(['--useThermalManager', '1,1,10,1000'])
38
39 args.extend(['--scales', '1.0', '1.1'])
40
41 if 'iOS' in bot:
42 args.extend(['--skps', 'ignore_skps'])
43
Ben Wagner32fa5102017-08-10 21:25:55 -040044 configs = []
45 if api.vars.builder_cfg.get('cpu_or_gpu') == 'CPU':
46 args.append('--nogpu')
47 configs.extend(['8888', 'nonrendering'])
Eric Boren4c7754c2017-04-10 08:19:10 -040048
Ben Wagner32fa5102017-08-10 21:25:55 -040049 if '-arm-' not in bot:
50 # For Android CPU tests, these take too long and cause the task to time
51 # out.
52 configs += [ 'f16', 'srgb' ]
53 if '-GCE-' in bot:
54 configs += [ '565' ]
Eric Boren4c7754c2017-04-10 08:19:10 -040055
Ben Wagner32fa5102017-08-10 21:25:55 -040056 elif api.vars.builder_cfg.get('cpu_or_gpu') == 'GPU':
57 args.append('--nocpu')
58
59 gl_prefix = 'gl'
60 sample_count = '8'
61 if 'Android' in bot or 'iOS' in bot:
62 sample_count = '4'
63 # The NVIDIA_Shield has a regular OpenGL implementation. We bench that
64 # instead of ES.
65 if 'NVIDIA_Shield' not in bot:
66 gl_prefix = 'gles'
67 # The NP produces a long error stream when we run with MSAA.
68 # iOS crashes (skia:6399)
69 # Nexus7 (Tegra3) does not support MSAA.
70 if ('NexusPlayer' in bot or
71 'iOS' in bot or
72 'Nexus7' in bot):
73 sample_count = ''
74 elif 'Intel' in bot:
Eric Boren4c7754c2017-04-10 08:19:10 -040075 sample_count = ''
Ben Wagner32fa5102017-08-10 21:25:55 -040076 elif 'ChromeOS' in bot:
77 gl_prefix = 'gles'
Eric Boren4c7754c2017-04-10 08:19:10 -040078
Ben Wagner769faa22017-08-11 15:32:50 -040079 configs.extend([gl_prefix, gl_prefix + 'srgb'])
Eric Boren4c7754c2017-04-10 08:19:10 -040080 if sample_count is not '':
Ben Wagner32fa5102017-08-10 21:25:55 -040081 configs.append(gl_prefix + 'msaa' + sample_count)
82 if ('TegraX1' in bot or
83 'Quadro' in bot or
84 'GTX' in bot or
85 ('GT610' in bot and 'Ubuntu17' not in bot)):
86 configs.extend([gl_prefix + 'nvpr' + sample_count,
87 gl_prefix + 'nvprdit' + sample_count])
Eric Boren4c7754c2017-04-10 08:19:10 -040088
Ben Wagner32fa5102017-08-10 21:25:55 -040089 # We want to test both the OpenGL config and the GLES config on Linux Intel:
90 # GL is used by Chrome, GLES is used by ChromeOS.
91 if 'Intel' in bot and api.vars.is_linux:
Ben Wagner769faa22017-08-11 15:32:50 -040092 configs.extend(['gles', 'glessrgb'])
93
94 # The following devices do not support glessrgb.
95 if 'glessrgb' in configs:
96 if ('IntelHD405' in bot or
97 'IntelIris540' in bot or
98 'IntelIris640' in bot or
99 'IntelBayTrail' in bot or
100 'IntelHD2000' in bot or
101 'AndroidOne' in bot or
102 'Nexus7' in bot or
103 'NexusPlayer' in bot):
104 configs.remove('glessrgb')
Ben Wagner32fa5102017-08-10 21:25:55 -0400105
106 # Bench instanced rendering on a limited number of platforms
107 inst_config = gl_prefix + 'inst'
Ben Wagnercc4221b2017-08-17 17:29:04 -0400108 if 'PixelC' in bot or 'NVIDIA_Shield' in bot or 'MacMini7.1' in bot:
Ben Wagner32fa5102017-08-10 21:25:55 -0400109 configs.extend([inst_config, inst_config + sample_count])
110
111 if 'CommandBuffer' in bot:
112 configs = ['commandbuffer']
113 if 'Vulkan' in bot:
114 configs = ['vk']
115
116 if 'ANGLE' in bot:
117 # Test only ANGLE configs.
118 configs = ['angle_d3d11_es2']
119 if sample_count is not '':
120 configs.append('angle_d3d11_es2_msaa' + sample_count)
121
122 if 'ChromeOS' in bot:
123 # Just run GLES for now - maybe add gles_msaa4 in the future
124 configs = ['gles']
Eric Boren4c7754c2017-04-10 08:19:10 -0400125
126 args.append('--config')
127 args.extend(configs)
128
129 if 'Valgrind' in bot:
130 # Don't care about Valgrind performance.
131 args.extend(['--loops', '1'])
132 args.extend(['--samples', '1'])
133 # Ensure that the bot framework does not think we have timed out.
134 args.extend(['--keepAlive', 'true'])
135
Ben Wagner47ac0242017-06-27 13:44:36 -0400136 # Some people don't like verbose output.
137 verbose = False
138
Eric Boren4c7754c2017-04-10 08:19:10 -0400139 match = []
140 if 'Android' in bot:
141 # Segfaults when run as GPU bench. Very large texture?
142 match.append('~blurroundrect')
143 match.append('~patch_grid') # skia:2847
144 match.append('~desk_carsvg')
145 if 'NexusPlayer' in bot:
146 match.append('~desk_unicodetable')
147 if 'Nexus5' in bot:
148 match.append('~keymobi_shop_mobileweb_ebay_com.skp') # skia:5178
149 if 'iOS' in bot:
150 match.append('~blurroundrect')
151 match.append('~patch_grid') # skia:2847
152 match.append('~desk_carsvg')
153 match.append('~keymobi')
154 match.append('~path_hairline')
155 match.append('~GLInstancedArraysBench') # skia:4714
156 if 'IntelIris540' in bot and 'ANGLE' in bot:
157 match.append('~tile_image_filter_tiled_64') # skia:6082
Ben Wagner8ab8f612017-08-17 13:53:09 -0400158 if 'IntelHD615' in bot and 'ANGLE' in bot and 'Release' in bot:
159 # skia:6980
160 match.append('~hardstop_')
161 match.append('~GM_radial_gradient3')
Ben Wagner1aa23692017-06-09 10:24:39 -0400162 if ('Vulkan' in bot and ('IntelIris540' in bot or 'IntelIris640' in bot) and
163 'Win' in bot):
Eric Boren4c7754c2017-04-10 08:19:10 -0400164 # skia:6398
165 match.append('~GM_varied_text_clipped_lcd')
166 match.append('~GM_varied_text_ignorable_clip_lcd')
Mike Reed1d2678f2017-07-05 13:10:42 -0400167 match.append('~blendmode_mask_DstATop')
168 match.append('~blendmode_mask_SrcIn')
169 match.append('~blendmode_mask_SrcOut')
170 match.append('~blendmode_mask_Src')
Eric Boren4c7754c2017-04-10 08:19:10 -0400171 match.append('~fontscaler_lcd')
172 match.append('~rotated_rects_aa_alternating_transparent_and_opaque_src')
173 match.append('~rotated_rects_aa_changing_transparent_src')
174 match.append('~rotated_rects_aa_same_transparent_src')
175 match.append('~shadermask_LCD_FF')
176 match.append('~srcmode_rects_1')
177 match.append('~text_16_LCD_88')
178 match.append('~text_16_LCD_BK')
179 match.append('~text_16_LCD_FF')
180 match.append('~text_16_LCD_WT')
Greg Daniel139eb802017-07-19 10:12:49 -0400181 # skia:6863
182 match.append('~desk_skbug6850overlay2')
Greg Daniele0996532017-08-07 14:56:26 -0400183 match.append('~desk_googlespreadsheet')
Eric Boren89cd3572017-06-28 13:50:22 -0400184 if ('Intel' in bot and api.vars.is_linux and not 'Vulkan' in bot):
Ben Wagner47ac0242017-06-27 13:44:36 -0400185 # TODO(dogben): Track down what's causing bots to die.
186 verbose = True
Eric Boren4c7754c2017-04-10 08:19:10 -0400187 if 'Vulkan' in bot and 'NexusPlayer' in bot:
Greg Daniel514e9d82017-07-06 09:25:15 -0400188 match.append('~blendmode_') # skia:6691
Ben Wagner9b51d142017-05-25 12:48:16 -0400189 if 'ANGLE' in bot and 'Radeon' in bot and 'Release' in bot:
Brian Osman6a1a5f72017-04-21 15:38:27 -0400190 # skia:6534
191 match.append('~shapes_mixed_10000_32x33')
Ben Wagner9b51d142017-05-25 12:48:16 -0400192 match.append('~shapes_oval_10000_32x32')
Brian Osman6a1a5f72017-04-21 15:38:27 -0400193 match.append('~shapes_oval_10000_32x33')
Ben Wagner9b51d142017-05-25 12:48:16 -0400194 match.append('~shapes_rect_100_500x500')
195 match.append('~shapes_rrect_10000_32x32')
Ben Wagner38a56012017-04-28 17:13:32 -0400196 if 'ANGLE' in bot and 'GTX960' in bot and 'Release' in bot:
197 # skia:6534
198 match.append('~shapes_mixed_10000_32x33')
Ben Wagner9b51d142017-05-25 12:48:16 -0400199 match.append('~shapes_rect_100_500x500')
200 match.append('~shapes_rrect_10000_32x32')
Ben Wagneradf17dc2017-09-12 23:41:00 -0400201 if 'float_cast_overflow' in bot and 'CPU' in bot:
202 # skia:4632
203 match.append('~^floor2int_undef$')
Eric Boren4c7754c2017-04-10 08:19:10 -0400204
205 # We do not need or want to benchmark the decodes of incomplete images.
206 # In fact, in nanobench we assert that the full image decode succeeds.
207 match.append('~inc0.gif')
208 match.append('~inc1.gif')
209 match.append('~incInterlaced.gif')
210 match.append('~inc0.jpg')
211 match.append('~incGray.jpg')
212 match.append('~inc0.wbmp')
213 match.append('~inc1.wbmp')
214 match.append('~inc0.webp')
215 match.append('~inc1.webp')
216 match.append('~inc0.ico')
217 match.append('~inc1.ico')
218 match.append('~inc0.png')
219 match.append('~inc1.png')
220 match.append('~inc2.png')
221 match.append('~inc12.png')
222 match.append('~inc13.png')
223 match.append('~inc14.png')
224 match.append('~inc0.webp')
225 match.append('~inc1.webp')
226
227 if match:
228 args.append('--match')
229 args.extend(match)
230
Ben Wagner47ac0242017-06-27 13:44:36 -0400231 if verbose:
232 args.append('--verbose')
233
Eric Boren4c7754c2017-04-10 08:19:10 -0400234 return args
235
236
237def perf_steps(api):
238 """Run Skia benchmarks."""
239 if api.vars.upload_perf_results:
240 api.flavor.create_clean_device_dir(
241 api.flavor.device_dirs.perf_data_dir)
242
243 # Run nanobench.
244 properties = [
245 '--properties',
246 'gitHash', api.vars.got_revision,
Eric Boren4c7754c2017-04-10 08:19:10 -0400247 ]
248 if api.vars.is_trybot:
249 properties.extend([
250 'issue', api.vars.issue,
251 'patchset', api.vars.patchset,
252 'patch_storage', api.vars.patch_storage,
253 ])
Eric Borenf9aa9e52017-04-10 09:56:10 -0400254 properties.extend(['swarming_bot_id', api.vars.swarming_bot_id])
255 properties.extend(['swarming_task_id', api.vars.swarming_task_id])
Eric Boren4c7754c2017-04-10 08:19:10 -0400256
257 target = 'nanobench'
258 args = [
259 target,
Eric Boren4c7754c2017-04-10 08:19:10 -0400260 '-i', api.flavor.device_dirs.resource_dir,
261 '--skps', api.flavor.device_dirs.skp_dir,
262 '--images', api.flavor.device_path_join(
263 api.flavor.device_dirs.images_dir, 'nanobench'),
264 ]
265
266 # Do not run svgs on Valgrind.
267 if 'Valgrind' not in api.vars.builder_name:
268 if ('Vulkan' not in api.vars.builder_name or
269 'NexusPlayer' not in api.vars.builder_name):
270 args.extend(['--svgs', api.flavor.device_dirs.svg_dir])
271
Eric Boren89cd3572017-06-28 13:50:22 -0400272 args.extend(nanobench_flags(api, api.vars.builder_name))
Eric Boren4c7754c2017-04-10 08:19:10 -0400273
274 if 'Chromecast' in api.vars.builder_cfg.get('os', ''):
275 # Due to limited disk space, run a watered down perf run on Chromecast.
Ben Wagner32fa5102017-08-10 21:25:55 -0400276 args = [target]
Kevin Lubickb6d09b72017-06-15 15:21:17 -0400277 if api.vars.builder_cfg.get('cpu_or_gpu') == 'CPU':
Ben Wagner32fa5102017-08-10 21:25:55 -0400278 args.extend(['--nogpu', '--config', '8888'])
Kevin Lubickb6d09b72017-06-15 15:21:17 -0400279 elif api.vars.builder_cfg.get('cpu_or_gpu') == 'GPU':
Ben Wagner32fa5102017-08-10 21:25:55 -0400280 args.extend(['--nocpu', '--config', 'gles'])
Kevin Lubickb6d09b72017-06-15 15:21:17 -0400281 args.extend([
Kevin Lubickffce0792017-05-24 15:30:35 -0400282 '-i', api.flavor.device_dirs.resource_dir,
283 '--images', api.flavor.device_path_join(
284 api.flavor.device_dirs.resource_dir, 'color_wheel.jpg'),
Kevin Lubickc78a2d72017-06-01 15:51:06 -0400285 '--skps', api.flavor.device_dirs.skp_dir,
Kevin Lubickffce0792017-05-24 15:30:35 -0400286 '--pre_log',
287 '--match', # skia:6581
288 '~matrixconvolution',
289 '~blur_image_filter',
290 '~blur_0.01',
291 '~GM_animated-image-blurs',
Brian Salomon44acb5b2017-07-18 19:59:24 -0400292 '~blendmode_mask_',
Kevin Lubickb6d09b72017-06-15 15:21:17 -0400293 ])
Eric Boren4c7754c2017-04-10 08:19:10 -0400294
295 if api.vars.upload_perf_results:
296 now = api.time.utcnow()
297 ts = int(calendar.timegm(now.utctimetuple()))
298 json_path = api.flavor.device_path_join(
299 api.flavor.device_dirs.perf_data_dir,
300 'nanobench_%s_%d.json' % (api.vars.got_revision, ts))
301 args.extend(['--outResultsFile', json_path])
302 args.extend(properties)
303
304 keys_blacklist = ['configuration', 'role', 'is_trybot']
305 args.append('--key')
306 for k in sorted(api.vars.builder_cfg.keys()):
307 if not k in keys_blacklist:
308 args.extend([k, api.vars.builder_cfg[k]])
309
Eric Boren896af752017-04-24 13:22:56 -0400310 env = {}
Eric Boren4c7754c2017-04-10 08:19:10 -0400311 if 'Ubuntu16' in api.vars.builder_name:
312 # The vulkan in this asset name simply means that the graphics driver
313 # supports Vulkan. It is also the driver used for GL code.
314 dri_path = api.vars.slave_dir.join('linux_vulkan_intel_driver_release')
315 if 'Debug' in api.vars.builder_name:
316 dri_path = api.vars.slave_dir.join('linux_vulkan_intel_driver_debug')
317
318 if 'Vulkan' in api.vars.builder_name:
319 sdk_path = api.vars.slave_dir.join('linux_vulkan_sdk', 'bin')
320 lib_path = api.vars.slave_dir.join('linux_vulkan_sdk', 'lib')
321 env.update({
322 'PATH':'%%(PATH)s:%s' % sdk_path,
323 'LD_LIBRARY_PATH': '%s:%s' % (lib_path, dri_path),
324 'LIBGL_DRIVERS_PATH': dri_path,
325 'VK_ICD_FILENAMES':'%s' % dri_path.join('intel_icd.x86_64.json'),
326 })
327 else:
328 # Even the non-vulkan NUC jobs could benefit from the newer drivers.
329 env.update({
330 'LD_LIBRARY_PATH': dri_path,
331 'LIBGL_DRIVERS_PATH': dri_path,
332 })
333
334 # See skia:2789.
Ben Wagner988d15e2017-04-27 13:08:50 -0400335 extra_config_parts = api.vars.builder_cfg.get('extra_config', '').split('_')
336 if 'AbandonGpuContext' in extra_config_parts:
Ben Wagner32fa5102017-08-10 21:25:55 -0400337 args.extend(['--abandonGpuContext'])
Eric Boren4c7754c2017-04-10 08:19:10 -0400338
Eric Boren896af752017-04-24 13:22:56 -0400339 with api.env(env):
Eric Boren4c7754c2017-04-10 08:19:10 -0400340 api.run(api.flavor.step, target, cmd=args,
341 abort_on_failure=False)
342
343 # Copy results to swarming out dir.
344 if api.vars.upload_perf_results:
Robert Iannucci8cd50412017-07-07 14:36:58 -0700345 api.file.ensure_directory('makedirs perf_dir', api.vars.perf_data_dir)
Eric Boren4c7754c2017-04-10 08:19:10 -0400346 api.flavor.copy_directory_contents_to_host(
347 api.flavor.device_dirs.perf_data_dir,
348 api.vars.perf_data_dir)
349
350
borenet1ed2ae42016-07-26 11:52:17 -0700351def RunSteps(api):
Eric Boren4c7754c2017-04-10 08:19:10 -0400352 api.core.setup()
Eric Boren896af752017-04-24 13:22:56 -0400353 env = {}
Eric Boren4c7754c2017-04-10 08:19:10 -0400354 if 'iOS' in api.vars.builder_name:
355 env['IOS_BUNDLE_ID'] = 'com.google.nanobench'
Stephan Altmueller63e843d2017-04-25 11:38:38 -0400356 env['IOS_MOUNT_POINT'] = api.vars.slave_dir.join('mnt_iosdevice')
Eric Boren896af752017-04-24 13:22:56 -0400357 with api.env(env):
Eric Boren4c7754c2017-04-10 08:19:10 -0400358 try:
359 if 'Chromecast' in api.vars.builder_name:
360 api.flavor.install(resources=True, skps=True)
361 else:
362 api.flavor.install_everything()
363 perf_steps(api)
364 finally:
365 api.flavor.cleanup_steps()
366 api.run.check_failure()
367
368
Eric Borenf9aa9e52017-04-10 09:56:10 -0400369TEST_BUILDERS = [
Kevin Lubickfe079d42017-04-12 08:31:48 -0400370 'Perf-Android-Clang-NVIDIA_Shield-GPU-TegraX1-arm64-Debug-Android_Vulkan',
Eric Borenf9aa9e52017-04-10 09:56:10 -0400371 'Perf-Android-Clang-Nexus10-CPU-Exynos5250-arm-Release-Android',
Kevin Lubickfe079d42017-04-12 08:31:48 -0400372 'Perf-Android-Clang-Nexus5-GPU-Adreno330-arm-Debug-Android',
373 'Perf-Android-Clang-Nexus7-GPU-Tegra3-arm-Release-Android',
374 'Perf-Android-Clang-NexusPlayer-GPU-PowerVR-x86-Release-Android',
375 'Perf-Android-Clang-NexusPlayer-GPU-PowerVR-x86-Release-Android_Vulkan',
376 'Perf-Android-Clang-PixelC-GPU-TegraX1-arm64-Release-Android',
Eric Borenf9aa9e52017-04-10 09:56:10 -0400377 'Perf-ChromeOS-Clang-Chromebook_C100p-GPU-MaliT764-arm-Release',
Kevin Lubickb6d09b72017-06-15 15:21:17 -0400378 'Perf-Chromecast-GCC-Chorizo-CPU-Cortex_A7-arm-Debug',
Kevin Lubickc78a2d72017-06-01 15:51:06 -0400379 'Perf-Chromecast-GCC-Chorizo-GPU-Cortex_A7-arm-Release',
Ben Wagneradf17dc2017-09-12 23:41:00 -0400380 'Perf-Debian9-Clang-GCE-CPU-AVX2-x86_64-Debug-UBSAN_float_cast_overflow',
Ben Wagnercc4221b2017-08-17 17:29:04 -0400381 'Perf-Mac-Clang-MacMini7.1-CPU-AVX-x86_64-Release',
382 'Perf-Mac-Clang-MacMini7.1-GPU-IntelIris5100-x86_64-Debug-CommandBuffer',
Kevin Lubickfe079d42017-04-12 08:31:48 -0400383 'Perf-Ubuntu-Clang-GCE-CPU-AVX2-x86_64-Release',
Eric Borenf9aa9e52017-04-10 09:56:10 -0400384 'Perf-Ubuntu-GCC-ShuttleA-GPU-GTX550Ti-x86_64-Release-Valgrind',
385 ('Perf-Ubuntu-GCC-ShuttleA-GPU-GTX550Ti-x86_64-Release-Valgrind' +
386 '_AbandonGpuContext'),
Kevin Lubickfe079d42017-04-12 08:31:48 -0400387 'Perf-Ubuntu16-Clang-NUC6i5SYK-GPU-IntelIris540-x86_64-Debug-Vulkan',
388 'Perf-Ubuntu16-Clang-NUC6i5SYK-GPU-IntelIris540-x86_64-Release',
Brian Osman6a1a5f72017-04-21 15:38:27 -0400389 'Perf-Win10-MSVC-AlphaR2-GPU-RadeonR9M470X-x86_64-Release-ANGLE',
Kevin Lubickfe079d42017-04-12 08:31:48 -0400390 'Perf-Win10-MSVC-NUC6i5SYK-GPU-IntelIris540-x86_64-Release-ANGLE',
391 'Perf-Win10-MSVC-NUC6i5SYK-GPU-IntelIris540-x86_64-Release-Vulkan',
Ben Wagner38a56012017-04-28 17:13:32 -0400392 'Perf-Win10-MSVC-ShuttleC-GPU-GTX960-x86_64-Release-ANGLE',
Ben Wagner8ab8f612017-08-17 13:53:09 -0400393 'Perf-Win10-MSVC-SurfacePro2017-GPU-IntelHD615-x86_64-Release-ANGLE',
Kevin Lubickfe079d42017-04-12 08:31:48 -0400394 'Perf-Win2k8-MSVC-GCE-CPU-AVX2-x86_64-Debug',
395 'Perf-Win2k8-MSVC-GCE-CPU-AVX2-x86_64-Release',
Eric Borenf9aa9e52017-04-10 09:56:10 -0400396 'Perf-iOS-Clang-iPadMini4-GPU-GX6450-arm-Release'
397]
borenet1ed2ae42016-07-26 11:52:17 -0700398
399
400def GenTests(api):
Eric Borenf9aa9e52017-04-10 09:56:10 -0400401 for builder in TEST_BUILDERS:
402 test = (
403 api.test(builder) +
404 api.properties(buildername=builder,
405 revision='abc123',
406 path_config='kitchen',
407 swarm_out_dir='[SWARM_OUT_DIR]') +
408 api.path.exists(
409 api.path['start_dir'].join('skia'),
410 api.path['start_dir'].join('skia', 'infra', 'bots', 'assets',
Eric Boren4c7754c2017-04-10 08:19:10 -0400411 'skimage', 'VERSION'),
Eric Borenf9aa9e52017-04-10 09:56:10 -0400412 api.path['start_dir'].join('skia', 'infra', 'bots', 'assets',
Eric Boren4c7754c2017-04-10 08:19:10 -0400413 'skp', 'VERSION'),
Eric Borenf9aa9e52017-04-10 09:56:10 -0400414 api.path['start_dir'].join('tmp', 'uninteresting_hashes.txt')
Ben Wagnerf835c222017-04-30 11:14:51 -0400415 ) +
416 api.step_data('get swarming bot id',
417 stdout=api.raw_io.output('skia-bot-123')) +
418 api.step_data('get swarming task id',
419 stdout=api.raw_io.output('123456'))
Eric Borenf9aa9e52017-04-10 09:56:10 -0400420 )
Eric Borenf9aa9e52017-04-10 09:56:10 -0400421 if 'Win' in builder:
422 test += api.platform('win', 64)
Eric Boren4c7754c2017-04-10 08:19:10 -0400423
Eric Borenf9aa9e52017-04-10 09:56:10 -0400424 if 'Chromecast' in builder:
425 test += api.step_data(
426 'read chromecast ip',
427 stdout=api.raw_io.output('192.168.1.2:5555'))
428
429 if 'ChromeOS' in builder:
430 test += api.step_data(
431 'read chromeos ip',
432 stdout=api.raw_io.output('{"user_ip":"foo@127.0.0.1"}'))
433
434 yield test
Eric Boren4c7754c2017-04-10 08:19:10 -0400435
Kevin Lubickfe079d42017-04-12 08:31:48 -0400436 builder = 'Perf-Win10-MSVC-ShuttleB-GPU-IntelHD4600-x86_64-Release'
437 yield (
438 api.test('trybot') +
439 api.properties(buildername=builder,
440 revision='abc123',
441 path_config='kitchen',
442 swarm_out_dir='[SWARM_OUT_DIR]') +
443 api.properties(patch_storage='gerrit') +
444 api.properties.tryserver(
445 buildername=builder,
446 gerrit_project='skia',
447 gerrit_url='https://skia-review.googlesource.com/',
448 )+
449 api.path.exists(
450 api.path['start_dir'].join('skia'),
451 api.path['start_dir'].join('skia', 'infra', 'bots', 'assets',
452 'skimage', 'VERSION'),
453 api.path['start_dir'].join('skia', 'infra', 'bots', 'assets',
454 'skp', 'VERSION'),
455 api.path['start_dir'].join('skia', 'infra', 'bots', 'assets',
456 'svg', 'VERSION'),
457 api.path['start_dir'].join('tmp', 'uninteresting_hashes.txt')
458 )
459 )
460
461 builder = 'Perf-Android-Clang-NexusPlayer-CPU-SSE4-x86-Debug-Android'
Eric Boren4c7754c2017-04-10 08:19:10 -0400462 yield (
463 api.test('failed_push') +
464 api.properties(buildername=builder,
Eric Boren4c7754c2017-04-10 08:19:10 -0400465 revision='abc123',
466 path_config='kitchen',
Eric Boren5de544b2017-01-12 08:46:20 -0500467 swarm_out_dir='[SWARM_OUT_DIR]') +
borenet1ed2ae42016-07-26 11:52:17 -0700468 api.path.exists(
Ravi Mistry9bcca6a2016-11-21 16:06:19 -0500469 api.path['start_dir'].join('skia'),
470 api.path['start_dir'].join('skia', 'infra', 'bots', 'assets',
Eric Boren4c7754c2017-04-10 08:19:10 -0400471 'skimage', 'VERSION'),
Ravi Mistry9bcca6a2016-11-21 16:06:19 -0500472 api.path['start_dir'].join('skia', 'infra', 'bots', 'assets',
Eric Boren4c7754c2017-04-10 08:19:10 -0400473 'skp', 'VERSION'),
474 api.path['start_dir'].join('skia', 'infra', 'bots', 'assets',
475 'svg', 'VERSION'),
Ravi Mistry9bcca6a2016-11-21 16:06:19 -0500476 api.path['start_dir'].join('tmp', 'uninteresting_hashes.txt')
Eric Boren4c7754c2017-04-10 08:19:10 -0400477 ) +
478 api.step_data('push [START_DIR]/skia/resources/* '+
479 '/sdcard/revenge_of_the_skiabot/resources', retcode=1)
borenetbfa5b452016-10-19 10:13:32 -0700480 )