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

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

Issue 2221413002: Move ct_skps recipe from tools repo to Skia repo (Closed) Base URL: https://skia.googlesource.com/skia@master
Patch Set: Address comments 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 | « infra/bots/recipe_modules/ct/api.py ('k') | infra/bots/recipe_modules/vars/api.py » ('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 # 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
11 11
12 BUILD_PRODUCTS_ISOLATE_WHITELIST = [ 12 BUILD_PRODUCTS_ISOLATE_WHITELIST = [
13 'dm', 13 'dm',
14 'dm.exe', 14 'dm.exe',
15 'get_images_from_skps',
16 'get_images_from_skps.exe',
15 'nanobench', 17 'nanobench',
16 'nanobench.exe', 18 'nanobench.exe',
17 '*.so', 19 '*.so',
18 '*.dll', 20 '*.dll',
19 '*.dylib', 21 '*.dylib',
20 'skia_launcher', 22 'skia_launcher',
21 'lib/*.so', 23 'lib/*.so',
22 'iOSShell.app', 24 'iOSShell.app',
23 'iOSShell.ipa', 25 'iOSShell.ipa',
24 'visualbench', 26 'visualbench',
(...skipping 30 matching lines...) Expand all
55 return self.m.file.read(name, filename, infra_step=True, *args, **kwargs) 57 return self.m.file.read(name, filename, infra_step=True, *args, **kwargs)
56 58
57 def writefile(self, filename, contents): 59 def writefile(self, filename, contents):
58 """Convenience function for writing files.""" 60 """Convenience function for writing files."""
59 return self.m.file.write('write %s' % self.m.path.basename(filename), 61 return self.m.file.write('write %s' % self.m.path.basename(filename),
60 filename, contents, infra_step=True) 62 filename, contents, infra_step=True)
61 63
62 def rmtree(self, path): 64 def rmtree(self, path):
63 """Wrapper around api.file.rmtree with environment fix.""" 65 """Wrapper around api.file.rmtree with environment fix."""
64 env = {} 66 env = {}
65 env['PYTHONPATH'] = str(self.m.path['checkout'].join( 67 env['PYTHONPATH'] = str(self.m.path['slave_build'].join(
66 'infra', 'bots', '.recipe_deps', 'build', 'scripts')) 68 'skia', 'infra', 'bots', '.recipe_deps', 'build', 'scripts'))
67 self.m.file.rmtree(self.m.path.basename(path), 69 self.m.file.rmtree(self.m.path.basename(path),
68 path, 70 path,
69 env=env, 71 env=env,
70 infra_step=True) 72 infra_step=True)
71 73
72 def __call__(self, steptype, name, abort_on_failure=True, 74 def __call__(self, steptype, name, abort_on_failure=True,
73 fail_build_on_failure=True, env=None, **kwargs): 75 fail_build_on_failure=True, env=None, **kwargs):
74 """Run a step. If it fails, keep going but mark the build status failed.""" 76 """Run a step. If it fails, keep going but mark the build status failed."""
75 env = dict(env or {}) 77 env = dict(env or {})
76 env.update(self.m.vars.default_env) 78 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}) 135 print json.dumps({'ccache': ccache})
134 ''', 136 ''',
135 stdout=self.m.json.output(), 137 stdout=self.m.json.output(),
136 infra_step=True, 138 infra_step=True,
137 abort_on_failure=False, 139 abort_on_failure=False,
138 fail_build_on_failure=False) 140 fail_build_on_failure=False)
139 if result and result.stdout and result.stdout.get('ccache'): 141 if result and result.stdout and result.stdout.get('ccache'):
140 self._ccache = result.stdout['ccache'] 142 self._ccache = result.stdout['ccache']
141 143
142 return self._ccache 144 return self._ccache
OLDNEW
« no previous file with comments | « infra/bots/recipe_modules/ct/api.py ('k') | infra/bots/recipe_modules/vars/api.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698