| 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 contextlib | 5 import contextlib |
| 6 import datetime | 6 import datetime |
| 7 import json | 7 import json |
| 8 import os | 8 import os |
| 9 import re | 9 import re |
| 10 import sys | 10 import sys |
| (...skipping 660 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 671 **kwargs) | 671 **kwargs) |
| 672 | 672 |
| 673 | 673 |
| 674 def _run_sharded_tests(self, | 674 def _run_sharded_tests(self, |
| 675 config='sharded_perf_tests.json', | 675 config='sharded_perf_tests.json', |
| 676 flaky_config=None, | 676 flaky_config=None, |
| 677 chartjson_output=False, | 677 chartjson_output=False, |
| 678 max_battery_temp=None, | 678 max_battery_temp=None, |
| 679 known_devices_file=None, | 679 known_devices_file=None, |
| 680 enable_platform_mode=False, | 680 enable_platform_mode=False, |
| 681 write_buildbot_json=False, |
| 681 **kwargs): | 682 **kwargs): |
| 682 args = [ | 683 args = [ |
| 683 'perf', | 684 'perf', |
| 684 '--release', | 685 '--release', |
| 685 '--verbose', | 686 '--verbose', |
| 686 '--steps', config, | 687 '--steps', config, |
| 687 '--blacklist-file', self.blacklist_file | 688 '--blacklist-file', self.blacklist_file |
| 688 ] | 689 ] |
| 689 if flaky_config: | 690 if flaky_config: |
| 690 args.extend(['--flaky-steps', flaky_config]) | 691 args.extend(['--flaky-steps', flaky_config]) |
| 691 if chartjson_output: | 692 if chartjson_output: |
| 692 args.append('--collect-chartjson-data') | 693 args.append('--collect-chartjson-data') |
| 693 if max_battery_temp: | 694 if max_battery_temp: |
| 694 args.extend(['--max-battery-temp', max_battery_temp]) | 695 args.extend(['--max-battery-temp', max_battery_temp]) |
| 695 if known_devices_file: | 696 if known_devices_file: |
| 696 args.extend(['--known-devices-file', known_devices_file]) | 697 args.extend(['--known-devices-file', known_devices_file]) |
| 697 if enable_platform_mode: | 698 if enable_platform_mode: |
| 698 args.extend(['--enable-platform-mode']) | 699 args.extend(['--enable-platform-mode']) |
| 700 if write_buildbot_json: |
| 701 args.extend(['--write-buildbot-json']) |
| 699 | 702 |
| 700 self.test_runner( | 703 self.test_runner( |
| 701 'Sharded Perf Tests', | 704 'Sharded Perf Tests', |
| 702 args, | 705 args, |
| 703 cwd=self.m.path['checkout'], | 706 cwd=self.m.path['checkout'], |
| 704 env=self.m.chromium.get_env(), | 707 env=self.m.chromium.get_env(), |
| 705 **kwargs) | 708 **kwargs) |
| 706 | 709 |
| 707 def run_sharded_perf_tests(self, config, flaky_config=None, perf_id=None, | 710 def run_sharded_perf_tests(self, config, flaky_config=None, perf_id=None, |
| 708 test_type_transform=lambda x: x, | 711 test_type_transform=lambda x: x, |
| (...skipping 760 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1469 script = self.c.test_runner | 1472 script = self.c.test_runner |
| 1470 if wrapper_script_suite_name: | 1473 if wrapper_script_suite_name: |
| 1471 script = self.m.chromium.output_dir.join('bin', 'run_%s' % | 1474 script = self.m.chromium.output_dir.join('bin', 'run_%s' % |
| 1472 wrapper_script_suite_name) | 1475 wrapper_script_suite_name) |
| 1473 else: | 1476 else: |
| 1474 env = kwargs.get('env', {}) | 1477 env = kwargs.get('env', {}) |
| 1475 env['CHROMIUM_OUTPUT_DIR'] = env.get('CHROMIUM_OUTPUT_DIR', | 1478 env['CHROMIUM_OUTPUT_DIR'] = env.get('CHROMIUM_OUTPUT_DIR', |
| 1476 self.m.chromium.output_dir) | 1479 self.m.chromium.output_dir) |
| 1477 kwargs['env'] = env | 1480 kwargs['env'] = env |
| 1478 return self.m.python(step_name, script, args, **kwargs) | 1481 return self.m.python(step_name, script, args, **kwargs) |
| OLD | NEW |