Batch migration of frameworks/base TEST_MAPPING to test_module_config modules
As part of go/test-module-config we are moving test options from
TEST_MAPPING -> Android.bp files.
In previous Cls, we created the new `test_module_config` rules in
Android.bp
This is updating the TEST_MAPPING file to use those rules.
It is also removing "FlakyTest and IgnoreTest" exclude annoations as
they are now added in gcl files per run rather than ad-hoc per module.
I have a script that looks at the generated tradefed config file for the
new options added in Android.bp files, then it looks at TEST_MAPPING
files and find the places to update where the options match for the
test.
I am also doing abtd runs of each TEST_MAPPING file before and after my
change and ensuring the number of tests run is the same (or at least as
many). There are cases where tradefed would comping include-filters
across TEST_MAPPING entries for the same module, but now they will be
purposefully split up, causing some tests to be run under two different
modules.
Flag: TEST_ONLY
Test: Ran adbt on each TEST_MAPPING and compared before and after
results. Verified we were still running all the tests we were before.
i.e. after the adbt run, I would download the test artfiact for the
tradefed detailed evenvt and compare test counts.
You can see CtsAppTestCases became CtsAppTestCases_cts_requesttileserviceaddtest, etc.
I'm not including results for all 100 TEST_MAPPING files, but I did
verify with scripts and eyes.
Minor differences (like 2011 vs 2009) on a test that didn't change are
ignored, but in general there were more tests run, not fewer.
% diff <(grep started frameworks_base_services_core_java_com_android_server_statusbar_TEST_MAPPING/BASE.details) <(grep started frameworks_base_services_core_java_com_android_server_statusbar_TEST_MAPPING/NEW.details) | grep run
< [run x86_64 CtsAppTestCases (testCount: 6,attempt: 0) started]
> [run x86_64 CtsAppTestCases_cts_requesttileserviceaddtest (testCount: 6,attempt: 0) started]
< [run x86_64 CtsLocationFineTestCases (testCount: 96,attempt: 0) started]
> [run x86_64 CtsLocationFineTestCases_android_server_location (testCount: 96,attempt: 0) started]
< [run x86_64 FrameworksNetTests (testCount: 2009,attempt: 0) started]
> [run x86_64 FrameworksNetTests (testCount: 2011,attempt: 0) started]
Test-Mapping-Slo-Bypass-Bug: b/335015078
Change-Id: If6e3cd0624ac1c16f1cd088566d967769f47199c
diff --git a/packages/PrintSpooler/TEST_MAPPING b/packages/PrintSpooler/TEST_MAPPING
index ad3b44f..f8bf8a0 100644
--- a/packages/PrintSpooler/TEST_MAPPING
+++ b/packages/PrintSpooler/TEST_MAPPING
@@ -1,12 +1,7 @@
{
"presubmit": [
{
- "name": "CtsPrintTestCases",
- "options": [
- {
- "include-annotation": "android.platform.test.annotations.Presubmit"
- }
- ]
+ "name": "CtsPrintTestCases_Presubmit"
}
],
"postsubmit": [
diff --git a/packages/SettingsLib/src/com/android/settingslib/users/TEST_MAPPING b/packages/SettingsLib/src/com/android/settingslib/users/TEST_MAPPING
index 71cbcb5..1346ee5 100644
--- a/packages/SettingsLib/src/com/android/settingslib/users/TEST_MAPPING
+++ b/packages/SettingsLib/src/com/android/settingslib/users/TEST_MAPPING
@@ -1,12 +1,7 @@
{
"presubmit": [
{
- "name": "SettingsLibTests",
- "options": [
- {
- "include-filter": "com.android.settingslib.users."
- }
- ]
+ "name": "SettingsLibTests_settingslib_users"
}
]
}
\ No newline at end of file
diff --git a/packages/SettingsProvider/TEST_MAPPING b/packages/SettingsProvider/TEST_MAPPING
index 0eed2b7..cf9ed2e 100644
--- a/packages/SettingsProvider/TEST_MAPPING
+++ b/packages/SettingsProvider/TEST_MAPPING
@@ -4,12 +4,7 @@
"name": "SettingsProviderTest"
},
{
- "name": "CtsProviderTestCases",
- "options": [
- {
- "include-filter": "android.provider.cts.settings."
- }
- ]
+ "name": "CtsProviderTestCases_cts_settings"
}
],
"postsubmit": [
diff --git a/packages/Shell/TEST_MAPPING b/packages/Shell/TEST_MAPPING
index 9bb1b4b..6b9f1eb 100644
--- a/packages/Shell/TEST_MAPPING
+++ b/packages/Shell/TEST_MAPPING
@@ -1,23 +1,10 @@
{
"presubmit": [
{
- "name": "CtsBugreportTestCases",
- "options": [
- {
- "exclude-annotation": "androidx.test.filters.LargeTest"
- }
- ]
+ "name": "CtsBugreportTestCases_android_server_os"
},
{
- "name": "ShellTests",
- "options": [
- {
- "exclude-annotation": "androidx.test.filters.LargeTest"
- },
- {
- "exclude-annotation": "androidx.test.filters.FlakyTest"
- }
- ]
+ "name": "ShellTests_android_server_os"
},
{
"name": "CtsUiAutomationTestCases",
diff --git a/packages/SystemUI/TEST_MAPPING b/packages/SystemUI/TEST_MAPPING
index 16dd4e5..07a1e63 100644
--- a/packages/SystemUI/TEST_MAPPING
+++ b/packages/SystemUI/TEST_MAPPING
@@ -21,15 +21,7 @@
// v2/android-virtual-infra/test_mapping/presubmit-avd
"presubmit": [
{
- "name": "SystemUIGoogleTests",
- "options": [
- {
- "exclude-annotation": "org.junit.Ignore"
- },
- {
- "exclude-annotation": "androidx.test.filters.FlakyTest"
- }
- ]
+ "name": "SystemUIGoogleTests"
},
{
// Permission indicators
@@ -48,15 +40,7 @@
},
{
// Permission indicators
- "name": "CtsVoiceRecognitionTestCases",
- "options": [
- {
- "exclude-annotation": "org.junit.Ignore"
- },
- {
- "exclude-annotation": "androidx.test.filters.FlakyTest"
- }
- ]
+ "name": "CtsVoiceRecognitionTestCases"
}
],
diff --git a/packages/SystemUI/accessibility/accessibilitymenu/TEST_MAPPING b/packages/SystemUI/accessibility/accessibilitymenu/TEST_MAPPING
index 4a10108..1820f39 100644
--- a/packages/SystemUI/accessibility/accessibilitymenu/TEST_MAPPING
+++ b/packages/SystemUI/accessibility/accessibilitymenu/TEST_MAPPING
@@ -2,12 +2,7 @@
// TODO: b/324945360 - Re-enable on presubmit after fixing failures
"postsubmit": [
{
- "name": "AccessibilityMenuServiceTests",
- "options": [
- {
- "exclude-annotation": "android.support.test.filters.FlakyTest"
- }
- ]
+ "name": "AccessibilityMenuServiceTests"
}
]
}
\ No newline at end of file
diff --git a/packages/SystemUI/compose/core/TEST_MAPPING b/packages/SystemUI/compose/core/TEST_MAPPING
index b71c5fb..56e531d 100644
--- a/packages/SystemUI/compose/core/TEST_MAPPING
+++ b/packages/SystemUI/compose/core/TEST_MAPPING
@@ -1,26 +1,10 @@
{
"presubmit": [
{
- "name": "PlatformComposeCoreTests",
- "options": [
- {
- "exclude-annotation": "org.junit.Ignore"
- },
- {
- "exclude-annotation": "androidx.test.filters.FlakyTest"
- }
- ]
+ "name": "PlatformComposeCoreTests"
},
{
- "name": "SystemUIComposeGalleryTests",
- "options": [
- {
- "exclude-annotation": "org.junit.Ignore"
- },
- {
- "exclude-annotation": "androidx.test.filters.FlakyTest"
- }
- ]
+ "name": "SystemUIComposeGalleryTests"
}
]
}
\ No newline at end of file
diff --git a/packages/SystemUI/compose/scene/TEST_MAPPING b/packages/SystemUI/compose/scene/TEST_MAPPING
index f9424ed..65ba037 100644
--- a/packages/SystemUI/compose/scene/TEST_MAPPING
+++ b/packages/SystemUI/compose/scene/TEST_MAPPING
@@ -1,37 +1,13 @@
{
"presubmit": [
{
- "name": "PlatformComposeSceneTransitionLayoutTests",
- "options": [
- {
- "exclude-annotation": "org.junit.Ignore"
- },
- {
- "exclude-annotation": "androidx.test.filters.FlakyTest"
- }
- ]
+ "name": "PlatformComposeSceneTransitionLayoutTests"
},
{
- "name": "PlatformComposeCoreTests",
- "options": [
- {
- "exclude-annotation": "org.junit.Ignore"
- },
- {
- "exclude-annotation": "androidx.test.filters.FlakyTest"
- }
- ]
+ "name": "PlatformComposeCoreTests"
},
{
- "name": "SystemUIComposeGalleryTests",
- "options": [
- {
- "exclude-annotation": "org.junit.Ignore"
- },
- {
- "exclude-annotation": "androidx.test.filters.FlakyTest"
- }
- ]
+ "name": "SystemUIComposeGalleryTests"
}
]
}
\ No newline at end of file
diff --git a/packages/SystemUI/src/com/android/systemui/qs/TEST_MAPPING b/packages/SystemUI/src/com/android/systemui/qs/TEST_MAPPING
index 66f020f..75140be 100644
--- a/packages/SystemUI/src/com/android/systemui/qs/TEST_MAPPING
+++ b/packages/SystemUI/src/com/android/systemui/qs/TEST_MAPPING
@@ -1,28 +1,12 @@
{
"presubmit": [
{
- "name": "CtsTileServiceTestCases",
- "options": [
- {
- "exclude-annotation": "org.junit.Ignore"
- },
- {
- "exclude-annotation": "androidx.test.filters.FlakyTest"
- }
- ]
+ "name": "CtsTileServiceTestCases"
}
],
"postsubmit": [
{
- "name": "QuickSettingsDeviceResetTests",
- "options": [
- {
- "exclude-annotation": "org.junit.Ignore"
- },
- {
- "exclude-annotation": "androidx.test.filters.FlakyTest"
- }
- ]
+ "name": "QuickSettingsDeviceResetTests"
}
]
}
\ No newline at end of file
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/TEST_MAPPING b/packages/SystemUI/src/com/android/systemui/statusbar/TEST_MAPPING
index 718c1c0f..3232684 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/TEST_MAPPING
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/TEST_MAPPING
@@ -1,18 +1,7 @@
{
"presubmit": [
{
- "name": "CtsNotificationTestCases",
- "options": [
- {
- "exclude-annotation": "androidx.test.filters.FlakyTest"
- },
- {
- "exclude-annotation": "org.junit.Ignore"
- },
- {
- "exclude-annotation": "androidx.test.filters.LargeTest"
- }
- ]
+ "name": "CtsNotificationTestCases_notification"
}
],
"postsubmit": [