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

Unified Diff: build/android/adb_reverse_forwarder.py

Issue 1281923003: [Android] Add --blacklist-file as a command-line option. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix telemetry_unittests Created 5 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « build/android/adb_install_apk.py ('k') | build/android/buildbot/bb_device_status_check.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: build/android/adb_reverse_forwarder.py
diff --git a/build/android/adb_reverse_forwarder.py b/build/android/adb_reverse_forwarder.py
index 3ce53595dae9f0657e0ef17f54a528305ba3464d..a3bfaf0b1a46454ca02c15db88dfc0e940833d08 100755
--- a/build/android/adb_reverse_forwarder.py
+++ b/build/android/adb_reverse_forwarder.py
@@ -19,6 +19,7 @@ import time
from pylib import constants
from pylib import forwarder
from pylib.device import adb_wrapper
+from pylib.device import device_blacklist
from pylib.device import device_errors
from pylib.device import device_utils
from pylib.utils import run_tests_helper
@@ -36,6 +37,7 @@ def main(argv):
help='Verbose level (multiple times for more)')
parser.add_option('--device',
help='Serial number of device we should use.')
+ parser.add_option('--blacklist-file', help='Device blacklist JSON file.')
parser.add_option('--debug', action='store_const', const='Debug',
dest='build_type', default='Release',
help='Use Debug build of host tools instead of Release.')
@@ -54,7 +56,12 @@ def main(argv):
parser.error('Bad port number')
sys.exit(1)
- devices = device_utils.DeviceUtils.HealthyDevices()
+ if options.blacklist_file:
+ blacklist = device_blacklist.Blacklist(options.blacklist_file)
+ else:
+ blacklist = None
+
+ devices = device_utils.DeviceUtils.HealthyDevices(blacklist)
if options.device:
device = next((d for d in devices if d == options.device), None)
« no previous file with comments | « build/android/adb_install_apk.py ('k') | build/android/buildbot/bb_device_status_check.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698