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

Side by Side Diff: infra/bots/recipe_modules/run/api.py

Issue 2221423002: Use slave_build instead of checkout in run/api.py (Closed) Base URL: https://skia.googlesource.com/skia@master
Patch Set: Initial upload Created 4 years, 4 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 | « no previous file | no next file » | 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 # pylint: disable=W0201 6 # pylint: disable=W0201
7 7
8 8
9 from recipe_engine import recipe_api 9 from recipe_engine import recipe_api
10 10
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after
55 return self.m.file.read(name, filename, infra_step=True, *args, **kwargs) 55 return self.m.file.read(name, filename, infra_step=True, *args, **kwargs)
56 56
57 def writefile(self, filename, contents): 57 def writefile(self, filename, contents):
58 """Convenience function for writing files.""" 58 """Convenience function for writing files."""
59 return self.m.file.write('write %s' % self.m.path.basename(filename), 59 return self.m.file.write('write %s' % self.m.path.basename(filename),
60 filename, contents, infra_step=True) 60 filename, contents, infra_step=True)
61 61
62 def rmtree(self, path): 62 def rmtree(self, path):
63 """Wrapper around api.file.rmtree with environment fix.""" 63 """Wrapper around api.file.rmtree with environment fix."""
64 env = {} 64 env = {}
65 env['PYTHONPATH'] = str(self.m.path['checkout'].join( 65 env['PYTHONPATH'] = str(self.m.path['slave_build'].join(
66 'infra', 'bots', '.recipe_deps', 'build', 'scripts')) 66 'skia', 'infra', 'bots', '.recipe_deps', 'build', 'scripts'))
67 self.m.file.rmtree(self.m.path.basename(path), 67 self.m.file.rmtree(self.m.path.basename(path),
68 path, 68 path,
69 env=env, 69 env=env,
70 infra_step=True) 70 infra_step=True)
71 71
72 def __call__(self, steptype, name, abort_on_failure=True, 72 def __call__(self, steptype, name, abort_on_failure=True,
73 fail_build_on_failure=True, env=None, **kwargs): 73 fail_build_on_failure=True, env=None, **kwargs):
74 """Run a step. If it fails, keep going but mark the build status failed.""" 74 """Run a step. If it fails, keep going but mark the build status failed."""
75 env = dict(env or {}) 75 env = dict(env or {})
76 env.update(self.m.vars.default_env) 76 env.update(self.m.vars.default_env)
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after
133 print json.dumps({'ccache': ccache}) 133 print json.dumps({'ccache': ccache})
134 ''', 134 ''',
135 stdout=self.m.json.output(), 135 stdout=self.m.json.output(),
136 infra_step=True, 136 infra_step=True,
137 abort_on_failure=False, 137 abort_on_failure=False,
138 fail_build_on_failure=False) 138 fail_build_on_failure=False)
139 if result and result.stdout and result.stdout.get('ccache'): 139 if result and result.stdout and result.stdout.get('ccache'):
140 self._ccache = result.stdout['ccache'] 140 self._ccache = result.stdout['ccache']
141 141
142 return self._ccache 142 return self._ccache
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698