• Home
  • Raw
  • Download

Lines Matching full:api

31 def _run(api, title, *cmd, **kwargs):  argument
32 with api.context(cwd=api.path['start_dir'].join('skia')):
33 return api.run(api.step, title, cmd=list(cmd), **kwargs)
36 def _adb(api, title, *cmd, **kwargs): argument
39 return _run(api, title, ADB_BINARY, *cmd, **kwargs)
42 def skpbench_steps(api): argument
44 is_vulkan = 'Vulkan' in api.vars.builder_name
45 is_metal = 'Metal' in api.vars.builder_name
46 is_android = 'Android' in api.vars.builder_name
47 is_apple_m1 = 'AppleM1' in api.vars.builder_name
48 is_all_paths_volatile = 'AllPathsVolatile' in api.vars.builder_name
49 is_mskp = 'Mskp' in api.vars.builder_name
50 is_ddl = 'DDL' in api.vars.builder_name
51 is_9x9 = '9x9' in api.vars.builder_name
53 api.file.ensure_directory(
54 'makedirs perf_dir', api.flavor.host_dirs.perf_data_dir)
57 app = api.vars.build_dir.join('skpbench')
58 _adb(api, 'push skpbench', 'push', app, api.flavor.device_dirs.bin_dir)
60 skpbench_dir = api.vars.workdir.join('skia', 'tools', 'skpbench')
61 table = api.path.join(api.vars.swarming_out_dir, 'table')
69 if "MaliG77" in api.vars.builder_name:
73 if "QuadroP400" in api.vars.builder_name or is_apple_m1:
81 skpbench_invocation = api.path.join(api.flavor.device_dirs.bin_dir, 'skpbench')
84 if is_vulkan and 'GalaxyS20' in api.vars.builder_name:
107 skpbench_args += [api.flavor.device_dirs.mskp_dir]
112 api.path.join(api.flavor.device_dirs.skp_dir, 'desk_*svg.skp'),
113 api.path.join(api.flavor.device_dirs.skp_dir, 'desk_motionmark*.skp'),
114 api.path.join(api.flavor.device_dirs.skp_dir, 'desk_chalkboard.skp')]
116 skpbench_args += [api.flavor.device_dirs.skp_dir]
118 if api.properties.get('dont_reduce_ops_task_splitting') == 'true':
121 if api.properties.get('gpu_resource_cache_limit'):
122 skpbench_args += ['--gpuResourceCacheLimit', api.properties.get('gpu_resource_cache_limit')]
124 api.run(api.python, 'skpbench',
131 'gitHash', api.properties['revision'],
133 if api.vars.is_trybot:
135 'issue', api.vars.issue,
136 'patchset', api.vars.patchset,
137 'patch_storage', api.vars.patch_storage,
140 skiaperf_args.extend(['swarming_bot_id', api.vars.swarming_bot_id])
141 skiaperf_args.extend(['swarming_task_id', api.vars.swarming_task_id])
143 now = api.time.utcnow()
145 json_path = api.path.join(
146 api.flavor.host_dirs.perf_data_dir,
147 'skpbench_%s_%d.json' % (api.properties['revision'], ts))
154 for k in sorted(api.vars.builder_cfg.keys()):
156 skiaperf_args.extend([k, api.vars.builder_cfg[k]])
158 api.run(api.python, 'Parse skpbench output into Perf json',
163 def RunSteps(api): argument
164 api.vars.setup()
165 api.file.ensure_directory('makedirs tmp_dir', api.vars.tmp_dir)
167 # The app_name passed to api.flavor.setup() is used to determine which app
170 api.flavor.setup(None)
173 mksp_mode = ('Mskp' in api.vars.builder_name)
174 api.flavor.install(skps=not mksp_mode, mskps=mksp_mode)
175 skpbench_steps(api)
177 api.flavor.cleanup_steps()
178 api.run.check_failure()
192 def GenTests(api): argument
195 api.test(builder) +
196 api.properties(buildername=builder,
200 api.path.exists(
201 api.path['start_dir'].join('skia'),
202 api.path['start_dir'].join('skia', 'infra', 'bots', 'assets',
205 api.step_data('get swarming bot id',
206 stdout=api.raw_io.output('skia-bot-123')) +
207 api.step_data('get swarming task id',
208 stdout=api.raw_io.output('123456'))
211 test += api.platform('win', 64)
217 api.test('trybot') +
218 api.properties(buildername=b,
224 api.path.exists(
225 api.path['start_dir'].join('skia'),
226 api.path['start_dir'].join('skia', 'infra', 'bots', 'assets',
229 api.step_data('get swarming bot id',
230 stdout=api.raw_io.output('skia-bot-123')) +
231 api.step_data('get swarming task id',
232 stdout=api.raw_io.output('123456')) +
233 api.properties(patch_storage='gerrit') +
234 api.properties.tryserver(