OLD | NEW |
1 # Copyright 2014 The Chromium Authors. All rights reserved. | 1 # Copyright 2014 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 fnmatch | 5 import fnmatch |
6 import imp | 6 import imp |
7 import logging | 7 import logging |
8 import posixpath | |
9 import signal | 8 import signal |
10 import thread | 9 import thread |
11 import threading | 10 import threading |
12 | 11 |
13 from devil.utils import signal_handler | 12 from devil.utils import signal_handler |
14 from pylib import valgrind_tools | 13 from pylib import valgrind_tools |
15 from pylib.base import base_test_result | 14 from pylib.base import base_test_result |
16 from pylib.base import test_run | 15 from pylib.base import test_run |
17 from pylib.base import test_collection | 16 from pylib.base import test_collection |
18 from pylib.local.device import local_device_environment | 17 from pylib.local.device import local_device_environment |
(...skipping 19 matching lines...) Expand all Loading... |
38 installer_script) | 37 installer_script) |
39 params = install_wrapper.GetInstallParameters() | 38 params = install_wrapper.GetInstallParameters() |
40 | 39 |
41 from incremental_install import installer | 40 from incremental_install import installer |
42 installer.Install(device, apk_helper, split_globs=params['splits'], | 41 installer.Install(device, apk_helper, split_globs=params['splits'], |
43 native_libs=params['native_libs'], | 42 native_libs=params['native_libs'], |
44 dex_files=params['dex_files'], | 43 dex_files=params['dex_files'], |
45 permissions=None) # Auto-grant permissions from manifest. | 44 permissions=None) # Auto-grant permissions from manifest. |
46 | 45 |
47 | 46 |
48 def SubstituteDeviceRoot(device_path, device_root): | |
49 if not device_path: | |
50 return device_root | |
51 elif isinstance(device_path, list): | |
52 return posixpath.join(*(p if p else device_root for p in device_path)) | |
53 else: | |
54 return device_path | |
55 | |
56 | |
57 class LocalDeviceTestRun(test_run.TestRun): | 47 class LocalDeviceTestRun(test_run.TestRun): |
58 | 48 |
59 def __init__(self, env, test_instance): | 49 def __init__(self, env, test_instance): |
60 super(LocalDeviceTestRun, self).__init__(env, test_instance) | 50 super(LocalDeviceTestRun, self).__init__(env, test_instance) |
61 self._tools = {} | 51 self._tools = {} |
62 | 52 |
63 #override | 53 #override |
64 def RunTests(self): | 54 def RunTests(self): |
65 tests = self._GetTests() | 55 tests = self._GetTests() |
66 | 56 |
(...skipping 130 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
197 | 187 |
198 def _RunTest(self, device, test): | 188 def _RunTest(self, device, test): |
199 raise NotImplementedError | 189 raise NotImplementedError |
200 | 190 |
201 def _ShouldShard(self): | 191 def _ShouldShard(self): |
202 raise NotImplementedError | 192 raise NotImplementedError |
203 | 193 |
204 | 194 |
205 class NoTestsError(Exception): | 195 class NoTestsError(Exception): |
206 """Error for when no tests are found.""" | 196 """Error for when no tests are found.""" |
OLD | NEW |