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 imp | 5 import imp |
6 import itertools | 6 import itertools |
7 import os | 7 import os |
8 import posixpath | 8 import posixpath |
9 | 9 |
10 from devil.android import device_errors | 10 from devil.android import device_errors |
(...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
90 'install_%s_apk_incremental' % self._suite) | 90 'install_%s_apk_incremental' % self._suite) |
91 try: | 91 try: |
92 install_wrapper = imp.load_source('install_wrapper', installer_script) | 92 install_wrapper = imp.load_source('install_wrapper', installer_script) |
93 except IOError: | 93 except IOError: |
94 raise Exception(('Incremental install script not found: %s\n' | 94 raise Exception(('Incremental install script not found: %s\n' |
95 'Make sure to first build "%s_incremental"') % | 95 'Make sure to first build "%s_incremental"') % |
96 (installer_script, self._suite)) | 96 (installer_script, self._suite)) |
97 params = install_wrapper.GetInstallParameters() | 97 params = install_wrapper.GetInstallParameters() |
98 | 98 |
99 installer.Install(device, self._apk_helper, split_globs=params['splits'], | 99 installer.Install(device, self._apk_helper, split_globs=params['splits'], |
100 lib_dir=params['lib_dir'], dex_files=params['dex_files']) | 100 native_libs=params['native_libs'], |
| 101 dex_files=params['dex_files']) |
101 | 102 |
102 def Run(self, test, device, flags=None, **kwargs): | 103 def Run(self, test, device, flags=None, **kwargs): |
103 extras = dict(self._extras) | 104 extras = dict(self._extras) |
104 | 105 |
105 if ('timeout' in kwargs | 106 if ('timeout' in kwargs |
106 and gtest_test_instance.EXTRA_SHARD_NANO_TIMEOUT not in extras): | 107 and gtest_test_instance.EXTRA_SHARD_NANO_TIMEOUT not in extras): |
107 # Make sure the instrumentation doesn't kill the test before the | 108 # Make sure the instrumentation doesn't kill the test before the |
108 # scripts do. The provided timeout value is in seconds, but the | 109 # scripts do. The provided timeout value is in seconds, but the |
109 # instrumentation deals with nanoseconds because that's how Android | 110 # instrumentation deals with nanoseconds because that's how Android |
110 # handles time. | 111 # handles time. |
(...skipping 212 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
323 def TearDown(self): | 324 def TearDown(self): |
324 @local_device_test_run.handle_shard_failures | 325 @local_device_test_run.handle_shard_failures |
325 def individual_device_tear_down(dev): | 326 def individual_device_tear_down(dev): |
326 for s in self._servers.get(str(dev), []): | 327 for s in self._servers.get(str(dev), []): |
327 s.TearDown() | 328 s.TearDown() |
328 | 329 |
329 tool = self.GetTool(dev) | 330 tool = self.GetTool(dev) |
330 tool.CleanUpEnvironment() | 331 tool.CleanUpEnvironment() |
331 | 332 |
332 self._env.parallel_devices.pMap(individual_device_tear_down) | 333 self._env.parallel_devices.pMap(individual_device_tear_down) |
OLD | NEW |