1<?xml version="1.0" encoding="utf-8"?> 2 3<!-- 4 ~ Copyright (C) 2019 The Android Open Source Project 5 ~ 6 ~ Licensed under the Apache License, Version 2.0 (the "License"); 7 ~ you may not use this file except in compliance with the License. 8 ~ You may obtain a copy of the License at 9 ~ 10 ~ http://www.apache.org/licenses/LICENSE-2.0 11 ~ 12 ~ Unless required by applicable law or agreed to in writing, software 13 ~ distributed under the License is distributed on an "AS IS" BASIS, 14 ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 ~ See the License for the specific language governing permissions and 16 ~ limitations under the License. 17 --> 18 19<configuration description="Runs tests for PermissionController UI."> 20 <option name="test-suite-tag" value="apct" /> 21 <option name="test-suite-tag" value="apct-instrumentation" /> 22 <option name="test-tag" value="PermissionUiTestCases" /> 23 <object type="module_controller" class="com.android.tradefed.testtype.suite.module.Sdk30ModuleController" /> 24 <option name="config-descriptor:metadata" key="mainline-param" value="com.google.android.permission.apex" /> 25 26 <!-- Install test --> 27 <target_preparer class="com.android.tradefed.targetprep.suite.SuiteApkInstaller"> 28 <option name="test-file-name" value="PermissionUiTestCases.apk" /> 29 <option name="cleanup-apks" value="true" /> 30 </target_preparer> 31 32 <!-- Create place to store apks --> 33 <target_preparer class="com.android.tradefed.targetprep.RunCommandTargetPreparer"> 34 <option name="run-command" value="mkdir -p /data/local/tmp/pc-permissionui" /> 35 <option name="teardown-command" value="rm -fr /data/local/tmp/pc-permissionui"/> 36 </target_preparer> 37 38 <!-- Load additional APKs onto device --> 39 <target_preparer class="com.android.tradefed.targetprep.PushFilePreparer"> 40 <option name="push-file" key="CtsAppThatRequestsLocationPermission29.apk" 41 value="/data/local/tmp/pc-permissionui/AppThatRequestsLocation.apk" /> 42 <option name="push-file" key="PermissionUiUseStoragePermissionApp.apk" 43 value="/data/local/tmp/pc-permissionui/PermissionUiUseStoragePermissionApp.apk" /> 44 <option name="push-file" key="PermissionUiUseCameraPermissionApp.apk" 45 value="/data/local/tmp/pc-permissionui/PermissionUiUseCameraPermissionApp.apk" /> 46 <option name="push-file" key="PermissionUiUseHealthConnectPermissionApp.apk" 47 value="/data/local/tmp/pc-permissionui/PermissionUiUseHealthConnectPermissionApp.apk" /> 48 <option name="push-file" key="PermissionUiInvalidUseHealthConnectPermissionApp.apk" 49 value="/data/local/tmp/pc-permissionui/PermissionUiInvalidUseHealthConnectPermissionApp.apk" /> 50 <option name="push-file" key="PermissionUiDefineAdditionalPermissionApp.apk" 51 value="/data/local/tmp/pc-permissionui/PermissionUiDefineAdditionalPermissionApp.apk" /> 52 <option name="push-file" key="PermissionUiUseAdditionalPermissionApp.apk" 53 value="/data/local/tmp/pc-permissionui/PermissionUiUseAdditionalPermissionApp.apk" /> 54 <option name="push-file" key="PermissionUiUseTwoAdditionalPermissionsApp.apk" 55 value="/data/local/tmp/pc-permissionui/PermissionUiUseTwoAdditionalPermissionsApp.apk" /> 56 <option name="push-file" key="PermissionUiReadCalendarPermissionApp.apk" 57 value="/data/local/tmp/pc-permissionui/PermissionUiReadCalendarPermissionApp.apk" /> 58 </target_preparer> 59 60 <!-- Uninstall test-apps --> 61 <target_preparer class="com.android.tradefed.targetprep.RunCommandTargetPreparer"> 62 <option name="teardown-command" value="pm uninstall android.permission.cts.appthatrequestpermission" /> 63 </target_preparer> 64 65 <target_preparer class="com.android.tradefed.targetprep.RunCommandTargetPreparer"> 66 <option name="run-command" value="input keyevent KEYCODE_WAKEUP" /> 67 <option name="run-command" value="wm dismiss-keyguard" /> 68 </target_preparer> 69 70 <target_preparer class="com.android.tradefed.targetprep.DeviceSetup"> 71 <option name="force-skip-system-props" value="true" /> <!-- avoid restarting device --> 72 <option name="set-global-setting" key="verifier_verify_adb_installs" value="0" /> 73 <option name="restore-settings" value="true" /> 74 <option name="disable-device-config-sync" value="true" /> 75 <option name="screen-always-on" value="on" /> 76 </target_preparer> 77 78 <test class="com.android.tradefed.testtype.AndroidJUnitTest" > 79 <option name="package" value="com.android.permissioncontroller.tests.permissionui" /> 80 <option name="runner" value="androidx.test.runner.AndroidJUnitRunner" /> 81 </test> 82</configuration> 83