1<?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--> 13<configuration description="Config for CTS Nearby Mainline multi devices end-to-end test suite"> 14 <!-- 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" /> 25 <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 --> 34 <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" /> 39 </target_preparer> 40 <target_preparer class="com.android.tradefed.targetprep.RebootTargetPreparer" /> 41 <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 --> 47 <!-- TODO(b/225958696): Import python dependencies --> 48 <option name="dep-module" value="mobly" /> 49 </target_preparer> 50 <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" /> 53 <!-- 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" /> 84 </target_preparer> 85 </device> 86 <device name="device2"> 87 <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" /> 92 </target_preparer> 93 <target_preparer class="com.android.tradefed.targetprep.RebootTargetPreparer" /> 94 <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> 98 <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" /> 101 <!-- 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" /> 132 </target_preparer> 133 </device> 134 135 <test class="com.android.tradefed.testtype.mobly.MoblyBinaryHostTest"> 136 <!-- The mobly-par-file-name should match the module name --> 137 <option name="mobly-par-file-name" value="NearbyMultiDevicesTestSuite" /> 138 <!-- 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 143