Snap for 9463735 from 00432c02c3fc3e0a42c579576a7a596feff0e9c6 to tm-qpr2-release
Change-Id: I28bbf5407f2d0419f85b14a9f3ca846287cf56ba
diff --git a/authfs/tests/java/src/com/android/fs/AuthFsHostTest.java b/authfs/tests/java/src/com/android/fs/AuthFsHostTest.java
index 67275c1..b18fbae 100644
--- a/authfs/tests/java/src/com/android/fs/AuthFsHostTest.java
+++ b/authfs/tests/java/src/com/android/fs/AuthFsHostTest.java
@@ -125,6 +125,11 @@
ITestDevice androidDevice = testInfo.getDevice();
sAndroid = new CommandRunner(androidDevice);
+ if (isCuttlefish(androidDevice)) {
+ sAssumptionFailed = true;
+ return;
+ }
+
try {
testIfDeviceIsCapable(androidDevice);
} catch (AssumptionViolatedException e) {
@@ -173,7 +178,6 @@
@Before
public void setUp() throws Exception {
assumeFalse(sAssumptionFailed);
- assumeFalse(isCuttlefish());
sAndroid.run("mkdir " + TEST_OUTPUT_DIR);
}
diff --git a/tests/hostside/helper/java/android/virt/test/VirtualizationTestCaseBase.java b/tests/hostside/helper/java/android/virt/test/VirtualizationTestCaseBase.java
index dae4231..8e2d0ee 100644
--- a/tests/hostside/helper/java/android/virt/test/VirtualizationTestCaseBase.java
+++ b/tests/hostside/helper/java/android/virt/test/VirtualizationTestCaseBase.java
@@ -401,7 +401,11 @@
}
protected boolean isCuttlefish() throws Exception {
- String productName = getDevice().getProperty("ro.product.name");
+ return isCuttlefish(getDevice());
+ }
+
+ protected static boolean isCuttlefish(ITestDevice device) throws Exception {
+ String productName = device.getProperty("ro.product.name");
return (null != productName)
&& (productName.startsWith("aosp_cf_x86")
|| productName.startsWith("aosp_cf_arm")