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

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

Issue 2012323002: [Android] Implement perf tests to platform mode. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: [Android] Implement perf tests to platform mode. 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
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 69 matching lines...) Expand 10 before | Expand all | Expand 10 after
80 logcat_file = os.path.join( 80 logcat_file = os.path.join(
81 self._logcat_output_dir, 81 self._logcat_output_dir,
82 '%s_%s' % (d.adb.GetDeviceSerial(), 82 '%s_%s' % (d.adb.GetDeviceSerial(),
83 datetime.datetime.utcnow().strftime('%Y%m%dT%H%M%S'))) 83 datetime.datetime.utcnow().strftime('%Y%m%dT%H%M%S')))
84 monitor = logcat_monitor.LogcatMonitor( 84 monitor = logcat_monitor.LogcatMonitor(
85 d.adb, clear=True, output_file=logcat_file) 85 d.adb, clear=True, output_file=logcat_file)
86 self._logcat_monitors.append(monitor) 86 self._logcat_monitors.append(monitor)
87 monitor.Start() 87 monitor.Start()
88 88
89 @property 89 @property
90 def blacklist(self):
91 return self._blacklist
92
93 @property
90 def concurrent_adb(self): 94 def concurrent_adb(self):
91 return self._concurrent_adb 95 return self._concurrent_adb
92 96
93 @property 97 @property
94 def devices(self): 98 def devices(self):
95 if not self._devices: 99 if not self._devices:
96 raise device_errors.NoDevicesError() 100 raise device_errors.NoDevicesError()
97 return self._devices 101 return self._devices
98 102
99 @property 103 @property
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
131 [m.output_file for m in self._logcat_monitors]) 135 [m.output_file for m in self._logcat_monitors])
132 shutil.rmtree(self._logcat_output_dir) 136 shutil.rmtree(self._logcat_output_dir)
133 137
134 def BlacklistDevice(self, device, reason='local_device_failure'): 138 def BlacklistDevice(self, device, reason='local_device_failure'):
135 device_serial = device.adb.GetDeviceSerial() 139 device_serial = device.adb.GetDeviceSerial()
136 if self._blacklist: 140 if self._blacklist:
137 self._blacklist.Extend([device_serial], reason=reason) 141 self._blacklist.Extend([device_serial], reason=reason)
138 with self._devices_lock: 142 with self._devices_lock:
139 self._devices = [d for d in self._devices if str(d) != device_serial] 143 self._devices = [d for d in self._devices if str(d) != device_serial]
140 144
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698