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

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

Issue 1304303006: [Android] Don't use a device blacklist if one isn't provided. (RELAND) (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: add blacklist to host_info and the old buildbot scripts Created 5 years, 3 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 | « build/android/provision_devices.py ('k') | build/android/screenshot.py » ('j') | 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 from devil.android import device_blacklist 5 from devil.android import device_blacklist
6 from devil.android import device_errors 6 from devil.android import device_errors
7 from devil.android import device_utils 7 from devil.android import device_utils
8 from devil.utils import parallelizer 8 from devil.utils import parallelizer
9 from pylib.base import environment 9 from pylib.base import environment
10 10
11 11
12 class LocalDeviceEnvironment(environment.Environment): 12 class LocalDeviceEnvironment(environment.Environment):
13 13
14 def __init__(self, args, _error_func): 14 def __init__(self, args, _error_func):
15 super(LocalDeviceEnvironment, self).__init__() 15 super(LocalDeviceEnvironment, self).__init__()
16 self._blacklist = device_blacklist.Blacklist( 16 self._blacklist = (device_blacklist.Blacklist(args.blacklist_file)
17 args.blacklist_file or device_blacklist.BLACKLIST_JSON) 17 if args.blacklist_file
18 else None)
18 self._device_serial = args.test_device 19 self._device_serial = args.test_device
19 self._devices = [] 20 self._devices = []
20 self._max_tries = 1 + args.num_retries 21 self._max_tries = 1 + args.num_retries
21 self._tool_name = args.tool 22 self._tool_name = args.tool
22 23
23 #override 24 #override
24 def SetUp(self): 25 def SetUp(self):
25 available_devices = device_utils.DeviceUtils.HealthyDevices( 26 available_devices = device_utils.DeviceUtils.HealthyDevices(
26 self._blacklist) 27 self._blacklist)
27 if not available_devices: 28 if not available_devices:
(...skipping 20 matching lines...) Expand all
48 return self._max_tries 49 return self._max_tries
49 50
50 @property 51 @property
51 def tool(self): 52 def tool(self):
52 return self._tool_name 53 return self._tool_name
53 54
54 #override 55 #override
55 def TearDown(self): 56 def TearDown(self):
56 pass 57 pass
57 58
OLDNEW
« no previous file with comments | « build/android/provision_devices.py ('k') | build/android/screenshot.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698