1<?xml version="1.0" encoding="utf-8"?>
2<!-- Copyright (C) 2015 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 WindowManager test cases {MODULE}">
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="not_multi_abi" />
21    <option name="config-descriptor:metadata" key="parameter" value="secondary_user" />
22    <option name="config-descriptor:metadata" key="parameter" value="run_on_sdk_sandbox" />
23    <target_preparer class="com.android.tradefed.targetprep.DeviceSetup">
24        <option name="force-skip-system-props" value="true" />
25        <option name="restore-settings" value="true" />
26        <!-- settings put global verifier_engprod 1 -->
27        <option name="set-global-setting" key="verifier_engprod" value="1" />
28        <!-- settings put global verifier_verify_adb_installs 0 -->
29        <option name="set-global-setting" key="verifier_verify_adb_installs" value="0" />
30    </target_preparer>
31    <target_preparer class="com.android.tradefed.targetprep.suite.SuiteApkInstaller">
32        <option name="cleanup-apks" value="true"/>
33        <option name="install-arg" value="-t" />
34        <option name="test-file-name" value="{MODULE}.apk"/>
35        <option name="test-file-name" value="CtsPropertyCompatAllowOrientationOverrideApp.apk" />
36        <option name="test-file-name" value="CtsPropertyCompatAllowDisplayOrientationOverrideApp.apk" />
37        <option name="test-file-name" value="CtsPropertyCompatAllowMinAspectRatioOverrideOptInApp.apk" />
38        <option name="test-file-name" value="CtsPropertyCompatAllowMinAspectRatioOverrideOptOutApp.apk" />
39        <option name="test-file-name" value="CtsPropertyCompatAllowIgnoringOrientationRequestWhenLoopDetectedOptInApp.apk" />
40        <option name="test-file-name" value="CtsPropertyCompatAllowIgnoringOrientationRequestWhenLoopDetectedOptOutApp.apk" />
41        <option name="test-file-name" value="CtsPropertyCompatAllowIgnoringOrientationRequestWhenLoopDetectedUnsetApp.apk" />
42        <option name="test-file-name" value="CtsPropertyCompatAllowResizeableActivityOverridesOptInApp.apk" />
43        <option name="test-file-name" value="CtsPropertyCompatAllowResizeableActivityOverridesOptOutApp.apk" />
44        <option name="test-file-name" value="CtsPropertyCompatAllowUserAspectRatioFullscreenOverrideOptInApp.apk" />
45        <option name="test-file-name" value="CtsPropertyCompatAllowUserAspectRatioFullscreenOverrideOptOutApp.apk" />
46        <option name="test-file-name" value="CtsPropertyCompatAllowUserAspectRatioOverrideOptInApp.apk" />
47        <option name="test-file-name" value="CtsPropertyCompatAllowUserAspectRatioOverrideOptOutApp.apk" />
48        <option name="test-file-name" value="CtsDragAndDropSourceApp.apk"/>
49        <option name="test-file-name" value="CtsDragAndDropTargetApp.apk"/>
50        <option name="test-file-name" value="CtsDeviceAlertWindowTestApp.apk"/>
51        <option name="test-file-name" value="CtsAlertWindowService.apk"/>
52        <option name="test-file-name" value="CtsPropertyCompatAllowSandboxingViewBoundsApisApp.apk"/>
53        <option name="test-file-name" value="CtsPropertyCompatOptOutSandboxingViewBoundsApisApp.apk"/>
54        <option name="test-file-name" value="CtsPropertyCompatEnableFakeFocusOptInApp.apk" />
55        <option name="test-file-name" value="CtsPropertyCompatEnableFakeFocusOptOutApp.apk" />
56        <option name="test-file-name" value="CtsPropertyIgnoreOrientationRequestOverrideOptInApp.apk"/>
57        <option name="test-file-name" value="CtsPropertyIgnoreOrientationRequestOverrideOptOutApp.apk"/>
58        <option name="test-file-name" value="CtsPropertyCameraCompatAllowForceRotationApp.apk"/>
59        <option name="test-file-name" value="CtsPropertyCameraCompatAllowRefreshApp.apk"/>
60        <option name="test-file-name" value="CtsPropertyCameraCompatEnableRefreshViaPauseOptInApp.apk"/>
61        <option name="test-file-name" value="CtsPropertyCameraCompatEnableRefreshViaPauseOptOutApp.apk"/>
62        <option name="test-file-name" value="CtsDeviceServicesTestApp.apk" />
63        <option name="test-file-name" value="CtsDeviceServicesTestApp27.apk" />
64        <option name="test-file-name" value="CtsDeviceServicesTestApp30.apk" />
65        <option name="test-file-name" value="CtsDeviceServicesTestSecondApp.apk" />
66        <option name="test-file-name" value="CtsDeviceServicesTestThirdApp.apk" />
67        <option name="test-file-name" value="CtsDeviceDeprecatedSdkApp.apk" />
68        <option name="test-file-name" value="CtsDeviceDeskResourcesApp.apk" />
69        <option name="test-file-name" value="CtsDeviceDisplaySizeApp.apk" />
70        <option name="test-file-name" value="CtsDevicePrereleaseSdkApp.apk" />
71        <option name="test-file-name" value="CtsDeviceProfileableApp.apk" />
72        <option name="test-file-name" value="CtsDeviceTranslucentTestApp.apk" />
73        <option name="test-file-name" value="CtsDeviceTranslucentTestApp26.apk" />
74        <option name="test-file-name" value="CtsMockInputMethod.apk" />
75        <option name="test-file-name" value="CtsDeviceServicesTestShareUidAppA.apk" />
76        <option name="test-file-name" value="CtsDeviceServicesTestShareUidAppB.apk" />
77        <option name="test-file-name" value="CtsWindowManagerJetpackSecondUidApp.apk" />
78        <option name="test-file-name" value="CtsBackLegacyApp.apk" />
79        <option name="test-file-name" value="CtsWindowManagerExternalApp.apk" />
80    </target_preparer>
81    <!-- Some older apk cannot be installed as instant, so we force them full mode -->
82    <target_preparer class="com.android.tradefed.targetprep.suite.SuiteApkInstaller">
83        <option name="cleanup-apks" value="true"/>
84        <option name="force-install-mode" value="FULL"/>
85        <option name="test-file-name" value="CtsDragAndDropTargetAppSdk23.apk"/>
86        <option name="test-file-name" value="CtsDeviceAlertWindowTestAppSdk25.apk"/>
87    </target_preparer>
88    <!-- Necessary for Automotive devices - no-op for other Android verticals -->
89    <target_preparer class="com.android.tradefed.targetprep.RunCommandTargetPreparer">
90        <option name="run-command"
91                value="settings put secure android.car.ENABLE_INITIAL_NOTICE_SCREEN_TO_USER 0" />
92        <option name="teardown-command"
93                value="settings put secure android.car.ENABLE_INITIAL_NOTICE_SCREEN_TO_USER 1" />
94    </target_preparer>
95    <target_preparer class="com.android.tradefed.targetprep.RunCommandTargetPreparer">
96      <!-- Disable hidden API checking, see b/166236554 -->
97        <option name="run-command" value="settings put global hidden_api_policy 1" />
98        <option name="teardown-command" value="settings delete global hidden_api_policy" />
99        <option name="run-command" value="am compat enable ALLOW_TEST_API_ACCESS android.server.wm.app"  />
100        <option name="teardown-command" value="am compat reset ALLOW_TEST_API_ACCESS android.server.wm.app" />
101        <!-- ensure lock screen is enabled -->
102        <option name="run-command" value="locksettings set-disabled false" />
103        <!-- ensure user setup is completed -->
104        <option name="run-command" value="settings put secure user_setup_complete 1" />
105        <!-- disable DeprecatedAbi warning -->
106        <option name="run-command" value="setprop debug.wm.disable_deprecated_abi_dialog 1" />
107    </target_preparer>
108
109    <test class="com.android.tradefed.testtype.AndroidJUnitTest">
110        <option name="package" value="android.server.wm.cts"/>
111        <option name="runtime-hint" value="1h"/>
112        <option name="device-listeners" value="android.tools.collectors.DefaultUITraceListener"/>
113        <option name="device-listeners" value="android.device.collectors.ScreenshotOnFailureCollector"/>
114        <!-- DefaultUITraceListener args -->
115        <option name="instrumentation-arg" key="skip_test_success_metrics" value="true"/>
116        <option name="instrumentation-arg" key="per_class" value="true"/>
117    </test>
118
119    <!-- Collect the files from DumpOnFailure. -->
120    <metrics_collector class="com.android.tradefed.device.metric.FilePullerLogCollector">
121        <option name="pull-pattern-keys" value="perfetto_file_path*"/>
122        <option name="directory-keys" value="/sdcard/DumpOnFailure" />
123        <option name="directory-keys" value="/data/user/0/android.server.wm.cts/files" />
124        <!-- Collect the files generated on error -->
125        <option name="pull-pattern-keys" value="android.device.collectors.ScreenshotOnFailureCollector.*\.png" />
126        <option name="collect-on-run-ended-only" value="true" />
127    </metrics_collector>
128
129    <!-- Needed for DeprecatedAbiTest -->
130    <target_preparer class="com.android.tradefed.targetprep.PushFilePreparer">
131        <option name="cleanup" value="true" />
132        <option name="push-file" key="CtsDeviceDeprecatedAbiApp.apk" value="/data/local/tmp/cts/CtsDeviceDeprecatedAbiApp.apk" />
133    </target_preparer>
134</configuration>
135