blob: fff0ed107175ad772fb142bd96a0ddb7249133d5 [file] [log] [blame]
Eric Lina26582d2022-02-16 19:08:47 +00001<?xml version="1.0" encoding="utf-8"?>
2<!-- Copyright (C) 2021 The Android Open Source Project
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 http://www.apache.org/licenses/LICENSE-2.0
7 Unless required by applicable law or agreed to in writing, software
8 distributed under the License is distributed on an "AS IS" BASIS,
9 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
10 See the License for the specific language governing permissions and
11 limitations under the License.
12-->
Eric Lin7968f052022-03-17 15:05:42 +000013<configuration description="Config for CTS Nearby Mainline multi devices end-to-end test suite">
Eric Lin56b97ff2022-06-08 17:28:48 +000014 <!-- Only run tests if the device under test is SDK version 33 (Android 13) or above. -->
15 <object type="module_controller"
16 class="com.android.tradefed.testtype.suite.module.Sdk33ModuleController" />
17 <!-- Only run NearbyMultiDevicesTestSuite in MTS if the Nearby Mainline module is installed. -->
18 <object type="module_controller"
19 class="com.android.tradefed.testtype.suite.module.MainlineTestModuleController">
20 <option name="mainline-module-package-name" value="com.google.android.tethering" />
21 </object>
22
23 <option name="test-suite-tag" value="apct" />
24 <option name="test-tag" value="NearbyMultiDevicesTestSuite" />
Eric Lina26582d2022-02-16 19:08:47 +000025 <option name="config-descriptor:metadata" key="component" value="wifi" />
26 <option name="config-descriptor:metadata" key="parameter" value="not_instant_app" />
27 <option name="config-descriptor:metadata" key="parameter" value="not_multi_abi" />
28 <option name="config-descriptor:metadata" key="parameter" value="not_secondary_user" />
29
30 <device name="device1">
31 <!-- For coverage to work, the APK should not be uninstalled until after coverage is pulled.
32 So it's a lot easier to install APKs outside the python code.
33 -->
Eric Lineeddac92022-03-30 18:11:24 +080034 <target_preparer class="com.android.tradefed.targetprep.RootTargetPreparer" />
35 <target_preparer class="com.android.compatibility.common.tradefed.targetprep.FilePusher">
36 <option name="remount-system" value="true" />
37 <option name="push" value="NearbyMultiDevicesClientsSnippets.apk->/system/app/NearbyMultiDevicesClientsSnippets/NearbyMultiDevicesClientsSnippets.apk" />
38 <option name="push" value="NearbyFastPairSeekerDataProvider.apk->/system/app/NearbyFastPairSeekerDataProvider/NearbyFastPairSeekerDataProvider.apk" />
Eric Lina26582d2022-02-16 19:08:47 +000039 </target_preparer>
Eric Lineeddac92022-03-30 18:11:24 +080040 <target_preparer class="com.android.tradefed.targetprep.RebootTargetPreparer" />
Eric Lina26582d2022-02-16 19:08:47 +000041 <target_preparer class="com.android.tradefed.targetprep.RunCommandTargetPreparer">
42 <option name="run-command" value="input keyevent KEYCODE_WAKEUP" />
43 <option name="run-command" value="wm dismiss-keyguard" />
44 </target_preparer>
Eric Lind7766892022-03-17 14:50:02 +000045 <target_preparer class="com.android.tradefed.targetprep.DeviceSetup">
46 <option name="force-skip-system-props" value="true" /> <!-- avoid restarting device -->
47 <option name="screen-always-on" value="on" />
Eric Lineeddac92022-03-30 18:11:24 +080048 <!-- List permissions requested by the APK: aapt d permissions <PATH_TO_YOUR_APK> -->
49 <option
50 name="run-command"
51 value="pm grant android.nearby.multidevices android.permission.BLUETOOTH" />
52 <option
53 name="run-command"
54 value="pm grant android.nearby.multidevices android.permission.BLUETOOTH_ADMIN" />
55 <option
56 name="run-command"
57 value="pm grant android.nearby.multidevices android.permission.BLUETOOTH_ADVERTISE" />
58 <option
59 name="run-command"
60 value="pm grant android.nearby.multidevices android.permission.BLUETOOTH_CONNECT" />
61 <option
62 name="run-command"
63 value="pm grant android.nearby.multidevices android.permission.BLUETOOTH_PRIVILEGED" />
64 <option
65 name="run-command"
66 value="pm grant android.nearby.multidevices android.permission.BLUETOOTH_SCAN" />
67 <option
68 name="run-command"
69 value="pm grant android.nearby.multidevices android.permission.INTERNET" />
70 <option
71 name="run-command"
72 value="pm grant android.nearby.multidevices android.permission.GET_ACCOUNTS" />
73 <option
74 name="run-command"
75 value="pm grant android.nearby.multidevices android.permission.WRITE_SECURE_SETTINGS" />
76 <option
77 name="run-command"
78 value="pm grant android.nearby.multidevices android.permission.REORDER_TASKS" />
Eric Lind7766892022-03-17 14:50:02 +000079 </target_preparer>
Eric Lina26582d2022-02-16 19:08:47 +000080 </device>
81 <device name="device2">
Eric Lineeddac92022-03-30 18:11:24 +080082 <target_preparer class="com.android.tradefed.targetprep.RootTargetPreparer" />
83 <target_preparer class="com.android.compatibility.common.tradefed.targetprep.FilePusher">
84 <option name="remount-system" value="true" />
85 <option name="push" value="NearbyMultiDevicesClientsSnippets.apk->/system/app/NearbyMultiDevicesClientsSnippets/NearbyMultiDevicesClientsSnippets.apk" />
86 <option name="push" value="NearbyFastPairSeekerDataProvider.apk->/system/app/NearbyFastPairSeekerDataProvider/NearbyFastPairSeekerDataProvider.apk" />
Eric Lina26582d2022-02-16 19:08:47 +000087 </target_preparer>
Eric Lineeddac92022-03-30 18:11:24 +080088 <target_preparer class="com.android.tradefed.targetprep.RebootTargetPreparer" />
Eric Lina26582d2022-02-16 19:08:47 +000089 <target_preparer class="com.android.tradefed.targetprep.RunCommandTargetPreparer">
90 <option name="run-command" value="input keyevent KEYCODE_WAKEUP" />
91 <option name="run-command" value="wm dismiss-keyguard" />
92 </target_preparer>
Eric Lind7766892022-03-17 14:50:02 +000093 <target_preparer class="com.android.tradefed.targetprep.DeviceSetup">
94 <option name="force-skip-system-props" value="true" /> <!-- avoid restarting device -->
95 <option name="screen-always-on" value="on" />
Eric Lineeddac92022-03-30 18:11:24 +080096 <!-- List permissions requested by the APK: aapt d permissions <PATH_TO_YOUR_APK> -->
97 <option
98 name="run-command"
99 value="pm grant android.nearby.multidevices android.permission.BLUETOOTH" />
100 <option
101 name="run-command"
102 value="pm grant android.nearby.multidevices android.permission.BLUETOOTH_ADMIN" />
103 <option
104 name="run-command"
105 value="pm grant android.nearby.multidevices android.permission.BLUETOOTH_ADVERTISE" />
106 <option
107 name="run-command"
108 value="pm grant android.nearby.multidevices android.permission.BLUETOOTH_CONNECT" />
109 <option
110 name="run-command"
111 value="pm grant android.nearby.multidevices android.permission.BLUETOOTH_PRIVILEGED" />
112 <option
113 name="run-command"
114 value="pm grant android.nearby.multidevices android.permission.BLUETOOTH_SCAN" />
115 <option
116 name="run-command"
117 value="pm grant android.nearby.multidevices android.permission.INTERNET" />
118 <option
119 name="run-command"
120 value="pm grant android.nearby.multidevices android.permission.GET_ACCOUNTS" />
121 <option
122 name="run-command"
123 value="pm grant android.nearby.multidevices android.permission.WRITE_SECURE_SETTINGS" />
124 <option
125 name="run-command"
126 value="pm grant android.nearby.multidevices android.permission.REORDER_TASKS" />
Eric Lind7766892022-03-17 14:50:02 +0000127 </target_preparer>
Eric Lina26582d2022-02-16 19:08:47 +0000128 </device>
129
130 <test class="com.android.tradefed.testtype.mobly.MoblyBinaryHostTest">
131 <!-- The mobly-par-file-name should match the module name -->
Eric Lin56b97ff2022-06-08 17:28:48 +0000132 <option name="mobly-par-file-name" value="NearbyMultiDevicesTestSuite" />
Eric Lina26582d2022-02-16 19:08:47 +0000133 <!-- Timeout limit in milliseconds for all test cases of the python binary -->
134 <option name="mobly-test-timeout" value="60000" />
135 </test>
136</configuration>
137