Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(309)

Side by Side Diff: build/android/pylib/local/device/local_device_gtest_run.py

Issue 1486303002: [Android] Fix incremental install for local gtests. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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)
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698