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) |
| 273 |
266 def spawn_logcat_monitor(self): | 274 def spawn_logcat_monitor(self): |
267 self.m.step( | 275 self.m.step( |
268 'spawn_logcat_monitor', | 276 'spawn_logcat_monitor', |
269 [self.package_repo_resource('scripts', 'slave', 'daemonizer.py'), | 277 [self.package_repo_resource('scripts', 'slave', 'daemonizer.py'), |
270 '--', self.c.cr_build_android.join('adb_logcat_monitor.py'), | 278 '--', self.c.cr_build_android.join('adb_logcat_monitor.py'), |
271 self.m.chromium.c.build_dir.join('logcat')], | 279 self.m.chromium.c.build_dir.join('logcat')], |
272 env=self.m.chromium.get_env(), | 280 env=self.m.chromium.get_env(), |
273 infra_step=True) | 281 infra_step=True) |
274 | 282 |
275 def spawn_device_monitor(self): | 283 def spawn_device_monitor(self): |
(...skipping 563 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
839 os.remove(report) | 847 os.remove(report) |
840 """, | 848 """, |
841 args=[self.m.path['checkout'].join('out', | 849 args=[self.m.path['checkout'].join('out', |
842 self.m.chromium.c.BUILD_CONFIG, | 850 self.m.chromium.c.BUILD_CONFIG, |
843 'test_logs', | 851 'test_logs', |
844 '*.log')], | 852 '*.log')], |
845 ) | 853 ) |
846 | 854 |
847 def common_tests_setup_steps(self, perf_setup=False, | 855 def common_tests_setup_steps(self, perf_setup=False, |
848 remove_system_webview=False): | 856 remove_system_webview=False): |
| 857 self.create_adb_symlink() |
849 if self.c.gce_setup: | 858 if self.c.gce_setup: |
850 self.launch_gce_instances(snapshot=self.c.gce_snapshot, count=self.c.gce_c
ount) | 859 self.launch_gce_instances(snapshot=self.c.gce_snapshot, count=self.c.gce_c
ount) |
851 self.spawn_logcat_monitor() | 860 self.spawn_logcat_monitor() |
852 self.provision_devices(emulators=True, | 861 self.provision_devices(emulators=True, |
853 remove_system_webview=remove_system_webview) | 862 remove_system_webview=remove_system_webview) |
854 else: | 863 else: |
855 self.spawn_logcat_monitor() | 864 self.spawn_logcat_monitor() |
856 self.authorize_adb_devices() | 865 self.authorize_adb_devices() |
857 self.device_status_check() | 866 self.device_status_check() |
858 if perf_setup: | 867 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): | 1248 def test_runner(self, step_name, args=None, **kwargs): |
1240 """Wrapper for the python testrunner script. | 1249 """Wrapper for the python testrunner script. |
1241 | 1250 |
1242 Args: | 1251 Args: |
1243 step_name: Name of the step. | 1252 step_name: Name of the step. |
1244 args: Testrunner arguments. | 1253 args: Testrunner arguments. |
1245 """ | 1254 """ |
1246 with self.handle_exit_codes(): | 1255 with self.handle_exit_codes(): |
1247 return self.m.python( | 1256 return self.m.python( |
1248 step_name, self.c.test_runner, args, **kwargs) | 1257 step_name, self.c.test_runner, args, **kwargs) |
OLD | NEW |