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

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

Issue 2246863003: Swarming bots error out on bad devices. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 4 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 functools 6 import functools
7 import logging 7 import logging
8 import os 8 import os
9 import shutil 9 import shutil
10 import tempfile 10 import tempfile
(...skipping 186 matching lines...) Expand 10 before | Expand all | Expand 10 after
197 except base_error.BaseError: 197 except base_error.BaseError:
198 logging.exception('Failed to stop logcat monitor for %s', 198 logging.exception('Failed to stop logcat monitor for %s',
199 m.adb.GetDeviceSerial()) 199 m.adb.GetDeviceSerial())
200 except IOError: 200 except IOError:
201 logging.exception('Failed to locate logcat for device %s', 201 logging.exception('Failed to locate logcat for device %s',
202 m.adb.GetDeviceSerial()) 202 m.adb.GetDeviceSerial())
203 203
204 if self._logcat_output_file: 204 if self._logcat_output_file:
205 file_utils.MergeFiles( 205 file_utils.MergeFiles(
206 self._logcat_output_file, 206 self._logcat_output_file,
207 [m.output_file for m in self._logcat_monitors]) 207 [m.output_file for m in self._logcat_monitors
208 if os.path.exists(m.output_file)])
208 shutil.rmtree(self._logcat_output_dir) 209 shutil.rmtree(self._logcat_output_dir)
209 210
210 def BlacklistDevice(self, device, reason='local_device_failure'): 211 def BlacklistDevice(self, device, reason='local_device_failure'):
211 device_serial = device.adb.GetDeviceSerial() 212 device_serial = device.adb.GetDeviceSerial()
212 if self._blacklist: 213 if self._blacklist:
213 self._blacklist.Extend([device_serial], reason=reason) 214 self._blacklist.Extend([device_serial], reason=reason)
214 with self._devices_lock: 215 with self._devices_lock:
215 self._devices = [d for d in self._devices if str(d) != device_serial] 216 self._devices = [d for d in self._devices if str(d) != device_serial]
216 217
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