1<?xml version="1.0" encoding="utf-8"?> 2<!-- 3 ~ Copyright (C) 2022 The Android Open Source Project 4 ~ 5 ~ Licensed under the Apache License, Version 2.0 (the "License"); 6 ~ you may not use this file except in compliance with the License. 7 ~ You may obtain a copy of the License at 8 ~ 9 ~ http://www.apache.org/licenses/LICENSE-2.0 10 ~ 11 ~ Unless required by applicable law or agreed to in writing, software 12 ~ distributed under the License is distributed on an "AS IS" BASIS, 13 ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 ~ See the License for the specific language governing permissions and 15 ~ limitations under the License. 16 --> 17 18<configuration description="Config for CTS InputMethodFramework Installation test cases (formerly hostside tests)"> 19 <option name="test-suite-tag" value="cts" /> 20 <option name="config-descriptor:metadata" key="component" value="inputmethod" /> 21 <option name="config-descriptor:metadata" key="parameter" value="all_foldable_states" /> 22 <option name="config-descriptor:metadata" key="parameter" value="instant_app" /> 23 <option name="config-descriptor:metadata" key="parameter" value="not_secondary_user" /> 24 <option name="config-descriptor:metadata" key="parameter" value="not_multi_abi" /> 25 <option name="config-descriptor:metadata" key="parameter" value="run_on_sdk_sandbox" /> 26 27 <object class="com.android.tradefed.testtype.suite.module.DeviceFeatureModuleController" 28 type="module_controller"> 29 <option name="required-feature" value="android.software.input_methods" /> 30 </object> 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/cts/inputmethod/" /> 35 <option name="teardown-command" value="rm -rf /data/local/tmp/cts"/> 36 </target_preparer> 37 38 <target_preparer class="com.android.tradefed.targetprep.suite.SuiteApkInstaller"> 39 <option name="cleanup-apks" value="true" /> 40 <!-- 41 MockIME always needs to be installed as a full package, even when CTS is running 42 for instant apps. 43 --> 44 <option name="force-install-mode" value="FULL"/> 45 <option name="test-file-name" value="CtsMockInputMethod.apk" /> 46 </target_preparer> 47 48 <target_preparer class="com.android.tradefed.targetprep.suite.SuiteApkInstaller"> 49 <option name="cleanup-apks" value="true" /> 50 <option name="force-install-mode" value="FULL"/> 51 <option name="test-file-name" value="CtsInputMethodInstallTestCases.apk" /> 52 </target_preparer> 53 54 <target_preparer class="com.android.compatibility.common.tradefed.targetprep.FilePusher"> 55 <option name="cleanup" value="true" /> 56 <!-- 57 CtsInputMethod1 should not always be installed, but the apk must be 58 available. 59 --> 60 <option name="push" value="CtsInputMethod1.apk->/data/local/tmp/cts/inputmethod/CtsInputMethod1.apk" /> 61 <option name="push" value="CtsInputMethod2.apk->/data/local/tmp/cts/inputmethod/CtsInputMethod2.apk" /> 62 </target_preparer> 63 <target_preparer class="com.android.tradefed.targetprep.suite.SuiteApkInstaller"> 64 <option name="cleanup-apks" value="true" /> 65 <!-- 66 In order to simulate the scenario where the IME client process is normally 67 installed, explicitly set false here. Otherwise, the test APP will be installed under 68 force-queryable mode, which makes the test useless. 69 --> 70 <option name="force-queryable" value="false" /> 71 <option name="test-file-name" value="CtsInputMethodStandaloneTestApp.apk" /> 72 </target_preparer> 73 74 <target_preparer class="com.android.tradefed.targetprep.RunCommandTargetPreparer"> 75 <option name="run-command" value="input keyevent KEYCODE_WAKEUP" /> 76 <option name="run-command" value="wm dismiss-keyguard" /> 77 </target_preparer> 78 79 <test class="com.android.tradefed.testtype.AndroidJUnitTest"> 80 <option name="package" value="android.view.inputmethod.cts.installtests" /> 81 <option name="runtime-hint" value="1m" /> 82 </test> 83</configuration> 84