diff --git a/core/java/android/app/TEST_MAPPING b/core/java/android/app/TEST_MAPPING
index f133c8aa58996..0bdc222f323c1 100644
--- a/core/java/android/app/TEST_MAPPING
+++ b/core/java/android/app/TEST_MAPPING
@@ -218,6 +218,23 @@
"file_patterns": [
"(/|^)GameManager[^/]*", "(/|^)GameMode[^/]*"
]
+ },
+ {
+ "name": "HdmiCecTests",
+ "options": [
+ {
+ "exclude-annotation": "androidx.test.filters.FlakyTest"
+ },
+ {
+ "exclude-annotation": "org.junit.Ignore"
+ },
+ {
+ "include-filter": "android.hardware.hdmi"
+ }
+ ],
+ "file_patterns": [
+ "(/|^)DeviceFeature[^/]*", "(/|^)Hdmi[^/]*"
+ ]
}
],
"presubmit-large": [
diff --git a/core/tests/coretests/src/android/hardware/hdmi/HdmiUtilsTest.java b/core/tests/coretests/src/android/hardware/hdmi/HdmiUtilsTest.java
index d8799cb182c87..34ca502851a0c 100644
--- a/core/tests/coretests/src/android/hardware/hdmi/HdmiUtilsTest.java
+++ b/core/tests/coretests/src/android/hardware/hdmi/HdmiUtilsTest.java
@@ -17,12 +17,15 @@ package android.hardware.hdmi;
import static com.google.common.truth.Truth.assertThat;
+import android.platform.test.annotations.Presubmit;
+
import androidx.test.filters.SmallTest;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.junit.runners.JUnit4;
+@Presubmit
@SmallTest
@RunWith(JUnit4.class)
/** Tests for {@link HdmiUtils} class. */
diff --git a/core/tests/hdmitests/Android.bp b/core/tests/hdmitests/Android.bp
index f49e05329f626..3d04937c91955 100644
--- a/core/tests/hdmitests/Android.bp
+++ b/core/tests/hdmitests/Android.bp
@@ -29,9 +29,11 @@ android_test {
"androidx.test.rules",
"frameworks-base-testutils",
"guava-android-testlib",
+ "platform-test-annotations",
"truth-prebuilt",
],
libs: ["android.test.runner"],
platform_apis: true,
certificate: "platform",
+ test_suites: ["device-tests"],
}
diff --git a/core/tests/hdmitests/AndroidTest.xml b/core/tests/hdmitests/AndroidTest.xml
index 0c8da28cab7cc..7376004653c29 100644
--- a/core/tests/hdmitests/AndroidTest.xml
+++ b/core/tests/hdmitests/AndroidTest.xml
@@ -22,6 +22,9 @@
+
+
+
@@ -30,5 +33,6 @@
+
\ No newline at end of file
diff --git a/core/tests/hdmitests/src/android/hardware/hdmi/DeviceFeaturesTest.java b/core/tests/hdmitests/src/android/hardware/hdmi/DeviceFeaturesTest.java
index 875ab38623548..9005afb1ebbf0 100644
--- a/core/tests/hdmitests/src/android/hardware/hdmi/DeviceFeaturesTest.java
+++ b/core/tests/hdmitests/src/android/hardware/hdmi/DeviceFeaturesTest.java
@@ -22,6 +22,8 @@ import static android.hardware.hdmi.DeviceFeatures.FEATURE_SUPPORT_UNKNOWN;
import static com.google.common.truth.Truth.assertThat;
+import android.platform.test.annotations.Presubmit;
+
import androidx.test.filters.SmallTest;
import com.google.common.testing.EqualsTester;
@@ -31,6 +33,7 @@ import org.junit.runner.RunWith;
import org.junit.runners.JUnit4;
/** Tests for {@link DeviceFeatures} */
+@Presubmit
@RunWith(JUnit4.class)
@SmallTest
public class DeviceFeaturesTest {
diff --git a/core/tests/hdmitests/src/android/hardware/hdmi/HdmiAudioSystemClientTest.java b/core/tests/hdmitests/src/android/hardware/hdmi/HdmiAudioSystemClientTest.java
index e16a2f8e85600..bb3e76890b85c 100644
--- a/core/tests/hdmitests/src/android/hardware/hdmi/HdmiAudioSystemClientTest.java
+++ b/core/tests/hdmitests/src/android/hardware/hdmi/HdmiAudioSystemClientTest.java
@@ -18,6 +18,7 @@ package android.hardware.hdmi;
import android.os.Handler;
import android.os.test.TestLooper;
+import android.platform.test.annotations.Presubmit;
import android.util.Log;
import androidx.test.filters.SmallTest;
@@ -34,6 +35,7 @@ import java.util.List;
/**
* Tests for {@link HdmiAudioSystemClient}
*/
+@Presubmit
@RunWith(JUnit4.class)
@SmallTest
public class HdmiAudioSystemClientTest {
diff --git a/core/tests/hdmitests/src/android/hardware/hdmi/HdmiDeviceInfoTest.java b/core/tests/hdmitests/src/android/hardware/hdmi/HdmiDeviceInfoTest.java
index 5f7468e084bfa..5039fe8b6cc22 100755
--- a/core/tests/hdmitests/src/android/hardware/hdmi/HdmiDeviceInfoTest.java
+++ b/core/tests/hdmitests/src/android/hardware/hdmi/HdmiDeviceInfoTest.java
@@ -16,6 +16,8 @@
package android.hardware.hdmi;
+import android.platform.test.annotations.Presubmit;
+
import androidx.test.filters.SmallTest;
import com.google.common.testing.EqualsTester;
@@ -25,6 +27,7 @@ import org.junit.runner.RunWith;
import org.junit.runners.JUnit4;
/** Tests for {@link HdmiDeviceInfo} */
+@Presubmit
@RunWith(JUnit4.class)
@SmallTest
public class HdmiDeviceInfoTest {
diff --git a/core/tests/hdmitests/src/android/hardware/hdmi/HdmiPortInfoTest.java b/core/tests/hdmitests/src/android/hardware/hdmi/HdmiPortInfoTest.java
index 2bce7475f4c0d..fde1122690038 100755
--- a/core/tests/hdmitests/src/android/hardware/hdmi/HdmiPortInfoTest.java
+++ b/core/tests/hdmitests/src/android/hardware/hdmi/HdmiPortInfoTest.java
@@ -16,6 +16,8 @@
package android.hardware.hdmi;
+import android.platform.test.annotations.Presubmit;
+
import androidx.test.filters.SmallTest;
import com.google.common.testing.EqualsTester;
@@ -25,6 +27,7 @@ import org.junit.runner.RunWith;
import org.junit.runners.JUnit4;
/** Tests for {@link HdmiPortInfo} */
+@Presubmit
@RunWith(JUnit4.class)
@SmallTest
public class HdmiPortInfoTest {
diff --git a/core/tests/hdmitests/src/android/hardware/hdmi/HdmiUtilsTest.java b/core/tests/hdmitests/src/android/hardware/hdmi/HdmiUtilsTest.java
index fdc6b847d0558..13212ce8e84e9 100644
--- a/core/tests/hdmitests/src/android/hardware/hdmi/HdmiUtilsTest.java
+++ b/core/tests/hdmitests/src/android/hardware/hdmi/HdmiUtilsTest.java
@@ -18,6 +18,8 @@ package android.hardware.hdmi;
import static com.google.common.truth.Truth.assertThat;
+import android.platform.test.annotations.Presubmit;
+
import androidx.test.filters.SmallTest;
import org.junit.Test;
@@ -26,6 +28,7 @@ import org.junit.runners.JUnit4;
/**
* Tests for {@link HdmiUtils}.
*/
+@Presubmit
@RunWith(JUnit4.class)
@SmallTest
public class HdmiUtilsTest {