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

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

Issue 2352653002: GN: remove old Android recipe code. (Closed)
Patch Set: missing json Created 4 years, 3 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
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 97 matching lines...) Expand 10 before | Expand all | Expand 10 after
108 path = os.path.join(src, pattern) 108 path = os.path.join(src, pattern)
109 for f in glob.glob(path): 109 for f in glob.glob(path):
110 dst_path = os.path.join(dst, os.path.relpath(f, src)) 110 dst_path = os.path.join(dst, os.path.relpath(f, src))
111 if not os.path.isdir(os.path.dirname(dst_path)): 111 if not os.path.isdir(os.path.dirname(dst_path)):
112 os.makedirs(os.path.dirname(dst_path)) 112 os.makedirs(os.path.dirname(dst_path))
113 print 'Copying build product %%s to %%s' %% (f, dst_path) 113 print 'Copying build product %%s to %%s' %% (f, dst_path)
114 shutil.move(f, dst_path) 114 shutil.move(f, dst_path)
115 ''' % str(BUILD_PRODUCTS_ISOLATE_WHITELIST), 115 ''' % str(BUILD_PRODUCTS_ISOLATE_WHITELIST),
116 args=[src, dst], 116 args=[src, dst],
117 infra_step=True) 117 infra_step=True)
118
119 def ccache(self):
120 if not self._checked_for_ccache:
121 self._checked_for_ccache = True
122 if not self.m.platform.is_win:
123 result = self(
124 self.m.python.inline,
125 name='has ccache?',
126 program='''import json
127 import subprocess
128 import sys
129
130 ccache = None
131 try:
132 ccache = subprocess.check_output(['which', 'ccache']).rstrip()
133 except:
134 pass
135 print json.dumps({'ccache': ccache})
136 ''',
137 stdout=self.m.json.output(),
138 infra_step=True,
139 abort_on_failure=False,
140 fail_build_on_failure=False)
141 if result and result.stdout and result.stdout.get('ccache'):
142 self._ccache = result.stdout['ccache']
143
144 return self._ccache
OLDNEW
« no previous file with comments | « infra/bots/recipe_modules/flavor/gn_android_flavor.py ('k') | infra/bots/recipes/swarm_compile.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698