commit | 00432c02c3fc3e0a42c579576a7a596feff0e9c6 | [log] [tgz] |
---|---|---|
author | David Brazdil <dbrazdil@google.com> | Fri Jan 06 17:19:33 2023 +0000 |
committer | Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com> | Fri Jan 06 17:19:33 2023 +0000 |
tree | 78a2207becc44adc50a071b69cdcc1c39af2ecfe | |
parent | 437223deec2dcd5e46ed984217a7d727e42c697d [diff] | |
parent | 27fa790808a6a08720d10db48422312bc336cf39 [diff] |
AuthFsHostTestCases: Also skip beforeClassWithDevice am: 2ffc9278a7 am: 27fa790808 Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/modules/Virtualization/+/20839129 Change-Id: I0cf0cd17293ac047089db0bd81c50328914582bc Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
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")