Add CHEEPS InstanceType
Bug: 123303826
Test: Ran CTS with --instance-type CHEEPS
Change-Id: I97ebf258435567333928a24ec2e3a3e7d9c16636
diff --git a/src/com/android/tradefed/device/TestDeviceOptions.java b/src/com/android/tradefed/device/TestDeviceOptions.java
index 39db303..aad3bc7 100644
--- a/src/com/android/tradefed/device/TestDeviceOptions.java
+++ b/src/com/android/tradefed/device/TestDeviceOptions.java
@@ -41,6 +41,8 @@
REMOTE_NESTED_AVD,
/** An android emulator. */
EMULATOR,
+ /** Chrome OS VM (betty) */
+ CHEEPS,
}
public static final int DEFAULT_ADB_PORT = 5555;
@@ -588,6 +590,7 @@
public static String getCreateCommandByInstanceType(InstanceType type) {
switch (type) {
+ case CHEEPS:
case GCE:
case REMOTE_AVD:
return "create";
diff --git a/src/com/android/tradefed/device/cloud/GceManager.java b/src/com/android/tradefed/device/cloud/GceManager.java
index e070fba..6e946ab 100644
--- a/src/com/android/tradefed/device/cloud/GceManager.java
+++ b/src/com/android/tradefed/device/cloud/GceManager.java
@@ -217,6 +217,13 @@
getTestDeviceOptions().getInstanceType()));
// Handle the build id related params
List<String> gceDriverParams = getTestDeviceOptions().getGceDriverParams();
+
+ if (TestDeviceOptions.InstanceType.CHEEPS.equals(
+ getTestDeviceOptions().getInstanceType())) {
+ gceArgs.add("--avd-type");
+ gceArgs.add("cheeps");
+ }
+
// If args passed by gce-driver-param do not contain build_id or branch,
// use build_id and branch from device BuildInfo
if (!gceDriverParams.contains("--build_id") && !gceDriverParams.contains("--branch")) {