Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 20605110 authored by Xiang Wang's avatar Xiang Wang
Browse files

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
parent 8e7404af
Loading
Loading
Loading
Loading
+17 −0
Original line number Diff line number Diff line
@@ -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": [
+3 −1
Original line number Diff line number Diff line
@@ -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" />
+17 −0
Original line number Diff line number Diff line
@@ -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"
      ]
    }
  ]
}
 No newline at end of file