Eric Lin | a26582d | 2022-02-16 19:08:47 +0000 | [diff] [blame] | 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 | --> |
Eric Lin | 7968f05 | 2022-03-17 15:05:42 +0000 | [diff] [blame] | 13 | <configuration description="Config for CTS Nearby Mainline multi devices end-to-end test suite"> |
Eric Lin | 56b97ff | 2022-06-08 17:28:48 +0000 | [diff] [blame] | 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" /> |
Eric Lin | a26582d | 2022-02-16 19:08:47 +0000 | [diff] [blame] | 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 | --> |
Eric Lin | eeddac9 | 2022-03-30 18:11:24 +0800 | [diff] [blame] | 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" /> |
Eric Lin | a26582d | 2022-02-16 19:08:47 +0000 | [diff] [blame] | 39 | </target_preparer> |
Eric Lin | eeddac9 | 2022-03-30 18:11:24 +0800 | [diff] [blame] | 40 | <target_preparer class="com.android.tradefed.targetprep.RebootTargetPreparer" /> |
Eric Lin | a26582d | 2022-02-16 19:08:47 +0000 | [diff] [blame] | 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> |
Eric Lin | d776689 | 2022-03-17 14:50:02 +0000 | [diff] [blame] | 45 | <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 Lin | eeddac9 | 2022-03-30 18:11:24 +0800 | [diff] [blame] | 48 | <!-- 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 Lin | d776689 | 2022-03-17 14:50:02 +0000 | [diff] [blame] | 79 | </target_preparer> |
Eric Lin | a26582d | 2022-02-16 19:08:47 +0000 | [diff] [blame] | 80 | </device> |
| 81 | <device name="device2"> |
Eric Lin | eeddac9 | 2022-03-30 18:11:24 +0800 | [diff] [blame] | 82 | <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 Lin | a26582d | 2022-02-16 19:08:47 +0000 | [diff] [blame] | 87 | </target_preparer> |
Eric Lin | eeddac9 | 2022-03-30 18:11:24 +0800 | [diff] [blame] | 88 | <target_preparer class="com.android.tradefed.targetprep.RebootTargetPreparer" /> |
Eric Lin | a26582d | 2022-02-16 19:08:47 +0000 | [diff] [blame] | 89 | <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 Lin | d776689 | 2022-03-17 14:50:02 +0000 | [diff] [blame] | 93 | <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 Lin | eeddac9 | 2022-03-30 18:11:24 +0800 | [diff] [blame] | 96 | <!-- 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 Lin | d776689 | 2022-03-17 14:50:02 +0000 | [diff] [blame] | 127 | </target_preparer> |
Eric Lin | a26582d | 2022-02-16 19:08:47 +0000 | [diff] [blame] | 128 | </device> |
| 129 | |
| 130 | <test class="com.android.tradefed.testtype.mobly.MoblyBinaryHostTest"> |
| 131 | <!-- The mobly-par-file-name should match the module name --> |
Eric Lin | 56b97ff | 2022-06-08 17:28:48 +0000 | [diff] [blame] | 132 | <option name="mobly-par-file-name" value="NearbyMultiDevicesTestSuite" /> |
Eric Lin | a26582d | 2022-02-16 19:08:47 +0000 | [diff] [blame] | 133 | <!-- 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 | |