blob: 43cf1368443f1042789a731b9478d86761ec7075 [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 Lina26582d2022-02-16 19:08:47 +000014 <option name="test-suite-tag" value="cts" />
15 <option name="config-descriptor:metadata" key="component" value="wifi" />
16 <option name="config-descriptor:metadata" key="parameter" value="not_instant_app" />
17 <option name="config-descriptor:metadata" key="parameter" value="not_multi_abi" />
18 <option name="config-descriptor:metadata" key="parameter" value="not_secondary_user" />
19
20 <device name="device1">
21 <!-- For coverage to work, the APK should not be uninstalled until after coverage is pulled.
22 So it's a lot easier to install APKs outside the python code.
23 -->
Eric Lineeddac92022-03-30 18:11:24 +080024 <target_preparer class="com.android.tradefed.targetprep.RootTargetPreparer" />
25 <target_preparer class="com.android.compatibility.common.tradefed.targetprep.FilePusher">
26 <option name="remount-system" value="true" />
27 <option name="push" value="NearbyMultiDevicesClientsSnippets.apk->/system/app/NearbyMultiDevicesClientsSnippets/NearbyMultiDevicesClientsSnippets.apk" />
28 <option name="push" value="NearbyFastPairSeekerDataProvider.apk->/system/app/NearbyFastPairSeekerDataProvider/NearbyFastPairSeekerDataProvider.apk" />
Eric Lina26582d2022-02-16 19:08:47 +000029 </target_preparer>
Eric Lineeddac92022-03-30 18:11:24 +080030 <target_preparer class="com.android.tradefed.targetprep.RebootTargetPreparer" />
Eric Lina26582d2022-02-16 19:08:47 +000031 <target_preparer class="com.android.tradefed.targetprep.RunCommandTargetPreparer">
32 <option name="run-command" value="input keyevent KEYCODE_WAKEUP" />
33 <option name="run-command" value="wm dismiss-keyguard" />
34 </target_preparer>
35 <target_preparer class="com.android.tradefed.targetprep.PythonVirtualenvPreparer">
36 <!-- Any python dependencies can be specified and will be installed with pip -->
Julien Desprez6d28b972022-03-23 16:45:25 +000037 <!-- TODO(b/225958696): Import python dependencies -->
Eric Lina26582d2022-02-16 19:08:47 +000038 <option name="dep-module" value="mobly" />
Eric Lina26582d2022-02-16 19:08:47 +000039 </target_preparer>
Eric Lind7766892022-03-17 14:50:02 +000040 <target_preparer class="com.android.tradefed.targetprep.DeviceSetup">
41 <option name="force-skip-system-props" value="true" /> <!-- avoid restarting device -->
42 <option name="screen-always-on" value="on" />
Eric Lineeddac92022-03-30 18:11:24 +080043 <!-- List permissions requested by the APK: aapt d permissions <PATH_TO_YOUR_APK> -->
44 <option
45 name="run-command"
46 value="pm grant android.nearby.multidevices android.permission.BLUETOOTH" />
47 <option
48 name="run-command"
49 value="pm grant android.nearby.multidevices android.permission.BLUETOOTH_ADMIN" />
50 <option
51 name="run-command"
52 value="pm grant android.nearby.multidevices android.permission.BLUETOOTH_ADVERTISE" />
53 <option
54 name="run-command"
55 value="pm grant android.nearby.multidevices android.permission.BLUETOOTH_CONNECT" />
56 <option
57 name="run-command"
58 value="pm grant android.nearby.multidevices android.permission.BLUETOOTH_PRIVILEGED" />
59 <option
60 name="run-command"
61 value="pm grant android.nearby.multidevices android.permission.BLUETOOTH_SCAN" />
62 <option
63 name="run-command"
64 value="pm grant android.nearby.multidevices android.permission.INTERNET" />
65 <option
66 name="run-command"
67 value="pm grant android.nearby.multidevices android.permission.GET_ACCOUNTS" />
68 <option
69 name="run-command"
70 value="pm grant android.nearby.multidevices android.permission.WRITE_SECURE_SETTINGS" />
71 <option
72 name="run-command"
73 value="pm grant android.nearby.multidevices android.permission.REORDER_TASKS" />
Eric Lind7766892022-03-17 14:50:02 +000074 </target_preparer>
Eric Lina26582d2022-02-16 19:08:47 +000075 </device>
76 <device name="device2">
Eric Lineeddac92022-03-30 18:11:24 +080077 <target_preparer class="com.android.tradefed.targetprep.RootTargetPreparer" />
78 <target_preparer class="com.android.compatibility.common.tradefed.targetprep.FilePusher">
79 <option name="remount-system" value="true" />
80 <option name="push" value="NearbyMultiDevicesClientsSnippets.apk->/system/app/NearbyMultiDevicesClientsSnippets/NearbyMultiDevicesClientsSnippets.apk" />
81 <option name="push" value="NearbyFastPairSeekerDataProvider.apk->/system/app/NearbyFastPairSeekerDataProvider/NearbyFastPairSeekerDataProvider.apk" />
Eric Lina26582d2022-02-16 19:08:47 +000082 </target_preparer>
Eric Lineeddac92022-03-30 18:11:24 +080083 <target_preparer class="com.android.tradefed.targetprep.RebootTargetPreparer" />
Eric Lina26582d2022-02-16 19:08:47 +000084 <target_preparer class="com.android.tradefed.targetprep.RunCommandTargetPreparer">
85 <option name="run-command" value="input keyevent KEYCODE_WAKEUP" />
86 <option name="run-command" value="wm dismiss-keyguard" />
87 </target_preparer>
Eric Lind7766892022-03-17 14:50:02 +000088 <target_preparer class="com.android.tradefed.targetprep.DeviceSetup">
89 <option name="force-skip-system-props" value="true" /> <!-- avoid restarting device -->
90 <option name="screen-always-on" value="on" />
Eric Lineeddac92022-03-30 18:11:24 +080091 <!-- List permissions requested by the APK: aapt d permissions <PATH_TO_YOUR_APK> -->
92 <option
93 name="run-command"
94 value="pm grant android.nearby.multidevices android.permission.BLUETOOTH" />
95 <option
96 name="run-command"
97 value="pm grant android.nearby.multidevices android.permission.BLUETOOTH_ADMIN" />
98 <option
99 name="run-command"
100 value="pm grant android.nearby.multidevices android.permission.BLUETOOTH_ADVERTISE" />
101 <option
102 name="run-command"
103 value="pm grant android.nearby.multidevices android.permission.BLUETOOTH_CONNECT" />
104 <option
105 name="run-command"
106 value="pm grant android.nearby.multidevices android.permission.BLUETOOTH_PRIVILEGED" />
107 <option
108 name="run-command"
109 value="pm grant android.nearby.multidevices android.permission.BLUETOOTH_SCAN" />
110 <option
111 name="run-command"
112 value="pm grant android.nearby.multidevices android.permission.INTERNET" />
113 <option
114 name="run-command"
115 value="pm grant android.nearby.multidevices android.permission.GET_ACCOUNTS" />
116 <option
117 name="run-command"
118 value="pm grant android.nearby.multidevices android.permission.WRITE_SECURE_SETTINGS" />
119 <option
120 name="run-command"
121 value="pm grant android.nearby.multidevices android.permission.REORDER_TASKS" />
Eric Lind7766892022-03-17 14:50:02 +0000122 </target_preparer>
Eric Lina26582d2022-02-16 19:08:47 +0000123 </device>
124
125 <test class="com.android.tradefed.testtype.mobly.MoblyBinaryHostTest">
126 <!-- The mobly-par-file-name should match the module name -->
Eric Lin7968f052022-03-17 15:05:42 +0000127 <option name="mobly-par-file-name" value="CtsNearbyMultiDevicesTestSuite" />
Eric Lina26582d2022-02-16 19:08:47 +0000128 <!-- Timeout limit in milliseconds for all test cases of the python binary -->
129 <option name="mobly-test-timeout" value="60000" />
130 </test>
131</configuration>
132