| <?xml version="1.0" encoding="utf-8"?> |
| <!-- |
| ~ Copyright (C) 2022 The Android Open Source Project |
| ~ |
| ~ Licensed under the Apache License, Version 2.0 (the "License"); |
| ~ you may not use this file except in compliance with the License. |
| ~ You may obtain a copy of the License at |
| ~ |
| ~ http://www.apache.org/licenses/LICENSE-2.0 |
| ~ |
| ~ Unless required by applicable law or agreed to in writing, software |
| ~ distributed under the License is distributed on an "AS IS" BASIS, |
| ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| ~ See the License for the specific language governing permissions and |
| ~ limitations under the License. |
| --> |
| |
| <configuration description="Config for CTS InputMethodFramework Installation test cases (formerly hostside tests)"> |
| <option name="test-suite-tag" value="cts" /> |
| <option name="config-descriptor:metadata" key="component" value="inputmethod" /> |
| <option name="config-descriptor:metadata" key="parameter" value="all_foldable_states" /> |
| <option name="config-descriptor:metadata" key="parameter" value="not_instant_app" /> |
| <option name="config-descriptor:metadata" key="parameter" value="not_secondary_user" /> |
| <option name="config-descriptor:metadata" key="parameter" value="not_multi_abi" /> |
| |
| <object class="com.android.tradefed.testtype.suite.module.DeviceFeatureModuleController" |
| type="module_controller"> |
| <option name="required-feature" value="android.software.input_methods" /> |
| </object> |
| |
| <!-- Create place to store apks --> |
| <target_preparer class="com.android.tradefed.targetprep.RunCommandTargetPreparer"> |
| <option name="run-command" value="mkdir -p /data/local/tmp/cts/inputmethod/" /> |
| <option name="teardown-command" value="rm -rf /data/local/tmp/cts"/> |
| </target_preparer> |
| |
| <target_preparer class="com.android.tradefed.targetprep.suite.SuiteApkInstaller"> |
| <option name="cleanup-apks" value="true" /> |
| <!-- |
| MockIME always needs to be installed as a full package, even when CTS is running |
| for instant apps. |
| --> |
| <option name="force-install-mode" value="FULL"/> |
| <option name="test-file-name" value="CtsMockInputMethod.apk" /> |
| <option name="test-file-name" value="CtsMockInputMethod2.apk" /> |
| </target_preparer> |
| |
| <target_preparer class="com.android.tradefed.targetprep.suite.SuiteApkInstaller"> |
| <option name="cleanup-apks" value="true" /> |
| <option name="force-install-mode" value="FULL"/> |
| <option name="test-file-name" value="CtsInputMethodInstallTestCases.apk" /> |
| </target_preparer> |
| |
| <target_preparer class="com.android.compatibility.common.tradefed.targetprep.FilePusher"> |
| <option name="cleanup" value="true" /> |
| <!-- |
| CtsInputMethod1 should not always be installed, but the apk must be |
| available. |
| --> |
| <option name="push" value="CtsInputMethod1.apk->/data/local/tmp/cts/inputmethod/CtsInputMethod1.apk" /> |
| <option name="push" value="CtsInputMethod2.apk->/data/local/tmp/cts/inputmethod/CtsInputMethod2.apk" /> |
| <option name="push" value="CtsDirectBootAwareIme.apk->/data/local/tmp/cts/inputmethod/CtsDirectBootAwareIme.apk" /> |
| </target_preparer> |
| <target_preparer class="com.android.tradefed.targetprep.suite.SuiteApkInstaller"> |
| <option name="cleanup-apks" value="true" /> |
| <!-- |
| In order to simulate the scenario where the IME client process is normally |
| installed, explicitly set false here. Otherwise, the test APP will be installed under |
| force-queryable mode, which makes the test useless. |
| --> |
| <option name="force-queryable" value="false" /> |
| <option name="test-file-name" value="CtsInputMethodStandaloneTestApp.apk" /> |
| </target_preparer> |
| |
| <target_preparer class="com.android.tradefed.targetprep.RunCommandTargetPreparer"> |
| <option name="run-command" value="input keyevent KEYCODE_WAKEUP" /> |
| <option name="run-command" value="wm dismiss-keyguard" /> |
| </target_preparer> |
| |
| <test class="com.android.tradefed.testtype.AndroidJUnitTest"> |
| <option name="package" value="android.view.inputmethod.cts.installtests" /> |
| <option name="runtime-hint" value="1m" /> |
| <option name="device-listeners" value="android.tools.collectors.DefaultUITraceListener"/> |
| <option name="device-listeners" value="android.device.collectors.ScreenshotOnFailureCollector"/> |
| <!-- DefaultUITraceListener args --> |
| <option name="instrumentation-arg" key="skip_test_success_metrics" value="true"/> |
| <option name="instrumentation-arg" key="per_class" value="true"/> |
| </test> |
| |
| <!-- Collect the test artifacts. --> |
| <metrics_collector class="com.android.tradefed.device.metric.FilePullerLogCollector"> |
| <option name="pull-pattern-keys" value="perfetto_file_path" /> |
| <option name="directory-keys" value="/sdcard/DumpOnFailure" /> |
| <!-- Collect the files generated on error --> |
| <option name="pull-pattern-keys" value="android.device.collectors.ScreenshotOnFailureCollector.*\.png" /> |
| <option name="collect-on-run-ended-only" value="true" /> |
| <option name="clean-up" value="true" /> |
| </metrics_collector> |
| </configuration> |