1<?xml version="1.0" encoding="utf-8"?>
2<!-- Copyright 2023 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="Config for CTS input host test cases">
17    <option name="test-suite-tag" value="cts" />
18    <option name="config-descriptor:metadata" key="component" value="framework" />
19    <option name="config-descriptor:metadata" key="parameter" value="not_instant_app" />
20    <option name="config-descriptor:metadata" key="parameter" value="multi_abi" />
21    <option name="config-descriptor:metadata" key="parameter" value="secondary_user" />
22    <target_preparer class="com.android.tradefed.targetprep.suite.SuiteApkInstaller">
23        <option name="cleanup-apks" value="true" />
24        <option name="force-install-mode" value="FULL"/>
25        <option name="test-file-name" value="TestIme.apk" />
26    </target_preparer>
27    <target_preparer class="com.android.tradefed.targetprep.suite.SuiteApkInstaller">
28        <option name="cleanup-apks" value="true" />
29        <option name="test-file-name" value="CtsInputHostTestHelperApp.apk" />
30    </target_preparer>
31    <target_preparer class="com.android.tradefed.targetprep.RunCommandTargetPreparer">
32        <option name="test-user-token" value="%TEST_USER%"/>
33        <option name="throw-if-cmd-fail" value="true" />
34        <option name="run-command" value="am wait-for-broadcast-idle" />
35        <option name="run-command" value="sleep 1" />
36        <!-- If 'ime enable' is flaky, increase the sleep time above. see b/188105339. -->
37        <option name="run-command" value="ime enable --user %TEST_USER% com.android.cts.testime/.TestIme" />
38        <option name="run-command" value="ime set --user %TEST_USER% com.android.cts.testime/.TestIme" />
39        <option name="teardown-command" value="ime reset --user %TEST_USER%" />
40        <option name="run-command" value="input keyevent KEYCODE_WAKEUP" />
41        <option name="run-command" value="wm dismiss-keyguard" />
42        <option name="run-command" value="cmd statusbar collapse" />
43    </target_preparer>
44    <test class="com.android.compatibility.common.tradefed.testtype.JarHostTest">
45        <option name="jar" value="CtsInputHostTestCases.jar" />
46        <option name="runtime-hint" value="30s" />
47    </test>
48</configuration>
49