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

Side by Side Diff: scripts/slave/recipe_modules/ios/api.py

Issue 957493002: Add analyze steps to iOS try bot builds which use ninja (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/tools/build
Patch Set: Created 5 years, 9 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 | Annotate | Revision Log
OLDNEW
1 # Copyright 2015 The Chromium Authors. All rights reserved. 1 # Copyright 2015 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 from slave import recipe_api 5 from slave import recipe_api
6 6
7 7
8 class iOSApi(recipe_api.RecipeApi): 8 class iOSApi(recipe_api.RecipeApi):
9 def __init__(self, *args, **kwargs): 9 def __init__(self, *args, **kwargs):
10 super(iOSApi, self).__init__(*args, **kwargs) 10 super(iOSApi, self).__init__(*args, **kwargs)
(...skipping 104 matching lines...) Expand 10 before | Expand all | Expand 10 after
115 self.m.path['build'].join( 115 self.m.path['build'].join(
116 'scripts', 116 'scripts',
117 'slave', 117 'slave',
118 'ios', 118 'ios',
119 'find_xcode.py', 119 'find_xcode.py',
120 ), 120 ),
121 '--json-file', self.m.json.output(), 121 '--json-file', self.m.json.output(),
122 '--version', self.__config['xcode version'], 122 '--version', self.__config['xcode version'],
123 ], step_test_data=lambda: self.m.json.test_api.output({})) 123 ], step_test_data=lambda: self.m.json.test_api.output({}))
124 124
125 def build(self, official=False): 125 def build(self):
smut 2015/02/24 19:37:01 We were only using the official kwarg downstream.
126 """Builds from this bot's build config.""" 126 """Builds from this bot's build config."""
127 assert self.__config is not None 127 assert self.__config is not None
128 128
129 # Add the default GYP_DEFINES. 129 # Add the default GYP_DEFINES.
130 gyp_defines = [ 130 gyp_defines = [
131 'component=static_library', 131 'component=static_library',
132 'OS=ios', 132 'OS=ios',
133 ] 133 ]
134 134
135 gyp_defines.extend( 135 gyp_defines.extend(
(...skipping 28 matching lines...) Expand all
164 'device': 'iphoneos', 164 'device': 'iphoneos',
165 }[self.platform]) 165 }[self.platform])
166 ) 166 )
167 cmd = ['ninja', '-C', cwd] 167 cmd = ['ninja', '-C', cwd]
168 168
169 step_result = self.m.gclient.runhooks(env=env) 169 step_result = self.m.gclient.runhooks(env=env)
170 step_result.presentation.step_text = ( 170 step_result.presentation.step_text = (
171 '<br />GYP_DEFINES:<br />%s' % '<br />'.join(gyp_defines) 171 '<br />GYP_DEFINES:<br />%s' % '<br />'.join(gyp_defines)
172 ) 172 )
173 173
174 if self.compiler == 'ninja' and self.m.tryserver.is_tryserver:
175 tests = [test['app'] for test in self.__config['tests']]
176 self.m.filter.does_patch_require_compile(
Paweł Hajdan Jr. 2015/02/25 15:23:37 Consider using "analyze" from chromium_tests. It a
smut 2015/02/25 18:46:49 Done.
177 compile_targets=tests,
178 exes=tests,
179 set_env=False,
180 )
181
182 if self.m.filter.result:
183 self.m.step('matching exes', ['echo'] + self.m.filter.matching_exes)
184 self.m.step('compile targets', ['echo'] + self.m.filter.compile_targets)
185 self.m.step('paths', ['echo'] + self.m.filter.paths)
186
174 self.m.step('compile', cmd, cwd=cwd) 187 self.m.step('compile', cmd, cwd=cwd)
175 188
176 def test(self, *args): 189 def test(self, *args):
177 """Runs tests as instructed by this bot's build config. 190 """Runs tests as instructed by this bot's build config.
178 191
179 Args: 192 Args:
180 *args: Any additional arguments to pass to the test harness. 193 *args: Any additional arguments to pass to the test harness.
181 """ 194 """
182 assert self.__config is not None 195 assert self.__config is not None
183 test_failures = [] 196 test_failures = []
(...skipping 125 matching lines...) Expand 10 before | Expand all | Expand 10 after
309 self.configuration, 322 self.configuration,
310 'iossim', 323 'iossim',
311 ), 324 ),
312 'ninja': self.m.path.join( 325 'ninja': self.m.path.join(
313 'src', 326 'src',
314 build_dir, 327 build_dir,
315 '%s-%s' % (self.configuration, platform), 328 '%s-%s' % (self.configuration, platform),
316 'iossim', 329 'iossim',
317 ), 330 ),
318 }[self.compiler] 331 }[self.compiler]
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698