From 255f348a49b9486b2dea4a9dfa82b8419a9ac84a Mon Sep 17 00:00:00 2001 From: Felka Chang Date: Mon, 3 Jan 2022 15:46:46 +0800 Subject: [PATCH] Tidy up CtsAppSecurityHostTestCases for PM test plan According to the go/audit_pm_test_plan_sheet_2021, the following tests are necessary to run for the presubmit process. * android.appsecurity.cts.ApkVerityInstallTest (ag/15434575) * android.appsecurity.cts.AppSecurityTests (ag/16473520) * android.appsecurity.cts.ApplicationVisibilityTest (ag/15151833) * android.appsecurity.cts.EphemeralTest (ag/16097868) * android.appsecurity.cts.ExternalStorageHostTest (ag/16473520) * android.appsecurity.cts.InstantAppUserTest (ag/16097868) * android.appsecurity.cts.IsolatedSplitsTests (ag/15509173) * android.appsecurity.cts.OverlayHostTest (ag/15938874) * android.appsecurity.cts.PackageVisibilityTest (ag/15461803) * android.appsecurity.cts.PkgInstallSignatureVerificationTest (ag/16095666) * android.appsecurity.cts.PrivilegedUpdateTests (ag/15744081) * android.appsecurity.cts.SharedUserIdTest (ag/7013394) * android.appsecurity.cts.SplitTests (ag/15509173) CtsAppSecurityHostTestCases contains some tests not belonging to PackageManager. It annotates @Presubmit for those classes belonging to PackageManager. It will be triggered via frameworks/base/core/java/android/content/pmTEST_MAPPING by the presubmit process. Test: TP="CtsAppSecurityHostTestCases:android.appsecurity.cts"; atest \ ${TP}.ApkVerityInstallTest \ ${TP}.AppSecurityTests \ ${TP}.ApplicationVisibilityTest \ ${TP}.EphemeralTest \ ${TP}.ExternalStorageHostTest \ ${TP}.InstantAppUserTest \ ${TP}.IsolatedSplitsTests \ ${TP}.OverlayHostTest \ ${TP}.PackageVisibilityTest \ ${TP}.PkgInstallSignatureVerificationTest \ ${TP}.PrivilegedUpdateTests \ ${TP}.SharedUserIdTest \ ${TP}.SplitTests Bug: 180650365 Change-Id: I0b626e311a598d0fb953019a016a1dbafc380f81 --- core/java/android/content/pm/TEST_MAPPING | 17 +++++++++++++++ .../java/com/android/server/pm/TEST_MAPPING | 21 ------------------- 2 files changed, 17 insertions(+), 21 deletions(-) diff --git a/core/java/android/content/pm/TEST_MAPPING b/core/java/android/content/pm/TEST_MAPPING index df3466f29d76a..a503d14b6de4b 100644 --- a/core/java/android/content/pm/TEST_MAPPING +++ b/core/java/android/content/pm/TEST_MAPPING @@ -131,6 +131,23 @@ "exclude-annotation": "org.junit.Ignore" } ] + }, + { + "name": "CtsAppSecurityHostTestCases", + "options": [ + { + "include-annotation": "android.platform.test.annotations.Presubmit" + }, + { + "exclude-annotation": "android.platform.test.annotations.Postsubmit" + }, + { + "exclude-annotation": "androidx.test.filters.FlakyTest" + }, + { + "exclude-annotation": "org.junit.Ignore" + } + ] } ], "postsubmit": [ diff --git a/services/core/java/com/android/server/pm/TEST_MAPPING b/services/core/java/com/android/server/pm/TEST_MAPPING index 4bcc2a33c6316..f87063a83e4f1 100644 --- a/services/core/java/com/android/server/pm/TEST_MAPPING +++ b/services/core/java/com/android/server/pm/TEST_MAPPING @@ -55,27 +55,6 @@ } ] }, - { - "name": "CtsAppSecurityHostTestCases", - "options": [ - { - "include-filter": "android.appsecurity.cts.PrivilegedUpdateTests" - } - ] - }, - { - "name": "CtsAppSecurityHostTestCases", - "file_patterns": [ - "core/java/.*Install.*", - "services/core/.*Install.*", - "services/core/java/com/android/server/pm/.*" - ], - "options": [ - { - "include-filter": "android.appsecurity.cts.SplitTests" - } - ] - }, { "name": "PackageManagerServiceHostTests", "options": [