xref: /aosp_15_r20/test/cts-root/tests/bluetooth/AndroidTest.xml (revision fc9e02cc466b32ca348fe8172a44255464d9ce4e)
1*fc9e02ccSAndroid Build Coastguard Worker<?xml version="1.0" encoding="utf-8"?>
2*fc9e02ccSAndroid Build Coastguard Worker<!--
3*fc9e02ccSAndroid Build Coastguard Worker  ~ Copyright (C) 2023 The Android Open Source Project
4*fc9e02ccSAndroid Build Coastguard Worker  ~
5*fc9e02ccSAndroid Build Coastguard Worker  ~ Licensed under the Apache License, Version 2.0 (the "License");
6*fc9e02ccSAndroid Build Coastguard Worker  ~ you may not use this file except in compliance with the License.
7*fc9e02ccSAndroid Build Coastguard Worker  ~ You may obtain a copy of the License at
8*fc9e02ccSAndroid Build Coastguard Worker  ~
9*fc9e02ccSAndroid Build Coastguard Worker  ~      http://www.apache.org/licenses/LICENSE-2.0
10*fc9e02ccSAndroid Build Coastguard Worker  ~
11*fc9e02ccSAndroid Build Coastguard Worker  ~ Unless required by applicable law or agreed to in writing, software
12*fc9e02ccSAndroid Build Coastguard Worker  ~ distributed under the License is distributed on an "AS IS" BASIS,
13*fc9e02ccSAndroid Build Coastguard Worker  ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14*fc9e02ccSAndroid Build Coastguard Worker  ~ See the License for the specific language governing permissions and
15*fc9e02ccSAndroid Build Coastguard Worker  ~ limitations under the License.
16*fc9e02ccSAndroid Build Coastguard Worker  -->
17*fc9e02ccSAndroid Build Coastguard Worker<configuration description="Runs Bluetooth CTS root tests">
18*fc9e02ccSAndroid Build Coastguard Worker    <option name="test-suite-tag" value="cts" />
19*fc9e02ccSAndroid Build Coastguard Worker    <option name="config-descriptor:metadata" key="component" value="bluetooth" />
20*fc9e02ccSAndroid Build Coastguard Worker    <!-- Instant apps cannot hold android.permission.BLUETOOTH which makes BT tests irrelevant -->
21*fc9e02ccSAndroid Build Coastguard Worker    <option name="config-descriptor:metadata" key="parameter" value="not_instant_app" />
22*fc9e02ccSAndroid Build Coastguard Worker    <option name="config-descriptor:metadata" key="parameter" value="not_multi_abi" />
23*fc9e02ccSAndroid Build Coastguard Worker    <option name="config-descriptor:metadata" key="parameter" value="not_secondary_user" />
24*fc9e02ccSAndroid Build Coastguard Worker    <option name="config-descriptor:metadata" key="parameter" value="no_foldable_states" />
25*fc9e02ccSAndroid Build Coastguard Worker
26*fc9e02ccSAndroid Build Coastguard Worker    <target_preparer class="com.android.tradefed.targetprep.RootTargetPreparer"/>
27*fc9e02ccSAndroid Build Coastguard Worker
28*fc9e02ccSAndroid Build Coastguard Worker    <target_preparer class="com.android.tradefed.targetprep.suite.SuiteApkInstaller">
29*fc9e02ccSAndroid Build Coastguard Worker        <option name="cleanup-apks" value="true"/>
30*fc9e02ccSAndroid Build Coastguard Worker        <option name="test-file-name" value="CtsRootBluetoothTestCases.apk"/>
31*fc9e02ccSAndroid Build Coastguard Worker    </target_preparer>
32*fc9e02ccSAndroid Build Coastguard Worker
33*fc9e02ccSAndroid Build Coastguard Worker    <target_preparer class="com.android.tradefed.targetprep.RunCommandTargetPreparer">
34*fc9e02ccSAndroid Build Coastguard Worker        <option name="run-command" value="setenforce 0" />
35*fc9e02ccSAndroid Build Coastguard Worker        <option name="run-command" value="cmd bluetooth_manager enable" />
36*fc9e02ccSAndroid Build Coastguard Worker        <option name="run-command" value="cmd bluetooth_manager wait-for-state:STATE_ON" />
37*fc9e02ccSAndroid Build Coastguard Worker        <option name="teardown-command" value="cmd bluetooth_manager disable" />
38*fc9e02ccSAndroid Build Coastguard Worker        <option name="teardown-command" value="cmd bluetooth_manager wait-for-state:STATE_OFF" />
39*fc9e02ccSAndroid Build Coastguard Worker        <option name="teardown-command" value="setenforce 1" />
40*fc9e02ccSAndroid Build Coastguard Worker    </target_preparer>
41*fc9e02ccSAndroid Build Coastguard Worker
42*fc9e02ccSAndroid Build Coastguard Worker    <test class="com.android.tradefed.testtype.AndroidJUnitTest">
43*fc9e02ccSAndroid Build Coastguard Worker        <option name="package" value="android.bluetooth.cts_root"/>
44*fc9e02ccSAndroid Build Coastguard Worker    </test>
45*fc9e02ccSAndroid Build Coastguard Worker
46*fc9e02ccSAndroid Build Coastguard Worker    <!-- Only run Cts Tests in MTS if the Bluetooth Mainline module is installed. -->
47*fc9e02ccSAndroid Build Coastguard Worker    <object type="module_controller"
48*fc9e02ccSAndroid Build Coastguard Worker            class="com.android.tradefed.testtype.suite.module.MainlineTestModuleController">
49*fc9e02ccSAndroid Build Coastguard Worker        <option name="mainline-module-package-name" value="com.android.btservices" />
50*fc9e02ccSAndroid Build Coastguard Worker        <option name="mainline-module-package-name" value="com.google.android.btservices" />
51*fc9e02ccSAndroid Build Coastguard Worker    </object>
52*fc9e02ccSAndroid Build Coastguard Worker</configuration>
53