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 urllib | 10 import urllib |
(...skipping 245 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
256 # (or at least make the difference clear). | 256 # (or at least make the difference clear). |
257 self.m.archive.zip_and_upload_build( | 257 self.m.archive.zip_and_upload_build( |
258 'zip_build', | 258 'zip_build', |
259 target=self.m.chromium.c.BUILD_CONFIG, | 259 target=self.m.chromium.c.BUILD_CONFIG, |
260 # We send None as the path so that zip_build.py gets it from factory | 260 # We send None as the path so that zip_build.py gets it from factory |
261 # properties. | 261 # properties. |
262 build_url=None, | 262 build_url=None, |
263 src_dir=self.m.path['slave_build'].join('src'), | 263 src_dir=self.m.path['slave_build'].join('src'), |
264 exclude_files='lib.target,gen,android_webview,jingle_unittests') | 264 exclude_files='lib.target,gen,android_webview,jingle_unittests') |
265 | 265 |
266 def create_adb_symlink(self): | |
267 # Creates a sym link to the adb executable in the home dir | |
268 self.m.python( | |
269 'create adb symlink', | |
270 self.m.path['checkout'].join('build', 'symlink.py'), | |
271 ['-f', self.m.adb.adb_path(), os.path.join('~', 'adb')], | |
272 infra_step=True, | |
jbudorick
2016/03/21 18:00:20
nit: get rid of the comma here and bring the closi
bpastene
2016/03/21 18:08:01
Done.
| |
273 ) | |
274 | |
266 def spawn_logcat_monitor(self): | 275 def spawn_logcat_monitor(self): |
267 self.m.step( | 276 self.m.step( |
268 'spawn_logcat_monitor', | 277 'spawn_logcat_monitor', |
269 [self.package_repo_resource('scripts', 'slave', 'daemonizer.py'), | 278 [self.package_repo_resource('scripts', 'slave', 'daemonizer.py'), |
270 '--', self.c.cr_build_android.join('adb_logcat_monitor.py'), | 279 '--', self.c.cr_build_android.join('adb_logcat_monitor.py'), |
271 self.m.chromium.c.build_dir.join('logcat')], | 280 self.m.chromium.c.build_dir.join('logcat')], |
272 env=self.m.chromium.get_env(), | 281 env=self.m.chromium.get_env(), |
273 infra_step=True) | 282 infra_step=True) |
274 | 283 |
275 def spawn_device_monitor(self): | 284 def spawn_device_monitor(self): |
(...skipping 563 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
839 os.remove(report) | 848 os.remove(report) |
840 """, | 849 """, |
841 args=[self.m.path['checkout'].join('out', | 850 args=[self.m.path['checkout'].join('out', |
842 self.m.chromium.c.BUILD_CONFIG, | 851 self.m.chromium.c.BUILD_CONFIG, |
843 'test_logs', | 852 'test_logs', |
844 '*.log')], | 853 '*.log')], |
845 ) | 854 ) |
846 | 855 |
847 def common_tests_setup_steps(self, perf_setup=False, | 856 def common_tests_setup_steps(self, perf_setup=False, |
848 remove_system_webview=False): | 857 remove_system_webview=False): |
858 self.create_adb_symlink() | |
849 if self.c.gce_setup: | 859 if self.c.gce_setup: |
850 self.launch_gce_instances(snapshot=self.c.gce_snapshot, count=self.c.gce_c ount) | 860 self.launch_gce_instances(snapshot=self.c.gce_snapshot, count=self.c.gce_c ount) |
851 self.spawn_logcat_monitor() | 861 self.spawn_logcat_monitor() |
852 self.provision_devices(emulators=True, | 862 self.provision_devices(emulators=True, |
853 remove_system_webview=remove_system_webview) | 863 remove_system_webview=remove_system_webview) |
854 else: | 864 else: |
855 self.spawn_logcat_monitor() | 865 self.spawn_logcat_monitor() |
856 self.authorize_adb_devices() | 866 self.authorize_adb_devices() |
857 self.device_status_check() | 867 self.device_status_check() |
858 if perf_setup: | 868 if perf_setup: |
(...skipping 380 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1239 def test_runner(self, step_name, args=None, **kwargs): | 1249 def test_runner(self, step_name, args=None, **kwargs): |
1240 """Wrapper for the python testrunner script. | 1250 """Wrapper for the python testrunner script. |
1241 | 1251 |
1242 Args: | 1252 Args: |
1243 step_name: Name of the step. | 1253 step_name: Name of the step. |
1244 args: Testrunner arguments. | 1254 args: Testrunner arguments. |
1245 """ | 1255 """ |
1246 with self.handle_exit_codes(): | 1256 with self.handle_exit_codes(): |
1247 return self.m.python( | 1257 return self.m.python( |
1248 step_name, self.c.test_runner, args, **kwargs) | 1258 step_name, self.c.test_runner, args, **kwargs) |
OLD | NEW |