summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Makoto Onuki <omakoto@google.com> 2024-02-08 10:34:03 -0800
committer Makoto Onuki <omakoto@google.com> 2024-02-08 10:58:56 -0800
commitf22f4cbc7d812a6c9a04d667871dbf8eed05e1f6 (patch)
treeba67e9df717dba6ac75b95427b8be9c0221d8d24
parentdc86f285a91d5dd82bd3421494a07ccf34aaf448 (diff)
Remove core-libart-for-host from ravenwood-runtime
Test: ./ravenwood/run-ravenwood-tests.sh Test: Treehugger Bug: 324433654 Change-Id: I68048479b15f26b1e9248a90b20de16016f47ef9
-rw-r--r--Ravenwood.bp1
-rw-r--r--core/tests/coretests/src/com/android/internal/os/BinderDeathDispatcherTest.java8
-rw-r--r--core/tests/coretests/src/com/android/internal/os/StoragedUidIoStatsReaderTest.java8
-rw-r--r--ravenwood/junit-src/android/platform/test/annotations/DisabledOnRavenwood.java9
-rw-r--r--ravenwood/junit-src/android/platform/test/annotations/IgnoreUnderRavenwood.java3
5 files changed, 28 insertions, 1 deletions
diff --git a/Ravenwood.bp b/Ravenwood.bp
index 0877bcedb609..d13c4d78190c 100644
--- a/Ravenwood.bp
+++ b/Ravenwood.bp
@@ -97,7 +97,6 @@ android_ravenwood_libgroup {
"framework-minus-apex.ravenwood",
"hoststubgen-helper-runtime.ravenwood",
"hoststubgen-helper-framework-runtime.ravenwood",
- "core-libart-for-host",
"all-updatable-modules-system-stubs",
"junit",
"truth",
diff --git a/core/tests/coretests/src/com/android/internal/os/BinderDeathDispatcherTest.java b/core/tests/coretests/src/com/android/internal/os/BinderDeathDispatcherTest.java
index 83103333f68b..27398eae2b8b 100644
--- a/core/tests/coretests/src/com/android/internal/os/BinderDeathDispatcherTest.java
+++ b/core/tests/coretests/src/com/android/internal/os/BinderDeathDispatcherTest.java
@@ -31,10 +31,13 @@ import android.os.Parcel;
import android.os.RemoteException;
import android.os.ResultReceiver;
import android.os.ShellCallback;
+import android.platform.test.annotations.DisabledOnRavenwood;
+import android.platform.test.ravenwood.RavenwoodRule;
import androidx.test.filters.SmallTest;
import androidx.test.runner.AndroidJUnit4;
+import org.junit.Rule;
import org.junit.Test;
import org.junit.runner.RunWith;
@@ -43,6 +46,9 @@ import java.io.FileDescriptor;
@SmallTest
@RunWith(AndroidJUnit4.class)
public class BinderDeathDispatcherTest {
+ @Rule
+ public RavenwoodRule mRavenwood = new RavenwoodRule.Builder().build();
+
private static class MyTarget implements IInterface, IBinder {
public boolean isAlive = true;
public DeathRecipient mRecipient;
@@ -195,6 +201,7 @@ public class BinderDeathDispatcherTest {
}
@Test
+ @DisabledOnRavenwood(reason = "b/324433654 -- depends on unsupported classes")
public void testRegisterAndKill() {
BinderDeathDispatcher<MyTarget> d = new BinderDeathDispatcher<>();
@@ -265,6 +272,7 @@ public class BinderDeathDispatcherTest {
}
@Test
+ @DisabledOnRavenwood(reason = "b/324433654 -- depends on unsupported classes")
public void duplicateRegistrations() {
BinderDeathDispatcher<MyTarget> d = new BinderDeathDispatcher<>();
diff --git a/core/tests/coretests/src/com/android/internal/os/StoragedUidIoStatsReaderTest.java b/core/tests/coretests/src/com/android/internal/os/StoragedUidIoStatsReaderTest.java
index 80061a57b3d2..cc6c4e849dd8 100644
--- a/core/tests/coretests/src/com/android/internal/os/StoragedUidIoStatsReaderTest.java
+++ b/core/tests/coretests/src/com/android/internal/os/StoragedUidIoStatsReaderTest.java
@@ -20,12 +20,15 @@ import static org.mockito.Mockito.verify;
import static org.mockito.Mockito.verifyNoMoreInteractions;
import android.os.FileUtils;
+import android.platform.test.annotations.DisabledOnRavenwood;
+import android.platform.test.ravenwood.RavenwoodRule;
import androidx.test.filters.SmallTest;
import androidx.test.runner.AndroidJUnit4;
import org.junit.After;
import org.junit.Before;
+import org.junit.Rule;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.mockito.Mock;
@@ -44,6 +47,8 @@ import java.nio.file.Files;
@SmallTest
@RunWith(AndroidJUnit4.class)
public class StoragedUidIoStatsReaderTest {
+ @Rule
+ public RavenwoodRule mRavenwood = new RavenwoodRule.Builder().build();
private File mTestDir;
private File mTestFile;
@@ -79,6 +84,7 @@ public class StoragedUidIoStatsReaderTest {
* Tests that reading a file with 3 uids works as expected.
*/
@Test
+ @DisabledOnRavenwood(reason = "b/324433654 -- depends on unsupported classes")
public void testReadExpected() throws Exception {
BufferedWriter bufferedWriter = Files.newBufferedWriter(mTestFile.toPath());
int[] uids = {0, 100, 200};
@@ -116,6 +122,7 @@ public class StoragedUidIoStatsReaderTest {
* Tests that a line with less than 11 items is passed over.
*/
@Test
+ @DisabledOnRavenwood(reason = "b/324433654 -- depends on unsupported classes")
public void testLineDoesNotElevenEntries() throws Exception {
BufferedWriter bufferedWriter = Files.newBufferedWriter(mTestFile.toPath());
@@ -139,6 +146,7 @@ public class StoragedUidIoStatsReaderTest {
* Tests that a line that is malformed is passed over.
*/
@Test
+ @DisabledOnRavenwood(reason = "b/324433654 -- depends on unsupported classes")
public void testLineIsMalformed() throws Exception {
BufferedWriter bufferedWriter = Files.newBufferedWriter(mTestFile.toPath());
diff --git a/ravenwood/junit-src/android/platform/test/annotations/DisabledOnRavenwood.java b/ravenwood/junit-src/android/platform/test/annotations/DisabledOnRavenwood.java
index 4bf09807c360..1adb0f31da54 100644
--- a/ravenwood/junit-src/android/platform/test/annotations/DisabledOnRavenwood.java
+++ b/ravenwood/junit-src/android/platform/test/annotations/DisabledOnRavenwood.java
@@ -42,4 +42,13 @@ import java.lang.annotation.Target;
@Target({ElementType.METHOD, ElementType.TYPE})
@Retention(RetentionPolicy.RUNTIME)
public @interface DisabledOnRavenwood {
+ /**
+ * One or more classes that aren't yet supported by Ravenwood, which this test depends on.
+ */
+ Class<?>[] blockedBy() default {};
+
+ /**
+ * General free-form description of why this test is being ignored.
+ */
+ String reason() default "";
}
diff --git a/ravenwood/junit-src/android/platform/test/annotations/IgnoreUnderRavenwood.java b/ravenwood/junit-src/android/platform/test/annotations/IgnoreUnderRavenwood.java
index 916dd5943059..7faa654b903c 100644
--- a/ravenwood/junit-src/android/platform/test/annotations/IgnoreUnderRavenwood.java
+++ b/ravenwood/junit-src/android/platform/test/annotations/IgnoreUnderRavenwood.java
@@ -35,9 +35,12 @@ import java.lang.annotation.Target;
* to be enabled.
*
* @hide
+ *
+ * @deprecated Use {@link DisabledOnRavenwood} instead.
*/
@Target({ElementType.METHOD, ElementType.TYPE})
@Retention(RetentionPolicy.RUNTIME)
+@Deprecated
public @interface IgnoreUnderRavenwood {
/**
* One or more classes that aren't yet supported by Ravenwood, which this test depends on.