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

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

Issue 1420003002: Android gtest runner: Use device.Install(reinstall=True) (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 2 months 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 89 matching lines...) Expand 10 before | Expand all | Expand 10 after
100 self._apk_helper = test_instance.apk_helper 100 self._apk_helper = test_instance.apk_helper
101 self._package = test_instance.package 101 self._package = test_instance.package
102 self._runner = test_instance.runner 102 self._runner = test_instance.runner
103 self._permissions = test_instance.permissions 103 self._permissions = test_instance.permissions
104 self._suite = test_instance.suite 104 self._suite = test_instance.suite
105 self._component = '%s/%s' % (self._package, self._runner) 105 self._component = '%s/%s' % (self._package, self._runner)
106 self._extras = test_instance.extras 106 self._extras = test_instance.extras
107 107
108 def Install(self, device, incremental=False): 108 def Install(self, device, incremental=False):
109 if not incremental: 109 if not incremental:
110 device.Install(self._apk_helper, permissions=self._permissions) 110 device.Install(self._apk_helper, reinstall=True,
jbudorick 2015/10/22 15:14:15 Hrm, I was worried about how the bots would handle
111 permissions=self._permissions)
111 return 112 return
112 113
113 installer_script = os.path.join(constants.GetOutDirectory(), 'bin', 114 installer_script = os.path.join(constants.GetOutDirectory(), 'bin',
114 'install_%s_apk_incremental' % self._suite) 115 'install_%s_apk_incremental' % self._suite)
115 try: 116 try:
116 install_wrapper = imp.load_source('install_wrapper', installer_script) 117 install_wrapper = imp.load_source('install_wrapper', installer_script)
117 except IOError: 118 except IOError:
118 raise Exception(('Incremental install script not found: %s\n' 119 raise Exception(('Incremental install script not found: %s\n'
119 'Make sure to first build "%s_incremental"') % 120 'Make sure to first build "%s_incremental"') %
120 (installer_script, self._suite)) 121 (installer_script, self._suite))
(...skipping 233 matching lines...) Expand 10 before | Expand all | Expand 10 after
354 def TearDown(self): 355 def TearDown(self):
355 @local_device_test_run.handle_shard_failures 356 @local_device_test_run.handle_shard_failures
356 def individual_device_tear_down(dev): 357 def individual_device_tear_down(dev):
357 for s in self._servers.get(str(dev), []): 358 for s in self._servers.get(str(dev), []):
358 s.TearDown() 359 s.TearDown()
359 360
360 tool = self.GetTool(dev) 361 tool = self.GetTool(dev)
361 tool.CleanUpEnvironment() 362 tool.CleanUpEnvironment()
362 363
363 self._env.parallel_devices.pMap(individual_device_tear_down) 364 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