1# 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 skpbench.
7
8
9DEPS = [
10  'recipe_engine/path',
11  'recipe_engine/properties',
12  'recipe_engine/raw_io',
13  'skpbench',
14]
15
16
17def RunSteps(api):
18  api.skpbench.run()
19
20
21def GenTests(api):
22  b = 'Perf-Android-Clang-PixelC-GPU-TegraX1-arm64-Release-GN_Android_Skpbench'
23  yield (
24    api.test(b) +
25    api.properties(buildername=b,
26                   mastername='fake-master',
27                   slavename='fake-slave',
28                   buildnumber=5,
29                   revision='abc123',
30                   path_config='kitchen',
31                   swarm_out_dir='[SWARM_OUT_DIR]') +
32    api.path.exists(
33        api.path['start_dir'].join('skia'),
34        api.path['start_dir'].join('skia', 'infra', 'bots', 'assets',
35                                   'skp', 'VERSION'),
36    ) +
37    api.step_data('get swarming bot id',
38        stdout=api.raw_io.output('skia-bot-123')) +
39    api.step_data('get swarming task id',
40        stdout=api.raw_io.output('123456'))
41  )
42