From a8fb311a246f2abf57b048e33acd1df6349f3c1c Mon Sep 17 00:00:00 2001 From: Ronald Braunstein Date: Thu, 12 Sep 2024 19:13:07 +0000 Subject: 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 --- libs/WindowManager/Jetpack/src/TEST_MAPPING | 26 ++-------------------- .../src/com/android/wm/shell/back/TEST_MAPPING | 26 ++-------------------- 2 files changed, 4 insertions(+), 48 deletions(-) (limited to 'libs') diff --git a/libs/WindowManager/Jetpack/src/TEST_MAPPING b/libs/WindowManager/Jetpack/src/TEST_MAPPING index f8f64001dd24..600c79bb88a4 100644 --- a/libs/WindowManager/Jetpack/src/TEST_MAPPING +++ b/libs/WindowManager/Jetpack/src/TEST_MAPPING @@ -1,32 +1,10 @@ { "presubmit": [ { - "name": "WMJetpackUnitTests", - "options": [ - { - "include-annotation": "android.platform.test.annotations.Presubmit" - }, - { - "exclude-annotation": "androidx.test.filters.FlakyTest" - }, - { - "exclude-annotation": "org.junit.Ignore" - } - ] + "name": "WMJetpackUnitTests_Presubmit" }, { - "name": "CtsWindowManagerJetpackTestCases", - "options": [ - { - "include-annotation": "android.platform.test.annotations.Presubmit" - }, - { - "exclude-annotation": "androidx.test.filters.FlakyTest" - }, - { - "exclude-annotation": "org.junit.Ignore" - } - ] + "name": "CtsWindowManagerJetpackTestCases_Presubmit" } ], "imports": [ diff --git a/libs/WindowManager/Shell/src/com/android/wm/shell/back/TEST_MAPPING b/libs/WindowManager/Shell/src/com/android/wm/shell/back/TEST_MAPPING index f02559f36169..df3a369febbc 100644 --- a/libs/WindowManager/Shell/src/com/android/wm/shell/back/TEST_MAPPING +++ b/libs/WindowManager/Shell/src/com/android/wm/shell/back/TEST_MAPPING @@ -1,32 +1,10 @@ { "presubmit": [ { - "name": "WMShellUnitTests", - "options": [ - { - "exclude-annotation": "androidx.test.filters.FlakyTest" - }, - { - "include-filter": "com.android.wm.shell.back" - } - ] + "name": "WMShellUnitTests_shell_back" }, { - "name": "CtsWindowManagerDeviceBackNavigation", - "options": [ - { - "exclude-annotation": "androidx.test.filters.FlakyTest" - }, - { - "include-filter": "android.server.wm.backnavigation.BackGestureInvokedTest" - }, - { - "include-filter": "android.server.wm.backnavigation.BackNavigationTests" - }, - { - "include-filter": "android.server.wm.backnavigation.OnBackInvokedCallbackGestureTest" - } - ] + "name": "CtsWindowManagerDeviceBackNavigation_com_android_wm_shell_back" } ] } -- cgit v1.2.3-59-g8ed1b