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 # Example recipe w/ coverage. 7 8 9 DEPS = [ 10 'recipe_engine/path', 11 'recipe_engine/properties', 12 'recipe_engine/raw_io', 13 'skpbench', 14 ] 15 16 17 TEST_BUILDERS = { 18 'client.skia': { 19 'skiabot-linux-swarm-000': [ 20 'Perf-Android-Clang-PixelC-GPU-TegraX1-arm64-Release-GN_Android_Skpbench', 21 ('Perf-Android-Clang-PixelC-GPU-TegraX1-arm64-Release-' + 22 'GN_Android_Vulkan_Skpbench'), 23 ], 24 }, 25 } 26 27 28 def RunSteps(api): 29 api.skpbench.run() 30 31 32 def GenTests(api): 33 for mastername, slaves in TEST_BUILDERS.iteritems(): 34 for slavename, builders_by_slave in slaves.iteritems(): 35 for builder in builders_by_slave: 36 test = ( 37 api.test(builder) + 38 api.properties(buildername=builder, 39 mastername=mastername, 40 slavename=slavename, 41 buildnumber=5, 42 revision='abc123', 43 path_config='kitchen', 44 swarm_out_dir='[SWARM_OUT_DIR]') + 45 api.path.exists( 46 api.path['start_dir'].join('skia'), 47 api.path['start_dir'].join('skia', 'infra', 'bots', 'assets', 48 'skp', 'VERSION'), 49 ) + 50 api.step_data('get swarming bot id', 51 stdout=api.raw_io.output('skia-bot-123')) + 52 api.step_data('get swarming task id', 53 stdout=api.raw_io.output('123456')) 54 ) 55 56 yield test 57