OLD | NEW |
1 # Copyright 2014 The Chromium Authors. All rights reserved. | 1 # Copyright 2014 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 recipe_engine import recipe_api | 5 from recipe_engine import recipe_api |
6 | 6 |
7 | 7 |
8 class IsolateApi(recipe_api.RecipeApi): | 8 class IsolateApi(recipe_api.RecipeApi): |
9 """APIs for interacting with isolates.""" | 9 """APIs for interacting with isolates.""" |
10 | 10 |
(...skipping 195 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
206 # Always append '--' to the argument list. api.chromium.runtest | 206 # Always append '--' to the argument list. api.chromium.runtest |
207 # will add any flags like --gtest_output to the end of the command | 207 # will add any flags like --gtest_output to the end of the command |
208 # line. run_isolated.py must treat these as extra arguments to the | 208 # line. run_isolated.py must treat these as extra arguments to the |
209 # isolate. | 209 # isolate. |
210 '--' | 210 '--' |
211 ] | 211 ] |
212 if args: | 212 if args: |
213 full_args.extend(args) | 213 full_args.extend(args) |
214 return full_args | 214 return full_args |
215 | 215 |
216 def run_isolated(self, name, isolate_hash, args=None): | 216 def run_isolated(self, name, isolate_hash, args=None, **kwargs): |
217 """Runs an isolated test.""" | 217 """Runs an isolated test.""" |
218 cmd = [ | 218 cmd = [ |
219 '--isolated', isolate_hash, | 219 '--isolated', isolate_hash, |
220 '-I', self.isolate_server, | 220 '-I', self.isolate_server, |
221 '--verbose', | 221 '--verbose', |
222 ] | 222 ] |
223 if args: | 223 if args: |
224 cmd.append('--') | 224 cmd.append('--') |
225 cmd.extend(args) | 225 cmd.extend(args) |
226 self.m.python(name, self._run_isolated_path, cmd) | 226 self.m.python(name, self._run_isolated_path, cmd, **kwargs) |
227 | 227 |
228 def runtest(self, test, revision, webkit_revision, args=None, name=None, | 228 def runtest(self, test, revision, webkit_revision, args=None, name=None, |
229 **runtest_kwargs): | 229 **runtest_kwargs): |
230 """Runs a test which has previously been isolated to the server. | 230 """Runs a test which has previously been isolated to the server. |
231 | 231 |
232 Uses runtest_args_list, above, and delegates to api.chromium.runtest. | 232 Uses runtest_args_list, above, and delegates to api.chromium.runtest. |
233 | 233 |
234 DEPRECATED - run_isolated above is strongly recommended for all new callers. | 234 DEPRECATED - run_isolated above is strongly recommended for all new callers. |
235 """ | 235 """ |
236 self.m.chromium.runtest( | 236 self.m.chromium.runtest( |
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
282 """Compare the artifacts from 2 builds.""" | 282 """Compare the artifacts from 2 builds.""" |
283 args = [ | 283 args = [ |
284 '--first-build-dir', first_dir, | 284 '--first-build-dir', first_dir, |
285 '--second-build-dir', second_dir, | 285 '--second-build-dir', second_dir, |
286 '--target-platform', self.m.chromium.c.TARGET_PLATFORM | 286 '--target-platform', self.m.chromium.c.TARGET_PLATFORM |
287 ] | 287 ] |
288 self.m.python('compare_build_artifacts', | 288 self.m.python('compare_build_artifacts', |
289 self.resource('compare_build_artifacts.py'), | 289 self.resource('compare_build_artifacts.py'), |
290 args=args, | 290 args=args, |
291 cwd=self.m.path['slave_build']) | 291 cwd=self.m.path['slave_build']) |
OLD | NEW |