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

Unified Diff: build/android/adb_command_line.py

Issue 1895163002: 🐠 Use the new DeviceUtils.HealthyDevices(device_arg=) in a few scripts (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 8 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 | « no previous file | build/android/adb_install_apk.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: build/android/adb_command_line.py
diff --git a/build/android/adb_command_line.py b/build/android/adb_command_line.py
index c242aa1c0f41ca5c7c4f6a355b190190837fb1a4..72f42b6e61e6872394f385579504f018beb20316 100755
--- a/build/android/adb_command_line.py
+++ b/build/android/adb_command_line.py
@@ -24,8 +24,8 @@ Empty string: Deletes command-line file.
Otherwise: Writes command-line file.
'''
- parser.add_argument('-d', '--device', dest='device',
- help='Target device for apk to install on.')
+ parser.add_argument('-d', '--device', dest='devices', action='append',
+ default=[], help='Target device serial (repeatable).')
parser.add_argument('--device-path', required=True,
help='Remote path to flags file.')
parser.add_argument('-e', '--executable', dest='executable', default='chrome',
@@ -36,13 +36,8 @@ Otherwise: Writes command-line file.
as_root = not args.device_path.startswith('/data/local/tmp/')
- if args.device:
- devices = [device_utils.DeviceUtils(args.device, default_retries=0)]
- else:
- devices = device_utils.DeviceUtils.HealthyDevices(default_retries=0)
- if not devices:
- raise device_errors.NoDevicesError()
-
+ devices = device_utils.DeviceUtils.HealthyDevices(device_arg=args.devices,
+ default_retries=0)
all_devices = device_utils.DeviceUtils.parallel(devices)
def print_args():
« no previous file with comments | « no previous file | build/android/adb_install_apk.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698