Chromium Code Reviews| 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): | |
| 217 """Runs an isolated test.""" | |
| 218 self.m.python( | |
| 219 name, | |
| 220 self._run_isolated_path, | |
| 221 [ | |
| 222 '--isolated', isolate_hash, | |
| 223 '-I', self.isolate_server, | |
| 224 '--verbose', | |
|
M-A Ruel
2015/09/29 12:21:39
Remove, unless it's to test out then remove later.
Paweł Hajdan Jr.
2015/09/29 12:25:40
It's intentional - and as discussed offline, my un
| |
| 225 '--', | |
|
M-A Ruel
2015/09/29 12:21:39
Personally, I'd prefer '--' to not be added when a
Paweł Hajdan Jr.
2015/09/29 12:25:40
Done.
| |
| 226 ] + (args or [])) | |
| 227 | |
| 216 def runtest(self, test, revision, webkit_revision, args=None, name=None, | 228 def runtest(self, test, revision, webkit_revision, args=None, name=None, |
| 217 **runtest_kwargs): | 229 **runtest_kwargs): |
| 218 """Runs a test which has previously been isolated to the server. | 230 """Runs a test which has previously been isolated to the server. |
| 219 | 231 |
| 220 Uses runtest_args_list, above, and delegates to api.chromium.runtest. | 232 Uses runtest_args_list, above, and delegates to api.chromium.runtest. |
| 233 | |
| 234 DEPRECATED - run_isolated above is strongly recommended for all new callers. | |
| 221 """ | 235 """ |
| 222 self.m.chromium.runtest( | 236 self.m.chromium.runtest( |
| 223 self._run_isolated_path, | 237 self._run_isolated_path, |
| 224 args=self.runtest_args_list(test, args), | 238 args=self.runtest_args_list(test, args), |
| 225 # We must use the name of the test as the name in order to avoid | 239 # We must use the name of the test as the name in order to avoid |
| 226 # duplicate steps called "run_isolated". | 240 # duplicate steps called "run_isolated". |
| 227 name=name or test, | 241 name=name or test, |
| 228 revision=revision, | 242 revision=revision, |
| 229 webkit_revision=webkit_revision, | 243 webkit_revision=webkit_revision, |
| 230 **runtest_kwargs) | 244 **runtest_kwargs) |
| (...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 268 """Compare the artifacts from 2 builds.""" | 282 """Compare the artifacts from 2 builds.""" |
| 269 args = [ | 283 args = [ |
| 270 '--first-build-dir', first_dir, | 284 '--first-build-dir', first_dir, |
| 271 '--second-build-dir', second_dir, | 285 '--second-build-dir', second_dir, |
| 272 '--target-platform', self.m.chromium.c.TARGET_PLATFORM | 286 '--target-platform', self.m.chromium.c.TARGET_PLATFORM |
| 273 ] | 287 ] |
| 274 self.m.python('compare_build_artifacts', | 288 self.m.python('compare_build_artifacts', |
| 275 self.resource('compare_build_artifacts.py'), | 289 self.resource('compare_build_artifacts.py'), |
| 276 args=args, | 290 args=args, |
| 277 cwd=self.m.path['slave_build']) | 291 cwd=self.m.path['slave_build']) |
| OLD | NEW |