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

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

Issue 2119413005: Log what devices were read from the target devices file. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 5 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 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 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
48 #override 48 #override
49 def SetUp(self): 49 def SetUp(self):
50 device_arg = 'default' 50 device_arg = 'default'
51 if self._target_devices_file: 51 if self._target_devices_file:
52 device_arg = device_list.GetPersistentDeviceList( 52 device_arg = device_list.GetPersistentDeviceList(
53 self._target_devices_file) 53 self._target_devices_file)
54 if not device_arg: 54 if not device_arg:
55 logging.warning('No target devices specified. Falling back to ' 55 logging.warning('No target devices specified. Falling back to '
56 'running on all available devices.') 56 'running on all available devices.')
57 device_arg = 'default' 57 device_arg = 'default'
58 else:
59 logging.info(
60 'Read device list %s from target devices file.', str(device_arg))
58 elif self._device_serial: 61 elif self._device_serial:
59 device_arg = self._device_serial 62 device_arg = self._device_serial
60 63
61 self._devices = device_utils.DeviceUtils.HealthyDevices( 64 self._devices = device_utils.DeviceUtils.HealthyDevices(
62 self._blacklist, enable_device_files_cache=self._enable_device_cache, 65 self._blacklist, enable_device_files_cache=self._enable_device_cache,
63 default_retries=self._max_tries - 1, device_arg=device_arg) 66 default_retries=self._max_tries - 1, device_arg=device_arg)
64 if not self._devices: 67 if not self._devices:
65 raise device_errors.NoDevicesError 68 raise device_errors.NoDevicesError
66 69
67 if self._enable_device_cache: 70 if self._enable_device_cache:
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after
131 [m.output_file for m in self._logcat_monitors]) 134 [m.output_file for m in self._logcat_monitors])
132 shutil.rmtree(self._logcat_output_dir) 135 shutil.rmtree(self._logcat_output_dir)
133 136
134 def BlacklistDevice(self, device, reason='local_device_failure'): 137 def BlacklistDevice(self, device, reason='local_device_failure'):
135 device_serial = device.adb.GetDeviceSerial() 138 device_serial = device.adb.GetDeviceSerial()
136 if self._blacklist: 139 if self._blacklist:
137 self._blacklist.Extend([device_serial], reason=reason) 140 self._blacklist.Extend([device_serial], reason=reason)
138 with self._devices_lock: 141 with self._devices_lock:
139 self._devices = [d for d in self._devices if str(d) != device_serial] 142 self._devices = [d for d in self._devices if str(d) != device_serial]
140 143
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