Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(350)

Side by Side Diff: infra/bots/recipes/swarm_presubmit.py

Issue 2395573003: Presubmit: Always run recipe test and gen_tasks test on commit (Closed)
Patch Set: rebase Created 4 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « PRESUBMIT.py ('k') | infra/bots/recipes/swarm_presubmit.expected/presubmit.json » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 # Copyright 2016 The Chromium Authors. All rights reserved. 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 2 # Use of this source code is governed by a BSD-style license that can be
3 # found in the LICENSE file. 3 # found in the LICENSE file.
4 4
5 5
6 # Recipe which runs the Skia presubmit. 6 # Recipe which runs the Skia presubmit.
7 7
8 8
9 DEPS = [ 9 DEPS = [
10 'build/file',
10 'core', 11 'core',
11 'depot_tools/depot_tools', 12 'depot_tools/depot_tools',
12 'recipe_engine/path', 13 'recipe_engine/path',
13 'recipe_engine/properties', 14 'recipe_engine/properties',
14 'recipe_engine/step', 15 'recipe_engine/step',
15 'recipe_engine/uuid', 16 'recipe_engine/uuid',
16 'vars', 17 'vars',
17 ] 18 ]
18 19
19 20
20 def RunSteps(api): 21 def RunSteps(api):
21 api.vars.setup() 22 api.vars.setup()
22 api.core.checkout_steps() 23 api.core.checkout_steps()
23 24
25 # Create a local GOPATH.
26 gopath = api.vars.slave_dir.join('gopath')
27 if not api.path.exists(gopath):
28 api.file.makedirs('gopath', gopath)
29
24 api.step('git status', 30 api.step('git status',
25 cmd=['git', 'status'], 31 cmd=['git', 'status'],
26 cwd=api.vars.skia_dir) 32 cwd=api.vars.skia_dir)
27 33
28 depot_tools_path = api.depot_tools.package_repo_resource() 34 depot_tools_path = api.depot_tools.package_repo_resource()
29 script = depot_tools_path.join('presubmit_support.py') 35 script = depot_tools_path.join('presubmit_support.py')
30 env = {'PATH': api.path.pathsep.join([str(depot_tools_path), '%(PATH)s'])} 36 env = {
37 'PATH': api.path.pathsep.join([str(depot_tools_path), '%(PATH)s']),
38 'GOPATH': str(gopath),
39 }
31 # TODO(borenet): --upstream=HEAD^ is a hack to force presubmit_support to 40 # TODO(borenet): --upstream=HEAD^ is a hack to force presubmit_support to
32 # find a diff. Otherwise, it quits early with: 41 # find a diff. Otherwise, it quits early with:
33 # "Warning, no PRESUBMIT.py found." 42 # "Warning, no PRESUBMIT.py found."
34 api.step('presubmit', 43 api.step('presubmit',
35 cmd=[script, '--commit', '--upstream=HEAD^', '-v', '-v'], 44 cmd=[script, '--commit', '--upstream=HEAD^', '-v', '-v'],
36 cwd=api.vars.skia_dir, 45 cwd=api.vars.skia_dir,
37 env=env) 46 env=env)
38 47
39 48
40 def GenTests(api): 49 def GenTests(api):
41 yield ( 50 yield (
42 api.test('presubmit') + 51 api.test('presubmit') +
43 api.properties(buildername='Housekeeper-PerCommit-Presubmit', 52 api.properties(buildername='Housekeeper-PerCommit-Presubmit',
44 mastername='client.skia.fyi', 53 mastername='client.skia.fyi',
45 slavename='dummy-slave', 54 slavename='dummy-slave',
46 buildnumber=5, 55 buildnumber=5,
47 revision='abc123', 56 revision='abc123',
48 path_config='kitchen', 57 path_config='kitchen',
49 swarm_out_dir='[SWARM_OUT_DIR]') 58 swarm_out_dir='[SWARM_OUT_DIR]')
50 ) 59 )
OLDNEW
« no previous file with comments | « PRESUBMIT.py ('k') | infra/bots/recipes/swarm_presubmit.expected/presubmit.json » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698