Chromium Code Reviews| Index: build/android/adb_install_apk.py |
| diff --git a/build/android/adb_install_apk.py b/build/android/adb_install_apk.py |
| index a91510137925e766cf5166768f78679e7ed51c12..c7432a4b62885477b19452bb16faf2a2b24e0cfe 100755 |
| --- a/build/android/adb_install_apk.py |
| +++ b/build/android/adb_install_apk.py |
| @@ -38,6 +38,8 @@ def AddInstallAPKOption(option_parser): |
| dest='build_type', |
| help='If set, run test suites under out/Release. ' |
| 'Default is env var BUILDTYPE or Debug.') |
| + option_parser.add_option('-d', '--device', dest='device', |
| + help=('Target device for apk to install on.')) |
|
frankf
2014/06/12 17:25:47
no () required.
|
| def ValidateInstallAPKOption(option_parser, options): |
| @@ -59,6 +61,13 @@ def main(argv): |
| raise Exception('Error: Unknown argument:', args[1:]) |
| devices = android_commands.GetAttachedDevices() |
| + |
| + if options.device: |
| + if options.device not in devices: |
| + raise Exception('Error: %s not in attached devices %s' % (options.device, |
| + ','.join(devices))) |
| + devices = [options.device] |
| + |
| if not devices: |
| raise Exception('Error: no connected devices') |