1<?xml version="1.0" encoding="utf-8"?> 2<!-- Copyright (C) 2021 The Android Open Source Project 3 4 Licensed under the Apache License, Version 2.0 (the "License"); 5 you may not use this file except in compliance with the License. 6 You may obtain a copy of the License at 7 8 http://www.apache.org/licenses/LICENSE-2.0 9 10 Unless required by applicable law or agreed to in writing, software 11 distributed under the License is distributed on an "AS IS" BASIS, 12 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 See the License for the specific language governing permissions and 14 limitations under the License. 15--> 16<configuration description="Runs the silent update install tests"> 17 <option name="test-suite-tag" value="cts" /> 18 <option name="config-descriptor:metadata" key="component" value="packagemanager" /> 19 <option name="config-descriptor:metadata" key="parameter" value="not_instant_app" /> 20 <option name="config-descriptor:metadata" key="parameter" value="not_multi_abi" /> 21 <option name="config-descriptor:metadata" key="parameter" value="secondary_user" /> 22 <option name="config-descriptor:metadata" key="parameter" value="no_foldable_states" /> 23 <target_preparer class="com.android.tradefed.targetprep.suite.SuiteApkInstaller"> 24 <option name="cleanup-apks" value="true" /> 25 <option name="test-file-name" value="CtsSilentUpdateTestCases.apk" /> 26 </target_preparer> 27 <target_preparer class="com.android.tradefed.targetprep.DeviceSetup"> 28 <option name="force-skip-system-props" value="true" /> <!-- avoid restarting device --> 29 <option name="set-global-setting" key="verifier_verify_adb_installs" value="0" /> 30 <option name="restore-settings" value="true" /> 31 <option name="disable-device-config-sync" value="true" /> 32 </target_preparer> 33 <target_preparer class="com.android.tradefed.targetprep.RunCommandTargetPreparer"> 34 <option name="run-command" value="pm uninstall com.android.cts.install.lib.testapp.A" /> 35 <option name="teardown-command" value="pm uninstall com.android.cts.install.lib.testapp.A" /> 36 <!-- Turn on airplane mode --> 37 <option name="run-command" value="cmd connectivity airplane-mode enable" /> 38 <!-- Turn off airplane mode after testing --> 39 <option name="teardown-command" value="cmd connectivity airplane-mode disable" /> 40 <!-- Unlock screen --> 41 <option name="run-command" value="input keyevent KEYCODE_WAKEUP" /> 42 <!-- Dismiss keyguard, in case it's set as "Swipe to unlock" --> 43 <option name="run-command" value="wm dismiss-keyguard" /> 44 <!-- Collapse notifications --> 45 <option name="run-command" value="cmd statusbar collapse" /> 46 <!-- dismiss all system dialogs before launch test --> 47 <option name="run-command" value="am broadcast -a android.intent.action.CLOSE_SYSTEM_DIALOGS" /> 48 </target_preparer> 49 <target_preparer class="com.android.compatibility.common.tradefed.targetprep.FilePusher"> 50 <!-- Push the test APK so we can test self-update --> 51 <option name="push" value="CtsSilentUpdateTestCases.apk->/data/local/tmp/silentupdatetest/CtsSilentUpdateTestCases.apk" /> 52 <option name="push" value="CtsSilentUpdateTestCases_mdpi-v4.apk->/data/local/tmp/silentupdatetest/CtsSilentUpdateTestCases_mdpi-v4.apk" /> 53 </target_preparer> 54 <test class="com.android.compatibility.common.tradefed.testtype.JarHostTest" > 55 <option name="jar" value="CtsSilentUpdateHostTestCases.jar" /> 56 </test> 57</configuration> 58