summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndroid Build Coastguard Worker <android-build-coastguard-worker@google.com>2024-05-02 01:24:05 +0000
committerGerrit Code Review <noreply-gerritcodereview@google.com>2024-05-02 01:24:05 +0000
commitdda6f8e1ca344f42e7eeffaf0833295ef975324c (patch)
treea52e763ec7a884f7232c950e1689ec46f3c3d405
parentd200a4cfbcb7a462e106e2b36ea3dd278acbc6c7 (diff)
parentd98fd7c4d7f7917b2afcf6ed70ce53a5c2e501cd (diff)
downloadcts-sdk-release.tar.gz
Merge "Snap for 11790536 from 89acb8cf816fef79fb48e533a7b9c61f52c578af to sdk-release" into sdk-releasesdk-release
-rw-r--r--apps/CtsVerifier/AndroidManifest.xml2
-rw-r--r--hostsidetests/jdwptunnel/src/android/jdwptunnel/cts/JdwpTunnelTest.java30
-rw-r--r--tests/tests/graphics/src/android/graphics/cts/VulkanFeaturesTest.java4
-rw-r--r--tests/tests/keystore/src/android/keystore/cts/KeyAttestationTest.java3
-rw-r--r--tests/tests/media/codec/src/android/media/codec/cts/VideoCodecTest.java2
5 files changed, 37 insertions, 4 deletions
diff --git a/apps/CtsVerifier/AndroidManifest.xml b/apps/CtsVerifier/AndroidManifest.xml
index f2f1d5bf364..10f40eac2b7 100644
--- a/apps/CtsVerifier/AndroidManifest.xml
+++ b/apps/CtsVerifier/AndroidManifest.xml
@@ -3573,6 +3573,8 @@
android:value="multi_display_mode" />
<meta-data android:name="ApiTest"
android:value="android.widget.Toast#makeText" />
+ <meta-data android:name="test_excluded_features"
+ android:value="android.hardware.type.watch" />
</activity>
<activity android:name=".notifications.BubblesVerifierActivity"
diff --git a/hostsidetests/jdwptunnel/src/android/jdwptunnel/cts/JdwpTunnelTest.java b/hostsidetests/jdwptunnel/src/android/jdwptunnel/cts/JdwpTunnelTest.java
index 9961273349c..c7ebd52c49c 100644
--- a/hostsidetests/jdwptunnel/src/android/jdwptunnel/cts/JdwpTunnelTest.java
+++ b/hostsidetests/jdwptunnel/src/android/jdwptunnel/cts/JdwpTunnelTest.java
@@ -345,13 +345,39 @@ public class JdwpTunnelTest extends BaseHostJUnit4Test {
assertTrue((is.read() & 0x80) == 0x80);
}
- private void assertThreadSuspensionState(VirtualMachine vm, boolean expected) {
+ private boolean testThreadSuspensionState(VirtualMachine vm, boolean expected) {
for (ThreadReference tr : vm.allThreads()) {
boolean isSuspended = tr.isSuspended();
if (isSuspended != expected) {
- fail("Thread in unexpected state '" + tr.name() + "' isSuspended=" + isSuspended);
+ return false;
}
}
+ return true;
+ }
+
+ private String dumpThreads(VirtualMachine vm) {
+ StringBuilder result = new StringBuilder();
+ for (ThreadReference tr : vm.allThreads()) {
+ result.append("Thread: '");
+ result.append(tr.name());
+ result.append("' isSuspended=");
+ result.append(tr.isSuspended());
+ result.append("\n");
+ }
+ return result.toString();
+ }
+
+ private void assertThreadSuspensionState(VirtualMachine vm, boolean expected)
+ throws InterruptedException {
+ // If the debugger connects too fast, the VM may not have had time to hit the
+ // suspension point. We try several times to remedy to this problem.
+ for (int i = 0; i < 4; i++) {
+ if (testThreadSuspensionState(vm, expected)) {
+ return;
+ }
+ Thread.sleep(1000);
+ }
+ fail("Threads are in unexpected state (expected=" + expected + ")\n" + dumpThreads(vm));
}
// App can be started "suspended" which means all its threads will be suspended shorty after
diff --git a/tests/tests/graphics/src/android/graphics/cts/VulkanFeaturesTest.java b/tests/tests/graphics/src/android/graphics/cts/VulkanFeaturesTest.java
index 969fcf89900..f87c5c8a041 100644
--- a/tests/tests/graphics/src/android/graphics/cts/VulkanFeaturesTest.java
+++ b/tests/tests/graphics/src/android/graphics/cts/VulkanFeaturesTest.java
@@ -235,6 +235,7 @@ public class VulkanFeaturesTest {
private JSONObject mVkJSON = null;
private JSONObject mVulkanDevices[];
private JSONObject mBestDevice = null;
+ private boolean mIsTV = false;
@Before
public void setup() throws Throwable {
@@ -262,6 +263,8 @@ public class VulkanFeaturesTest {
if (DEBUG) {
Log.d(TAG, feature.name + "=" + feature.version);
}
+ } else if (PackageManager.FEATURE_LEANBACK.equals(feature.name)) {
+ mIsTV = true;
}
}
}
@@ -501,6 +504,7 @@ public class VulkanFeaturesTest {
@Test
public void testAndroidBaselineProfile2021Support() throws JSONException {
assumeTrue("Skipping because Vulkan is not supported", mVulkanHardwareVersion != null);
+ assumeTrue("Skipping because ABP is not required of TV devices", !mIsTV);
if (!hasOnlyCpuDevice()) {
assertEquals("This device must support the ABP 2021.", "", nativeGetABPSupport());
diff --git a/tests/tests/keystore/src/android/keystore/cts/KeyAttestationTest.java b/tests/tests/keystore/src/android/keystore/cts/KeyAttestationTest.java
index cd233e02c80..4e6d8a99872 100644
--- a/tests/tests/keystore/src/android/keystore/cts/KeyAttestationTest.java
+++ b/tests/tests/keystore/src/android/keystore/cts/KeyAttestationTest.java
@@ -470,7 +470,8 @@ public class KeyAttestationTest {
}
private void testAttestationKmVersionMatchesFeatureVersion(boolean isStrongBox)
- throws Exception {
+ throws Exception {
+ assumeTrue("Device does not support attestation", TestUtils.isAttestationSupported());
String keystoreAlias = "test_key";
Date now = new Date();
diff --git a/tests/tests/media/codec/src/android/media/codec/cts/VideoCodecTest.java b/tests/tests/media/codec/src/android/media/codec/cts/VideoCodecTest.java
index 697d96ba5f9..ef7f205cac1 100644
--- a/tests/tests/media/codec/src/android/media/codec/cts/VideoCodecTest.java
+++ b/tests/tests/media/codec/src/android/media/codec/cts/VideoCodecTest.java
@@ -74,7 +74,7 @@ public class VideoCodecTest extends VideoCodecTestBase {
// The tolerance varies by the bitrate, because lower bitrates interact with
// video quality standards introduced in Android 12.
private static final double[] MAX_CBR_BITRATE_VARIATIONS = { 0.20, 0.20, 0.20, 0.20 };
- private static final double[] MAX_VBR_BITRATE_VARIATIONS = { 0.30, 0.20, 0.20, 0.20 };
+ private static final double[] MAX_VBR_BITRATE_VARIATIONS = { 0.50, 0.30, 0.30, 0.30 };
// Average PSNR values for reference Google Video codec for the above bitrates.
private static final double[] REFERENCE_AVERAGE_PSNR = { 33.1, 35.2, 36.6, 37.8 };
// Minimum PSNR values for reference Google Video codec for the above bitrates.