| OLD | NEW |
| 1 # Copyright 2013 The Chromium Authors. All rights reserved. | 1 # Copyright 2013 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 import re | 5 import re |
| 6 | 6 |
| 7 from recipe_engine import recipe_api | 7 from recipe_engine import recipe_api |
| 8 from recipe_engine import util as recipe_util | 8 from recipe_engine import util as recipe_util |
| 9 | 9 |
| 10 class TestLauncherFilterFileInputPlaceholder(recipe_util.InputPlaceholder): | 10 class TestLauncherFilterFileInputPlaceholder(recipe_util.InputPlaceholder): |
| (...skipping 336 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 347 raise self.m.step.InfraFailure('Infra compile failure: %s' % e) | 347 raise self.m.step.InfraFailure('Infra compile failure: %s' % e) |
| 348 | 348 |
| 349 raise e | 349 raise e |
| 350 | 350 |
| 351 @recipe_util.returns_placeholder | 351 @recipe_util.returns_placeholder |
| 352 def test_launcher_filter(self, tests): | 352 def test_launcher_filter(self, tests): |
| 353 return TestLauncherFilterFileInputPlaceholder(self, tests) | 353 return TestLauncherFilterFileInputPlaceholder(self, tests) |
| 354 | 354 |
| 355 def runtest(self, test, args=None, xvfb=False, name=None, annotate=None, | 355 def runtest(self, test, args=None, xvfb=False, name=None, annotate=None, |
| 356 results_url=None, perf_dashboard_id=None, test_type=None, | 356 results_url=None, perf_dashboard_id=None, test_type=None, |
| 357 python_mode=False, spawn_dbus=True, parallel=False, | 357 python_mode=False, parallel=False, |
| 358 point_id=None, revision=None, webkit_revision=None, | 358 point_id=None, revision=None, webkit_revision=None, |
| 359 test_launcher_summary_output=None, flakiness_dash=None, | 359 test_launcher_summary_output=None, flakiness_dash=None, |
| 360 perf_id=None, perf_config=None, chartjson_file=False, | 360 perf_id=None, perf_config=None, chartjson_file=False, |
| 361 disable_src_side_runtest_py=False, **kwargs): | 361 disable_src_side_runtest_py=False, **kwargs): |
| 362 """Return a runtest.py invocation.""" | 362 """Return a runtest.py invocation.""" |
| 363 args = args or [] | 363 args = args or [] |
| 364 assert isinstance(args, list) | 364 assert isinstance(args, list) |
| 365 | 365 |
| 366 t_name, ext = self.m.path.splitext(self.m.path.basename(test)) | 366 t_name, ext = self.m.path.splitext(self.m.path.basename(test)) |
| 367 if not python_mode and self.m.platform.is_win and ext == '': | 367 if not python_mode and self.m.platform.is_win and ext == '': |
| (...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 417 # These properties are specified on every bot, so pass them down | 417 # These properties are specified on every bot, so pass them down |
| 418 # unconditionally. | 418 # unconditionally. |
| 419 full_args.append('--builder-name=%s' % self.m.properties['buildername']) | 419 full_args.append('--builder-name=%s' % self.m.properties['buildername']) |
| 420 full_args.append('--slave-name=%s' % self.m.properties['slavename']) | 420 full_args.append('--slave-name=%s' % self.m.properties['slavename']) |
| 421 # A couple of the recipes contain tests which don't specify a buildnumber, | 421 # A couple of the recipes contain tests which don't specify a buildnumber, |
| 422 # so make this optional. | 422 # so make this optional. |
| 423 if self.m.properties.get('buildnumber') is not None: | 423 if self.m.properties.get('buildnumber') is not None: |
| 424 full_args.append('--build-number=%s' % self.m.properties['buildnumber']) | 424 full_args.append('--build-number=%s' % self.m.properties['buildnumber']) |
| 425 if ext == '.py' or python_mode: | 425 if ext == '.py' or python_mode: |
| 426 full_args.append('--run-python-script') | 426 full_args.append('--run-python-script') |
| 427 if not spawn_dbus: | |
| 428 full_args.append('--no-spawn-dbus') | |
| 429 if point_id: | 427 if point_id: |
| 430 full_args.append('--point-id=%d' % point_id) | 428 full_args.append('--point-id=%d' % point_id) |
| 431 if revision: | 429 if revision: |
| 432 full_args.append('--revision=%s' % revision) | 430 full_args.append('--revision=%s' % revision) |
| 433 if webkit_revision: | 431 if webkit_revision: |
| 434 # TODO(kbr): figure out how to cover this line of code with | 432 # TODO(kbr): figure out how to cover this line of code with |
| 435 # tests after the removal of the GPU recipe. crbug.com/584469 | 433 # tests after the removal of the GPU recipe. crbug.com/584469 |
| 436 full_args.append( | 434 full_args.append( |
| 437 '--webkit-revision=%s' % webkit_revision) # pragma: no cover | 435 '--webkit-revision=%s' % webkit_revision) # pragma: no cover |
| 438 | 436 |
| (...skipping 464 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 903 })) | 901 })) |
| 904 | 902 |
| 905 def get_annotate_by_test_name(self, test_name): | 903 def get_annotate_by_test_name(self, test_name): |
| 906 return 'graphing' | 904 return 'graphing' |
| 907 | 905 |
| 908 def download_lto_plugin(self): | 906 def download_lto_plugin(self): |
| 909 return self.m.python( | 907 return self.m.python( |
| 910 name='download LTO plugin', | 908 name='download LTO plugin', |
| 911 script=self.m.path['checkout'].join( | 909 script=self.m.path['checkout'].join( |
| 912 'build', 'download_gold_plugin.py')) | 910 'build', 'download_gold_plugin.py')) |
| OLD | NEW |