commit | 27fa790808a6a08720d10db48422312bc336cf39 | [log] [tgz] |
---|---|---|
author | David Brazdil <dbrazdil@google.com> | Fri Jan 06 16:46:30 2023 +0000 |
committer | Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com> | Fri Jan 06 16:46:30 2023 +0000 |
tree | 4d313f4e95fd2dfa9fd9d24bb6ead91b4e9c894a | |
parent | 435972c9c1fe964ecc6e8ac6ae13a429552d5822 [diff] | |
parent | 2ffc9278a75ad2ec0ad21f68cdf7247ee63416fc [diff] |
AuthFsHostTestCases: Also skip beforeClassWithDevice am: 2ffc9278a7 Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/modules/Virtualization/+/20839129 Change-Id: I8e776515361b35a295d7b7b96cde889b830ebd32 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")