| 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.Placeholder): | 10 class TestLauncherFilterFileInputPlaceholder(recipe_util.Placeholder): |
| (...skipping 422 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 433 allow_subannotations=True, | 433 allow_subannotations=True, |
| 434 env=self.get_env(), | 434 env=self.get_env(), |
| 435 **kwargs) | 435 **kwargs) |
| 436 return step_result.json.output['clang_revision'] | 436 return step_result.json.output['clang_revision'] |
| 437 | 437 |
| 438 | 438 |
| 439 @property | 439 @property |
| 440 def is_release_build(self): | 440 def is_release_build(self): |
| 441 return self.c.BUILD_CONFIG == 'Release' | 441 return self.c.BUILD_CONFIG == 'Release' |
| 442 | 442 |
| 443 def run_telemetry_test(self, runner, test, name, args=None, |
| 444 prefix_args=None, results_directory='', |
| 445 spawn_dbus=False, revision=None, webkit_revision=None, |
| 446 master_class_name=None, **kwargs): |
| 447 """Runs a Telemetry based test with 'runner' as the executable. |
| 448 Automatically passes certain flags like --output-format=gtest to the |
| 449 test runner. 'prefix_args' are passed before the built-in arguments and |
| 450 'args'.""" |
| 451 # Choose a reasonable default for the location of the sandbox binary |
| 452 # on the bots. |
| 453 env = {} |
| 454 if self.m.platform.is_linux: |
| 455 env['CHROME_DEVEL_SANDBOX'] = self.m.path.join( |
| 456 '/opt', 'chromium', 'chrome_sandbox') |
| 457 |
| 458 # The step name must end in 'test' or 'tests' in order for the results to |
| 459 # automatically show up on the flakiness dashboard. |
| 460 if not (name.endswith('test') or name.endswith('tests')): |
| 461 name = '%s_tests' % name |
| 462 |
| 463 test_args = [] |
| 464 if prefix_args: |
| 465 test_args.extend(prefix_args) |
| 466 test_args.extend([test, |
| 467 '--show-stdout', |
| 468 '--output-format=gtest', |
| 469 '--browser=%s' % self.c.build_config_fs.lower()]) |
| 470 if args: |
| 471 test_args.extend(args) |
| 472 |
| 473 if not results_directory: |
| 474 results_directory = self.m.path['slave_build'].join('gtest-results', name) |
| 475 |
| 476 return self.runtest( |
| 477 runner, |
| 478 test_args, |
| 479 annotate='gtest', |
| 480 name=name, |
| 481 test_type=name, |
| 482 generate_json_file=True, |
| 483 results_directory=results_directory, |
| 484 python_mode=True, |
| 485 spawn_dbus=spawn_dbus, |
| 486 revision=revision, |
| 487 webkit_revision=webkit_revision, |
| 488 master_class_name=master_class_name, |
| 489 env=env, |
| 490 **kwargs) |
| 491 |
| 443 def run_telemetry_benchmark(self, benchmark_name, cmd_args=None, env=None): | 492 def run_telemetry_benchmark(self, benchmark_name, cmd_args=None, env=None): |
| 444 cmd_args = cmd_args or [] | 493 cmd_args = cmd_args or [] |
| 445 args = [ | 494 args = [ |
| 446 '--browser=%s' % self.c.build_config_fs.lower(), | 495 '--browser=%s' % self.c.build_config_fs.lower(), |
| 447 benchmark_name | 496 benchmark_name |
| 448 ] | 497 ] |
| 449 return self.m.python( | 498 return self.m.python( |
| 450 'Telemetry benchmark: %s' % benchmark_name, | 499 'Telemetry benchmark: %s' % benchmark_name, |
| 451 self.m.path['checkout'].join('tools', 'perf', 'run_benchmark'), | 500 self.m.path['checkout'].join('tools', 'perf', 'run_benchmark'), |
| 452 args=cmd_args + args, | 501 args=cmd_args + args, |
| (...skipping 262 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 715 args=[ | 764 args=[ |
| 716 '27eac9b2869ef6c89391f305a3f01285ea317867', | 765 '27eac9b2869ef6c89391f305a3f01285ea317867', |
| 717 '9d9a93134b3eabd003b85b4e7dea06c0eae150ed', | 766 '9d9a93134b3eabd003b85b4e7dea06c0eae150ed', |
| 718 ]) | 767 ]) |
| 719 | 768 |
| 720 def download_lto_plugin(self): | 769 def download_lto_plugin(self): |
| 721 return self.m.python( | 770 return self.m.python( |
| 722 name='download LTO plugin', | 771 name='download LTO plugin', |
| 723 script=self.m.path['checkout'].join( | 772 script=self.m.path['checkout'].join( |
| 724 'build', 'download_gold_plugin.py')) | 773 'build', 'download_gold_plugin.py')) |
| OLD | NEW |