| 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 925 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 936 print l | 936 print l |
| 937 os.remove(report) | 937 os.remove(report) |
| 938 """, | 938 """, |
| 939 args=[self.m.path['checkout'].join('out', | 939 args=[self.m.path['checkout'].join('out', |
| 940 self.m.chromium.c.BUILD_CONFIG, | 940 self.m.chromium.c.BUILD_CONFIG, |
| 941 'test_logs', | 941 'test_logs', |
| 942 '*.log')], | 942 '*.log')], |
| 943 ) | 943 ) |
| 944 | 944 |
| 945 def common_tests_setup_steps(self, perf_setup=False, | 945 def common_tests_setup_steps(self, perf_setup=False, |
| 946 remove_system_webview=False): | 946 remove_system_webview=False, skip_wipe=False): |
| 947 self.create_adb_symlink() | 947 self.create_adb_symlink() |
| 948 if self.c.gce_setup: | 948 if self.c.gce_setup: |
| 949 self.launch_gce_instances(snapshot=self.c.gce_snapshot, | 949 self.launch_gce_instances(snapshot=self.c.gce_snapshot, |
| 950 count=self.c.gce_count) | 950 count=self.c.gce_count) |
| 951 self.spawn_logcat_monitor() | 951 self.spawn_logcat_monitor() |
| 952 self.provision_devices(emulators=True, | 952 self.provision_devices(emulators=True, |
| 953 remove_system_webview=remove_system_webview) | 953 remove_system_webview=remove_system_webview) |
| 954 else: | 954 else: |
| 955 self.spawn_logcat_monitor() | 955 self.spawn_logcat_monitor() |
| 956 self.authorize_adb_devices() | 956 self.authorize_adb_devices() |
| 957 self.device_recovery() | 957 self.device_recovery() |
| 958 if perf_setup: | 958 if perf_setup: |
| 959 kwargs = { | 959 kwargs = { |
| 960 'min_battery_level': 95, | 960 'min_battery_level': 95, |
| 961 'disable_network': True, | 961 'disable_network': True, |
| 962 'disable_java_debug': True, | 962 'disable_java_debug': True, |
| 963 'max_battery_temp': 350} | 963 'max_battery_temp': 350} |
| 964 else: | 964 else: |
| 965 kwargs = {} | 965 kwargs = {} |
| 966 if skip_wipe: |
| 967 kwargs['skip_wipe'] = True |
| 966 self.provision_devices(remove_system_webview=remove_system_webview, | 968 self.provision_devices(remove_system_webview=remove_system_webview, |
| 967 **kwargs) | 969 **kwargs) |
| 968 self.device_status() | 970 self.device_status() |
| 969 if self.m.chromium.c.gyp_env.GYP_DEFINES.get('asan', 0) == 1: | 971 if self.m.chromium.c.gyp_env.GYP_DEFINES.get('asan', 0) == 1: |
| 970 self.asan_device_setup() | 972 self.asan_device_setup() |
| 971 | 973 |
| 972 self.spawn_device_monitor() | 974 self.spawn_device_monitor() |
| 973 | 975 |
| 974 def common_tests_final_steps(self, logcat_gs_bucket='chromium-android'): | 976 def common_tests_final_steps(self, logcat_gs_bucket='chromium-android'): |
| 975 if not self.c.gce_setup: | 977 if not self.c.gce_setup: |
| (...skipping 408 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1384 script = self.c.test_runner | 1386 script = self.c.test_runner |
| 1385 if wrapper_script_suite_name: | 1387 if wrapper_script_suite_name: |
| 1386 script = self.m.chromium.output_dir.join('bin', 'run_%s' % | 1388 script = self.m.chromium.output_dir.join('bin', 'run_%s' % |
| 1387 wrapper_script_suite_name) | 1389 wrapper_script_suite_name) |
| 1388 else: | 1390 else: |
| 1389 env = kwargs.get('env', {}) | 1391 env = kwargs.get('env', {}) |
| 1390 env['CHROMIUM_OUTPUT_DIR'] = env.get('CHROMIUM_OUTPUT_DIR', | 1392 env['CHROMIUM_OUTPUT_DIR'] = env.get('CHROMIUM_OUTPUT_DIR', |
| 1391 self.m.chromium.output_dir) | 1393 self.m.chromium.output_dir) |
| 1392 kwargs['env'] = env | 1394 kwargs['env'] = env |
| 1393 return self.m.python(step_name, script, args, **kwargs) | 1395 return self.m.python(step_name, script, args, **kwargs) |
| OLD | NEW |