blob: fb221033599cb57a840b167eaeb1aef039018333 [file] [log] [blame]
Eric Boren8b3f9e62017-04-04 09:06:16 -04001# 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 'recipe_engine/path',
11 'recipe_engine/properties',
12 'recipe_engine/shutil',
13 'recipe_engine/step',
14 'core',
15 'run',
16 'vars',
17]
18
19
20def RunSteps(api):
21 api.core.setup()
Eric Boren43b9c6b2017-04-06 07:53:30 -040022
23 bundle_dir = api.vars.swarming_out_dir.join('recipe_bundle')
24 with api.step.context({'cwd': api.vars.skia_dir}):
25 if api.vars.is_trybot:
26 # Recipe bundling requires that any changes be committed.
27 api.run(api.step, 'Commit Patch', infra_step=True,
28 cmd=['git', 'commit', '-a', '-m', 'Commit Patch'])
29 recipes_py = api.vars.infrabots_dir.join('recipes.py')
30 api.run(api.step, 'Bundle Recipes', infra_step=True,
31 cmd=['python', recipes_py, 'bundle', '--destination', bundle_dir])
32
Eric Boren8b3f9e62017-04-04 09:06:16 -040033 api.run.check_failure()
34
35
36def GenTests(api):
37 yield (
38 api.test('BundleRecipes') +
39 api.properties(buildername='Housekeeper-PerCommit-BundleRecipes',
40 mastername='fake-master',
41 slavename='fake-slave',
42 buildnumber=5,
43 repository='https://skia.googlesource.com/skia.git',
44 revision='abc123',
45 path_config='kitchen',
Eric Boren43b9c6b2017-04-06 07:53:30 -040046 swarm_out_dir='[SWARM_OUT_DIR]',
47 nobuildbot='True',
48 patch_issue='10101',
49 patch_set='3') +
Eric Boren8b3f9e62017-04-04 09:06:16 -040050 api.path.exists(
51 api.path['start_dir'].join('tmp', 'uninteresting_hashes.txt')
52 )
53 )