aboutsummaryrefslogtreecommitdiff
path: root/mobly
diff options
context:
space:
mode:
authorAidan Holm <aidanholm+github@gmail.com>2022-01-25 11:15:35 +0800
committerGitHub <noreply@github.com>2022-01-24 19:15:35 -0800
commit117f8ec1d4b396d8b2a331a6611a41a65aefb27a (patch)
tree1660edca739d9cc693122e180f7ff7c639e1684a /mobly
parentd2efcf909824e4f1f457dc57530395c84dbc255f (diff)
downloadmobly-117f8ec1d4b396d8b2a331a6611a41a65aefb27a.tar.gz
Include fastboot devices when validating controller creation. (#791)
This allows running Mobly tests against devices that are in fastboot mode without manually rebooting them first.
Diffstat (limited to 'mobly')
-rw-r--r--mobly/controllers/android_device.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/mobly/controllers/android_device.py b/mobly/controllers/android_device.py
index d786738..843d8eb 100644
--- a/mobly/controllers/android_device.py
+++ b/mobly/controllers/android_device.py
@@ -149,7 +149,8 @@ def _validate_device_existence(serials):
serials: list of strings, the serials of all the devices that are expected
to exist.
"""
- valid_ad_identifiers = list_adb_devices() + list_adb_devices_by_usb_id()
+ valid_ad_identifiers = (list_adb_devices() + list_adb_devices_by_usb_id() +
+ list_fastboot_devices())
for serial in serials:
if serial not in valid_ad_identifiers:
raise Error(f'Android device serial "{serial}" is specified in '