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

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

Issue 1680233002: Android Add _incremental targets for instrumentation tests (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 10 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
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 datetime 5 import datetime
6 import logging 6 import logging
7 import os 7 import os
8 import shutil 8 import shutil
9 import tempfile 9 import tempfile
10 import threading 10 import threading
(...skipping 19 matching lines...) Expand all
30 super(LocalDeviceEnvironment, self).__init__() 30 super(LocalDeviceEnvironment, self).__init__()
31 self._blacklist = (device_blacklist.Blacklist(args.blacklist_file) 31 self._blacklist = (device_blacklist.Blacklist(args.blacklist_file)
32 if args.blacklist_file 32 if args.blacklist_file
33 else None) 33 else None)
34 self._device_serial = args.test_device 34 self._device_serial = args.test_device
35 self._devices_lock = threading.Lock() 35 self._devices_lock = threading.Lock()
36 self._devices = [] 36 self._devices = []
37 self._max_tries = 1 + args.num_retries 37 self._max_tries = 1 + args.num_retries
38 self._tool_name = args.tool 38 self._tool_name = args.tool
39 self._enable_device_cache = args.enable_device_cache 39 self._enable_device_cache = args.enable_device_cache
40 self._incremental_install = args.incremental_install
41 self._concurrent_adb = args.enable_concurrent_adb 40 self._concurrent_adb = args.enable_concurrent_adb
42 self._logcat_output_dir = args.logcat_output_dir 41 self._logcat_output_dir = args.logcat_output_dir
43 self._logcat_output_file = args.logcat_output_file 42 self._logcat_output_file = args.logcat_output_file
44 self._logcat_monitors = [] 43 self._logcat_monitors = []
45 44
46 #override 45 #override
47 def SetUp(self): 46 def SetUp(self):
48 available_devices = device_utils.DeviceUtils.HealthyDevices( 47 available_devices = device_utils.DeviceUtils.HealthyDevices(
49 self._blacklist, enable_device_files_cache=self._enable_device_cache) 48 self._blacklist, enable_device_files_cache=self._enable_device_cache)
50 if not available_devices: 49 if not available_devices:
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
84 def devices(self): 83 def devices(self):
85 if not self._devices: 84 if not self._devices:
86 raise device_errors.NoDevicesError() 85 raise device_errors.NoDevicesError()
87 return self._devices 86 return self._devices
88 87
89 @property 88 @property
90 def concurrent_adb(self): 89 def concurrent_adb(self):
91 return self._concurrent_adb 90 return self._concurrent_adb
92 91
93 @property 92 @property
94 def incremental_install(self):
jbudorick 2016/02/09 20:08:26 So incremental installation is now implicit based
agrieve 2016/02/09 21:43:50 Done.
95 return self._incremental_install
96
97 @property
98 def parallel_devices(self): 93 def parallel_devices(self):
99 return parallelizer.SyncParallelizer(self.devices) 94 return parallelizer.SyncParallelizer(self.devices)
100 95
101 @property 96 @property
102 def max_tries(self): 97 def max_tries(self):
103 return self._max_tries 98 return self._max_tries
104 99
105 @property 100 @property
106 def tool(self): 101 def tool(self):
107 return self._tool_name 102 return self._tool_name
(...skipping 17 matching lines...) Expand all
125 [m.output_file for m in self._logcat_monitors]) 120 [m.output_file for m in self._logcat_monitors])
126 shutil.rmtree(self._logcat_output_dir) 121 shutil.rmtree(self._logcat_output_dir)
127 122
128 def BlacklistDevice(self, device, reason='local_device_failure'): 123 def BlacklistDevice(self, device, reason='local_device_failure'):
129 device_serial = device.adb.GetDeviceSerial() 124 device_serial = device.adb.GetDeviceSerial()
130 if self._blacklist: 125 if self._blacklist:
131 self._blacklist.Extend([device_serial], reason=reason) 126 self._blacklist.Extend([device_serial], reason=reason)
132 with self._devices_lock: 127 with self._devices_lock:
133 self._devices = [d for d in self._devices if str(d) != device_serial] 128 self._devices = [d for d in self._devices if str(d) != device_serial]
134 129
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698