Merge "Remove CtsNetTestCasesLatestSdk" into main

This commit is contained in:
Motomu Utsumi 2024-07-05 06:15:04 +00:00 • committed by Gerrit Code Review
commit 77db323f37
3 changed files with 10 additions and 43 deletions

View file

@ -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",
@ -275,7 +261,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"
@ -333,7 +319,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"
@ -357,7 +343,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"
@ -408,7 +394,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"]
},
{
@ -422,7 +408,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"

View file

@ -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: [

View file

@ -48,8 +48,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,