72f6668eb7
In general, vars should only contain variables which are the same for all tasks. Variables specific to compilation belong in the build module (or compile recipe), and those specific to running tests belong in the flavor module, or the individual recipe which uses them. Bug: skia:6473 Change-Id: Ifd55a57118c5801e6f4934a6b5de9d1567415b9a Reviewed-on: https://skia-review.googlesource.com/128545 Commit-Queue: Eric Boren <borenet@google.com> Reviewed-by: Ben Wagner <benjaminwagner@google.com>
94 lines
2.9 KiB
Python
94 lines
2.9 KiB
Python
# Copyright 2016 The Chromium Authors. All rights reserved.
|
|
# Use of this source code is governed by a BSD-style license that can be
|
|
# found in the LICENSE file.
|
|
|
|
|
|
# Recipe module for Skia Swarming calmbench.
|
|
|
|
DEPS = [
|
|
'core',
|
|
'flavor',
|
|
'recipe_engine/context',
|
|
'recipe_engine/file',
|
|
'recipe_engine/path',
|
|
'recipe_engine/properties',
|
|
'recipe_engine/python',
|
|
'recipe_engine/raw_io',
|
|
'recipe_engine/step',
|
|
'recipe_engine/time',
|
|
'run',
|
|
'vars',
|
|
]
|
|
|
|
def RunSteps(api):
|
|
api.vars.setup()
|
|
api.file.ensure_directory('makedirs tmp_dir', api.vars.tmp_dir)
|
|
api.flavor.setup()
|
|
|
|
api.flavor.install(skps=True, svgs=True)
|
|
api.file.ensure_directory('makedirs perf', api.vars.swarming_out_dir)
|
|
|
|
skia_dir = api.path['start_dir'].join('skia')
|
|
with api.context(cwd=skia_dir):
|
|
extra_arg = '--svgs %s --skps %s' % (api.flavor.device_dirs.svg_dir,
|
|
api.flavor.device_dirs.skp_dir)
|
|
|
|
# measuring multi-picture-draw in our multi-threaded CPU test is inaccurate
|
|
if api.vars.builder_cfg.get('cpu_or_gpu') == 'CPU':
|
|
extra_arg += ' --mpd false'
|
|
config = "8888"
|
|
else:
|
|
config = "gl"
|
|
|
|
command = [
|
|
'python',
|
|
skia_dir.join('tools', 'calmbench', 'ab.py'),
|
|
api.vars.swarming_out_dir,
|
|
'modified', 'master',
|
|
api.vars.build_dir.join("out", api.vars.configuration, 'nanobench'),
|
|
api.vars.build_dir.join("ParentRevision", "out",
|
|
api.vars.configuration, 'nanobench'),
|
|
extra_arg, extra_arg,
|
|
2, # reps
|
|
"false", # skipbase
|
|
config,
|
|
-1, # threads; let ab.py decide the threads
|
|
"false", # noinit
|
|
"--githash", api.properties['revision'],
|
|
"--concise"
|
|
]
|
|
|
|
keys_blacklist = ['configuration', 'role', 'test_filter']
|
|
command.append('--keys')
|
|
for k in sorted(api.vars.builder_cfg.keys()):
|
|
if not k in keys_blacklist:
|
|
command.extend([k, api.vars.builder_cfg[k]])
|
|
|
|
api.run(api.step, 'Run calmbench', cmd=command)
|
|
api.run.check_failure()
|
|
|
|
def GenTests(api):
|
|
builders = [
|
|
"Calmbench-Debian9-Clang-GCE-CPU-AVX2-x86_64-Release-All",
|
|
"Calmbench-Ubuntu17-Clang-Golo-GPU-QuadroP400-x86_64-Release-All",
|
|
]
|
|
|
|
for builder in builders:
|
|
test = (
|
|
api.test(builder) +
|
|
api.properties(buildername=builder,
|
|
repository='https://skia.googlesource.com/skia.git',
|
|
revision='abc123',
|
|
path_config='kitchen',
|
|
swarm_out_dir='[SWARM_OUT_DIR]') +
|
|
api.path.exists(
|
|
api.path['start_dir'].join('skia'),
|
|
api.path['start_dir'].join('skia', 'infra', 'bots', 'assets',
|
|
'svg', 'VERSION'),
|
|
api.path['start_dir'].join('skia', 'infra', 'bots', 'assets',
|
|
'skp', 'VERSION'),
|
|
)
|
|
)
|
|
|
|
yield test
|