Skip AVFHostTestCases on Cuttlefish

Cuttlefish does not support `adb reboot bootloader`; the instance
reboots back to Android. This breaks AVFHostTestCases that assume
each device is compatible with fastboot. Skip the affected tests, as
well as code in tearDown() which resets the device back to pKVM enabled
mode.

Test: 'atest AVFHostTestCases' on aosp_cf_x86_64_phone
Change-Id: I4fc5a47b3cb3af8f66d8493ae99cfbc44f8d3d55
diff --git a/tests/benchmark_hostside/java/android/avf/test/AVFHostTestCase.java b/tests/benchmark_hostside/java/android/avf/test/AVFHostTestCase.java
index c7ee0f2..eeadae1 100644
--- a/tests/benchmark_hostside/java/android/avf/test/AVFHostTestCase.java
+++ b/tests/benchmark_hostside/java/android/avf/test/AVFHostTestCase.java
@@ -19,8 +19,8 @@
 import static com.android.tradefed.testtype.DeviceJUnit4ClassRunner.TestMetrics;
 
 import static com.google.common.truth.Truth.assertWithMessage;
-import static com.google.common.truth.TruthJUnit.assume;
 
+import static org.junit.Assume.assumeFalse;
 import static org.junit.Assume.assumeTrue;
 
 import android.platform.test.annotations.RootPermissionTest;
@@ -77,8 +77,10 @@
     @After
     public void tearDown() throws Exception {
         // Set PKVM enable and reboot to prevent previous staged session.
-        setPKVMStatusWithRebootToBootloader(true);
-        rebootFromBootloaderAndWaitBootCompleted();
+        if (!isCuttlefish()) {
+            setPKVMStatusWithRebootToBootloader(true);
+            rebootFromBootloaderAndWaitBootCompleted();
+        }
 
         CommandRunner android = new CommandRunner(getDevice());
 
@@ -118,7 +120,7 @@
 
     @Test
     public void testBootWithAndWithoutCompOS() throws Exception {
-        assume().withMessage("Skip on CF; too slow").that(isCuttlefish()).isFalse();
+        assumeFalse(isCuttlefish());
 
         List<Double> bootWithCompOsTime = new ArrayList<>(ROUND_COUNT);
         List<Double> bootWithoutCompOsTime = new ArrayList<>(ROUND_COUNT);
@@ -152,6 +154,8 @@
     }
 
     private void skipIfPKVMStatusSwitchNotSupported() throws Exception {
+        assumeFalse(isCuttlefish());
+
         if (!getDevice().isStateBootloaderOrFastbootd()) {
             getDevice().rebootIntoBootloader();
         }
@@ -160,7 +164,7 @@
         CommandResult result;
         result = getDevice().executeFastbootCommand("oem", "pkvm", "status");
         rebootFromBootloaderAndWaitBootCompleted();
-        assumeTrue(!result.getStderr().contains("Invalid oem command"));
+        assumeFalse(result.getStderr().contains("Invalid oem command"));
         // Skip the test if running on a build with pkvm_enabler. Disabling pKVM
         // for such builds results in a bootloop.
         assumeTrue(result.getStderr().contains("misc=auto"));