Include public GameManager unit tests in presubmit

Switch to use non system uid and grant necessary permission as
otherwise it will crash the test mapping (b/260071873), this was
explained in b/140028487 and a similar fix was done in ag/9523307.

Bug: b/243448953
Test: atest --test-mapping \
      services/core/java/com/android/server/app:presubmit
Change-Id: I93bcc3c9d462fb4a2f90acc5c80ae1bcbc255927
This commit is contained in:
Xiang Wang
2022-11-28 12:01:45 -08:00
parent 8e7404af95
commit 20605110c4
3 changed files with 37 additions and 1 deletions

View File

@@ -201,6 +201,23 @@
"file_patterns": [
"(/|^)PropertyInvalidatedCache.java"
]
},
{
"name": "FrameworksCoreGameManagerTests",
"options": [
{
"exclude-annotation": "androidx.test.filters.FlakyTest"
},
{
"exclude-annotation": "org.junit.Ignore"
},
{
"include-filter": "android.app"
}
],
"file_patterns": [
"(/|^)GameManager[^/]*", "(/|^)GameMode[^/]*"
]
}
],
"presubmit-large": [

View File

@@ -17,7 +17,9 @@
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.android.app.gamemanagertests"
android:sharedUserId="android.uid.system" >
android:sharedUserId="com.android.uid.test" >
<uses-permission android:name="android.permission.MANAGE_GAME_MODE" />
<application android:appCategory="game">
<uses-library android:name="android.test.runner" />

View File

@@ -18,6 +18,23 @@
"exclude-annotation": "androidx.test.filters.FlakyTest"
}
]
},
{
"name": "FrameworksCoreGameManagerTests",
"options": [
{
"exclude-annotation": "androidx.test.filters.FlakyTest"
},
{
"exclude-annotation": "org.junit.Ignore"
},
{
"include-filter": "android.app"
}
],
"file_patterns": [
"(/|^)GameManagerService.java", "(/|^)GameManagerSettings.java"
]
}
]
}