1<!-- Copyright (C) 2020 The Android Open Source Project
2
3     Licensed under the Apache License, Version 2.0 (the "License");
4     you may not use this file except in compliance with the License.
5     You may obtain a copy of the License at
6
7          http://www.apache.org/licenses/LICENSE-2.0
8
9     Unless required by applicable law or agreed to in writing, software
10     distributed under the License is distributed on an "AS IS" BASIS,
11     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12     See the License for the specific language governing permissions and
13     limitations under the License.
14-->
15<configuration description="Config for CTS input test cases">
16    <option name="test-suite-tag" value="cts" />
17    <option name="config-descriptor:metadata" key="component" value="framework" />
18    <option name="config-descriptor:metadata" key="parameter" value="not_instant_app" />
19    <option name="config-descriptor:metadata" key="parameter" value="multi_abi" />
20    <option name="config-descriptor:metadata" key="parameter" value="secondary_user" />
21    <option name="config-descriptor:metadata" key="parameter" value="all_foldable_states" />
22    <option name="config-descriptor:metadata" key="parameter" value="run_on_sdk_sandbox" />
23    <target_preparer class="com.android.tradefed.targetprep.suite.SuiteApkInstaller">
24        <option name="cleanup-apks" value="true" />
25        <option name="test-file-name" value="CtsInputTestCases.apk" />
26        <option name="test-file-name" value="InputInjectionApp.apk" />
27    </target_preparer>
28    <test class="com.android.tradefed.testtype.AndroidJUnitTest" >
29        <option name="package" value="android.input.cts" />
30        <option name="runtime-hint" value="14s" />
31        <!-- test-timeout unit is ms, value = 10 min -->
32        <option name="test-timeout" value="600000" />
33        <option name="device-listeners" value="android.device.collectors.ScreenshotOnFailureCollector"/>
34        <option name="device-listeners" value="android.tools.collectors.DefaultUITraceListener"/>
35        <!-- DefaultUITraceListener args -->
36        <option name="instrumentation-arg" key="skip_test_success_metrics" value="true"/>
37    </test>
38    <target_preparer class="com.android.tradefed.targetprep.RunCommandTargetPreparer">
39        <!-- TODO(b/285554134): Remove once underlying issue is fixed-->
40        <option name="run-command" value="wm set-ignore-orientation-request false" />
41        <option name="run-command" value="wm set-letterbox-style --isEducationEnabled false" />
42        <!-- Unlock screen -->
43        <option name="run-command" value="input keyevent KEYCODE_WAKEUP" />
44        <!-- Dismiss keyguard, in case it's set as "Swipe to unlock" -->
45        <option name="run-command" value="wm dismiss-keyguard" />
46        <!-- Collapse notifications -->
47        <option name="run-command" value="cmd statusbar collapse" />
48        <!-- dismiss all system dialogs before launch test -->
49        <option name="run-command" value="am broadcast -a android.intent.action.CLOSE_SYSTEM_DIALOGS" />
50    </target_preparer>
51    <metrics_collector class="com.android.tradefed.device.metric.FilePullerLogCollector">
52        <option name="pull-pattern-keys" value="input_.*" />
53        <!-- Pull perfetto traces from DefaultUITraceListener -->
54        <option name="pull-pattern-keys" value="perfetto_file_path*" />
55        <!-- Pull screenshot on test failure -->
56        <option name="pull-pattern-keys"
57            value="android.device.collectors.ScreenshotOnFailureCollector.*\.png" />
58        <!-- Pull files created by tests, like the output of screenshot tests -->
59        <option name="directory-keys" value="/sdcard/Download/CtsInputTestCases" />
60        <option name="collect-on-run-ended-only" value="false" />
61    </metrics_collector>
62</configuration>
63