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 compile. 7 8 9DEPS = [ 10 'git', 11 'recipe_engine/context', 12 'recipe_engine/path', 13 'recipe_engine/properties', 14 'recipe_engine/step', 15] 16 17 18def RunSteps(api): 19 bundle_dir = api.properties['swarm_out_dir'] + '/recipe_bundle' 20 skia_dir = api.path['start_dir'].join('skia') 21 recipes_py = api.path['start_dir'].join('skia', 'infra', 'bots', 'recipes.py') 22 with api.git.env(): 23 with api.context(cwd=skia_dir): 24 api.step('git init', infra_step=True, 25 cmd=['git', 'init']) 26 api.step('git add', infra_step=True, 27 cmd=['git', 'add', '.']) 28 api.step('git commit', infra_step=True, 29 cmd=['git', 'commit', '-m', 'commit recipes']) 30 api.step('Bundle Recipes', infra_step=True, 31 cmd=['python', recipes_py, 'bundle', 32 '--destination', bundle_dir]) 33 34 35def GenTests(api): 36 yield ( 37 api.test('BundleRecipes') + 38 api.properties(buildername='Housekeeper-PerCommit-BundleRecipes', 39 swarm_out_dir='[SWARM_OUT_DIR]') 40 ) 41