blob: c1f6a70d59524218490477217444606cc355334a [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>
45 <target_preparer class="com.android.tradefed.targetprep.PythonVirtualenvPreparer">
46 <!-- Any python dependencies can be specified and will be installed with pip -->
Julien Desprez6d28b972022-03-23 16:45:25 +000047 <!-- TODO(b/225958696): Import python dependencies -->
Eric Lina26582d2022-02-16 19:08:47 +000048 <option name="dep-module" value="mobly" />
Eric Lina26582d2022-02-16 19:08:47 +000049 </target_preparer>
Eric Lind7766892022-03-17 14:50:02 +000050 <target_preparer class="com.android.tradefed.targetprep.DeviceSetup">
51 <option name="force-skip-system-props" value="true" /> <!-- avoid restarting device -->
52 <option name="screen-always-on" value="on" />
Eric Lineeddac92022-03-30 18:11:24 +080053 <!-- List permissions requested by the APK: aapt d permissions <PATH_TO_YOUR_APK> -->
54 <option
55 name="run-command"
56 value="pm grant android.nearby.multidevices android.permission.BLUETOOTH" />
57 <option
58 name="run-command"
59 value="pm grant android.nearby.multidevices android.permission.BLUETOOTH_ADMIN" />
60 <option
61 name="run-command"
62 value="pm grant android.nearby.multidevices android.permission.BLUETOOTH_ADVERTISE" />
63 <option
64 name="run-command"
65 value="pm grant android.nearby.multidevices android.permission.BLUETOOTH_CONNECT" />
66 <option
67 name="run-command"
68 value="pm grant android.nearby.multidevices android.permission.BLUETOOTH_PRIVILEGED" />
69 <option
70 name="run-command"
71 value="pm grant android.nearby.multidevices android.permission.BLUETOOTH_SCAN" />
72 <option
73 name="run-command"
74 value="pm grant android.nearby.multidevices android.permission.INTERNET" />
75 <option
76 name="run-command"
77 value="pm grant android.nearby.multidevices android.permission.GET_ACCOUNTS" />
78 <option
79 name="run-command"
80 value="pm grant android.nearby.multidevices android.permission.WRITE_SECURE_SETTINGS" />
81 <option
82 name="run-command"
83 value="pm grant android.nearby.multidevices android.permission.REORDER_TASKS" />
Eric Lind7766892022-03-17 14:50:02 +000084 </target_preparer>
Eric Lina26582d2022-02-16 19:08:47 +000085 </device>
86 <device name="device2">
Eric Lineeddac92022-03-30 18:11:24 +080087 <target_preparer class="com.android.tradefed.targetprep.RootTargetPreparer" />
88 <target_preparer class="com.android.compatibility.common.tradefed.targetprep.FilePusher">
89 <option name="remount-system" value="true" />
90 <option name="push" value="NearbyMultiDevicesClientsSnippets.apk->/system/app/NearbyMultiDevicesClientsSnippets/NearbyMultiDevicesClientsSnippets.apk" />
91 <option name="push" value="NearbyFastPairSeekerDataProvider.apk->/system/app/NearbyFastPairSeekerDataProvider/NearbyFastPairSeekerDataProvider.apk" />
Eric Lina26582d2022-02-16 19:08:47 +000092 </target_preparer>
Eric Lineeddac92022-03-30 18:11:24 +080093 <target_preparer class="com.android.tradefed.targetprep.RebootTargetPreparer" />
Eric Lina26582d2022-02-16 19:08:47 +000094 <target_preparer class="com.android.tradefed.targetprep.RunCommandTargetPreparer">
95 <option name="run-command" value="input keyevent KEYCODE_WAKEUP" />
96 <option name="run-command" value="wm dismiss-keyguard" />
97 </target_preparer>
Eric Lind7766892022-03-17 14:50:02 +000098 <target_preparer class="com.android.tradefed.targetprep.DeviceSetup">
99 <option name="force-skip-system-props" value="true" /> <!-- avoid restarting device -->
100 <option name="screen-always-on" value="on" />
Eric Lineeddac92022-03-30 18:11:24 +0800101 <!-- List permissions requested by the APK: aapt d permissions <PATH_TO_YOUR_APK> -->
102 <option
103 name="run-command"
104 value="pm grant android.nearby.multidevices android.permission.BLUETOOTH" />
105 <option
106 name="run-command"
107 value="pm grant android.nearby.multidevices android.permission.BLUETOOTH_ADMIN" />
108 <option
109 name="run-command"
110 value="pm grant android.nearby.multidevices android.permission.BLUETOOTH_ADVERTISE" />
111 <option
112 name="run-command"
113 value="pm grant android.nearby.multidevices android.permission.BLUETOOTH_CONNECT" />
114 <option
115 name="run-command"
116 value="pm grant android.nearby.multidevices android.permission.BLUETOOTH_PRIVILEGED" />
117 <option
118 name="run-command"
119 value="pm grant android.nearby.multidevices android.permission.BLUETOOTH_SCAN" />
120 <option
121 name="run-command"
122 value="pm grant android.nearby.multidevices android.permission.INTERNET" />
123 <option
124 name="run-command"
125 value="pm grant android.nearby.multidevices android.permission.GET_ACCOUNTS" />
126 <option
127 name="run-command"
128 value="pm grant android.nearby.multidevices android.permission.WRITE_SECURE_SETTINGS" />
129 <option
130 name="run-command"
131 value="pm grant android.nearby.multidevices android.permission.REORDER_TASKS" />
Eric Lind7766892022-03-17 14:50:02 +0000132 </target_preparer>
Eric Lina26582d2022-02-16 19:08:47 +0000133 </device>
134
135 <test class="com.android.tradefed.testtype.mobly.MoblyBinaryHostTest">
136 <!-- The mobly-par-file-name should match the module name -->
Eric Lin56b97ff2022-06-08 17:28:48 +0000137 <option name="mobly-par-file-name" value="NearbyMultiDevicesTestSuite" />
Eric Lina26582d2022-02-16 19:08:47 +0000138 <!-- Timeout limit in milliseconds for all test cases of the python binary -->
139 <option name="mobly-test-timeout" value="60000" />
140 </test>
141</configuration>
142