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

Side by Side Diff: devil/docs/device_blacklist.md

Issue 2162963002: [polymer] Merge of master into polymer10-migration (Closed) Base URL: git@github.com:catapult-project/catapult.git@polymer10-migration
Patch Set: Merge polymer10-migration int polymer10-merge 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 | « devil/devil/utils/usb_hubs.py ('k') | devil/docs/persistent_device_list.md » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 <!-- Copyright 2016 The Chromium Authors. All rights reserved.
2 Use of this source code is governed by a BSD-style license that can be
3 found in the LICENSE file.
4 -->
5
6 # Devil: Device Blacklist
7
8 ## What is it?
9
10 The device blacklist is a per-run list of devices detected to be in a known bad
11 state along with the reason they are suspected of being in a bad state (offline,
12 not responding, etc). It is stored as a json file. This gets reset every run
13 during the device recovery step (currently part of `bb_device_status_check`).
14
15 ## Bots
16
17 On bots, this is normally found at `//out/bad_devices.json`. If you are having
18 problems with blacklisted devices locally even though a device is in a good
19 state, you can safely delete this file.
20
21 # Tools for interacting with device black list.
22
23 You can interact with the device blacklist via [devil.android.device\_blacklist] (https://cs.chromium.org/chromium/src/third_party/catapult/devil/devil/android/d evice_blacklist.py).
24 This allows for any interaction you would need with a device blacklist:
25
26 - Reading
27 - Writing
28 - Extending
29 - Resetting
30
31 An example usecase of this is:
32 ```python
33 from devil.android import device_blacklist
34
35 blacklist = device_blacklist.Blacklist(blacklist_path)
36 blacklisted_devices = blacklist.Read()
37 for device in blacklisted_devices:
38 print 'Device %s is blacklisted' % device
39 blacklist.Reset()
40 new_blacklist = {'device_id1': {'timestamp': ts, 'reason': reason}}
41 blacklist.Write(new_blacklist)
42 blacklist.Extend([device_2, device_3], reason='Reason for blacklisting')
43 ```
44
45
46 ## Where it is used.
47
48 The blacklist file path is passed directly to the following scripts in chromium:
49
50 - [test\_runner.py](https://cs.chromium.org/chromium/src/build/android/test_ru nner.py)
51 - [provision\_devices.py](https://cs.chromium.org/chromium/src/build/android/p rovision_devices.py)
52 - [bb\_device\_status\_check.py](https://cs.chromium.org/chromium/src/build/an droid/buildbot/bb_device_status_check.py)
53
54 The blacklist is also used in the following scripts:
55
56 - [device\_status.py](https://cs.chromium.org/chromium/src/third_party/catapul t/devil/devil/android/tools/device_status.py)
57 - [device\_recovery.py](https://cs.chromium.org/chromium/src/third_party/catap ult/devil/devil/android/tools/device_recovery.py)
58
59
OLDNEW
« no previous file with comments | « devil/devil/utils/usb_hubs.py ('k') | devil/docs/persistent_device_list.md » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698