1<?xml version="1.0" encoding="utf-8"?> 2 <configuration description="Bumble bluetooth tests."> 3 <target_preparer class="com.android.tradefed.targetprep.RootTargetPreparer"> 4 <option name="force-root" value="true"/> 5 </target_preparer> 6 7 <target_preparer class="com.android.tradefed.targetprep.suite.SuiteApkInstaller"> 8 <option name="cleanup-apks" value="true" /> 9 <option name="test-file-name" value="BumbleBluetoothTestsApp.apk" /> 10 <option name="install-arg" value="-g" /> 11 </target_preparer> 12 13 <target_preparer class="com.android.tradefed.targetprep.PythonVirtualenvPreparer"> 14 <option name="dep-module" value="grpcio==1.51.1" /> 15 <option name="dep-module" value="cryptography==35" /> 16 <option name="dep-module" value="libusb1>=2.0.1" /> 17 <option name="dep-module" value="libusb-package==1.0.26.1" /> 18 <option name="dep-module" value="pyusb>=1.2" /> 19 </target_preparer> 20 21 <target_preparer class="com.android.tradefed.targetprep.RunHostCommandTargetPreparer"> 22 <option name="python-virtualenv" value="true"/> 23 24 <option name="host-setup-command" value="adb -s $SERIAL reverse tcp:7999 tcp:7999" /> 25 <option name="host-background-command" 26 value="$EXTRA_FILE(host_testcases)/BumbleBluetoothTests/bumble_pandora_server --transport pyusb:8087:0036 --config $EXTRA_FILE(host_testcases)/BumbleBluetoothTests/bumble_config.json"/> 27 <option name="host-teardown-command" value="adb -s $SERIAL reverse --remove tcp:7999" /> 28 </target_preparer> 29 30 <target_preparer class="com.android.tradefed.targetprep.RunCommandTargetPreparer"> 31 <option name="throw-if-cmd-fail" value="true" /> 32 <option name="run-command" value="setprop persist.bluetooth.btsnooplogmode full" /> 33 <option name="run-command" value="device_config set_sync_disabled_for_tests persistent" /> 34 <option name="run-command" value="setprop log.tag.bluetooth VERBOSE" /> 35 <option name="run-command" value="settings put global ble_scan_always_enabled 0" /> 36 <option name="run-command" value="cmd bluetooth_manager disable" /> 37 <option name="run-command" value="cmd bluetooth_manager wait-for-state:STATE_OFF" /> 38 <option name="run-command" value="cmd bluetooth_manager enable" /> 39 <option name="run-command" value="cmd bluetooth_manager wait-for-state:STATE_ON" /> 40 </target_preparer> 41 42 <option name="test-tag" value="BumbleBluetoothTests" /> 43 <test class="com.android.tradefed.testtype.AndroidJUnitTest" > 44 <option name="package" value="android.bluetooth" /> 45 </test> 46 47 <!-- Only run if the Bluetooth Mainline module is installed. --> 48 <object type="module_controller" 49 class="com.android.tradefed.testtype.suite.module.MainlineTestModuleController"> 50 <option name="mainline-module-package-name" value="com.android.btservices" /> 51 <option name="mainline-module-package-name" value="com.google.android.btservices" /> 52 </object> 53 54 <!-- Collect Bluetooth snoop logs for each test run --> 55 <metrics_collector class="com.android.tradefed.device.metric.FilePullerLogCollector"> 56 <option name="directory-keys" value="/data/misc/bluetooth/logs" /> 57 <option name="collect-on-run-ended-only" value="false" /> 58 <option name="clean-up" value="false" /> 59 </metrics_collector> 60</configuration> 61 62