aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorxianyuanjia <56282287+xianyuanjia@users.noreply.github.com>2023-01-04 10:22:04 -0800
committerGitHub <noreply@github.com>2023-01-04 10:22:04 -0800
commit8d044d22674bff6b2fd748d5d95c0e4329721d96 (patch)
tree76cd10edc40b700bcd5cb7c53b0262a20e458456
parent7892f34ba6a64e348edb2533e0be3bf6fab50570 (diff)
downloadmobly-8d044d22674bff6b2fd748d5d95c0e4329721d96.tar.gz
Add check for Cuttlefish devices in `is_emulator` (#860)
Co-Authored-By: Ang Li <angli@google.com>
-rw-r--r--mobly/controllers/android_device.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/mobly/controllers/android_device.py b/mobly/controllers/android_device.py
index 7d5064a..b8d51d4 100644
--- a/mobly/controllers/android_device.py
+++ b/mobly/controllers/android_device.py
@@ -863,10 +863,11 @@ class AndroidDevice:
# as emulators in addition to other things, so only return True on
# an exact match.
return True
- elif self.build_info['hardware'] in ['ranchu', 'goldfish']:
+ elif self.build_info['hardware'] in ['ranchu', 'goldfish', 'cutf_cvm']:
# Ranchu and Goldfish are the hardware properties that the AOSP
# emulators report, so if the device says it's an AOSP emulator, it
- # probably is one.
+ # probably is one. Cuttlefish emulators report 'cutf_cvm` as the
+ # hardware property.
return True
else:
return False