From c42f32fca114715e3f0d2d4f08493097d2ca8d0d Mon Sep 17 00:00:00 2001 From: Motomu Utsumi Date: Wed, 12 Jun 2024 19:15:26 +0900 Subject: [PATCH] Remove CtsNetTestCasesLatestSdk CtsNetTestCasesLatestSdk was originally used for MTS but aosp/2963602 added CtsNetTestCases to MTS. And CtsNetTestCasesLatestSdk can be removed now. This CL Removes CtsNetTestCasesLatestSdk and updated TEST_MAPPING to use CtsNetTestCases. Test: TH Change-Id: I5bb766c12b67cb9016351a24493ec9dbf695fcf9 --- TEST_MAPPING | 30 +++++++-------------------- tests/cts/net/Android.bp | 19 ----------------- tests/cts/net/AndroidTestTemplate.xml | 4 ++-- 3 files changed, 10 insertions(+), 43 deletions(-) diff --git a/TEST_MAPPING b/TEST_MAPPING index 4cf93a8efa..5e05c83fb0 100644 --- a/TEST_MAPPING +++ b/TEST_MAPPING @@ -1,7 +1,7 @@ { "captiveportal-networkstack-resolve-tethering-mainline-presubmit": [ { - "name": "CtsNetTestCasesLatestSdk", + "name": "CtsNetTestCases", "options": [ { "exclude-annotation": "com.android.testutils.SkipPresubmit" @@ -89,7 +89,7 @@ // Test with APK modules only, in cases where APEX is not supported, or the other modules // were simply not updated { - "name": "CtsNetTestCasesLatestSdk", + "name": "CtsNetTestCases", "options": [ { "exclude-annotation": "com.android.testutils.SkipPresubmit" @@ -115,7 +115,7 @@ // really exist in the field, but there is no strong guarantee, and it is required by MTS // testing for module qualification, where modules are tested independently. { - "name": "CtsNetTestCasesLatestSdk", + "name": "CtsNetTestCases", "options": [ { "exclude-annotation": "com.android.testutils.SkipPresubmit" @@ -158,8 +158,6 @@ }, // Run in addition to mainline-presubmit as mainline-presubmit is not // supported in every branch. - // CtsNetTestCasesLatestSdk uses stable API shims, so does not exercise - // some latest APIs. Run CtsNetTestCases to get coverage of newer APIs. { "name": "CtsNetTestCases", "options": [ @@ -171,18 +169,6 @@ } ] }, - // Also run CtsNetTestCasesLatestSdk to ensure tests using older shims pass. - { - "name": "CtsNetTestCasesLatestSdk", - "options": [ - { - "exclude-annotation": "com.android.testutils.SkipPresubmit" - }, - { - "exclude-annotation": "androidx.test.filters.RequiresDevice" - } - ] - }, // CTS tests that target older SDKs. { "name": "CtsNetTestCasesMaxTargetSdk30", @@ -271,7 +257,7 @@ ], "mainline-presubmit": [ { - "name": "CtsNetTestCasesLatestSdk[CaptivePortalLoginGoogle.apk+NetworkStackGoogle.apk+com.google.android.resolv.apex+com.google.android.tethering.apex]", + "name": "CtsNetTestCases[CaptivePortalLoginGoogle.apk+NetworkStackGoogle.apk+com.google.android.resolv.apex+com.google.android.tethering.apex]", "options": [ { "exclude-annotation": "com.android.testutils.SkipPresubmit" @@ -329,7 +315,7 @@ // Test with APK modules only, in cases where APEX is not supported, or the other modules // were simply not updated { - "name": "CtsNetTestCasesLatestSdk[CaptivePortalLoginGoogle.apk+NetworkStackGoogle.apk]", + "name": "CtsNetTestCases[CaptivePortalLoginGoogle.apk+NetworkStackGoogle.apk]", "options": [ { "exclude-annotation": "com.android.testutils.SkipPresubmit" @@ -353,7 +339,7 @@ // really exist in the field, but there is no strong guarantee, and it is required by MTS // testing for module qualification, where modules are tested independently. { - "name": "CtsNetTestCasesLatestSdk[com.google.android.tethering.apex]", + "name": "CtsNetTestCases[com.google.android.tethering.apex]", "options": [ { "exclude-annotation": "com.android.testutils.SkipPresubmit" @@ -404,7 +390,7 @@ "mainline-postsubmit": [ // Tests on physical devices with SIM cards: postsubmit only for capacity constraints { - "name": "CtsNetTestCasesLatestSdk[CaptivePortalLoginGoogle.apk+NetworkStackGoogle.apk+com.google.android.resolv.apex+com.google.android.tethering.apex]", + "name": "CtsNetTestCases[CaptivePortalLoginGoogle.apk+NetworkStackGoogle.apk+com.google.android.resolv.apex+com.google.android.tethering.apex]", "keywords": ["sim"] }, { @@ -418,7 +404,7 @@ }, // Postsubmit on virtual devices to monitor flakiness of @SkipMainlinePresubmit methods { - "name": "CtsNetTestCasesLatestSdk[CaptivePortalLoginGoogle.apk+NetworkStackGoogle.apk+com.google.android.resolv.apex+com.google.android.tethering.apex]", + "name": "CtsNetTestCases[CaptivePortalLoginGoogle.apk+NetworkStackGoogle.apk+com.google.android.resolv.apex+com.google.android.tethering.apex]", "options": [ { "exclude-annotation": "androidx.test.filters.RequiresDevice" diff --git a/tests/cts/net/Android.bp b/tests/cts/net/Android.bp index ae85701dcf..1cd8327133 100644 --- a/tests/cts/net/Android.bp +++ b/tests/cts/net/Android.bp @@ -111,25 +111,6 @@ java_defaults { min_sdk_version: "30", } -// Networking CTS tests that target the latest released SDK. These tests can be installed on release -// devices at any point in the Android release cycle and are useful for qualifying mainline modules -// on release devices. -android_test { - name: "CtsNetTestCasesLatestSdk", - defaults: [ - "ConnectivityTestsLatestSdkDefaults", - "CtsNetTestCasesDefaults", - "CtsNetTestCasesApiStableDefaults", - ], - test_suites: [ - "general-tests", - "mts-dnsresolver", - "mts-networking", - "mts-tethering", - "mts-wifi", - ], -} - java_defaults { name: "CtsNetTestCasesMaxTargetSdkDefaults", defaults: [ diff --git a/tests/cts/net/AndroidTestTemplate.xml b/tests/cts/net/AndroidTestTemplate.xml index 38f26d8fd3..c072c5be77 100644 --- a/tests/cts/net/AndroidTestTemplate.xml +++ b/tests/cts/net/AndroidTestTemplate.xml @@ -42,8 +42,8 @@ those tests with an annotation matching the name of the APK. This allows us to maintain one AndroidTestTemplate.xml for all CtsNetTestCases*.apk, - and have CtsNetTestCases and CtsNetTestCasesLatestSdk run all tests, but have - CtsNetTestCasesMaxTargetSdk31 run only tests that require target SDK 31. + and have CtsNetTestCases run all tests, but have CtsNetTestCasesMaxTargetSdk31 run only + tests that require target SDK 31. This relies on the fact that if the class specified in include-annotation exists, then the runner will only run the tests annotated with that annotation, but if it does not,