Loading framework/tests/bumble/Android.bp +25 −0 Original line number Diff line number Diff line Loading @@ -69,6 +69,31 @@ java_test_host { ], } // Runs the Bumble Bluetooth tests on a USB Bluetooth dongle. java_test_host { name: "BumbleBluetoothTestsPhy", test_config: "AndroidPhyTest.xml", libs: [ "tradefed", ], data: [ ":BumbleBluetoothTestsApp", "bumble_config.json", ], data_native_bins: [ "bumble_pandora_server", ], required: ["bumble_pandora_server"], test_suites: [ "general-tests", ], } python_binary_host { name: "bumble_pandora_server", main: "src/bumble_server.py", Loading framework/tests/bumble/AndroidPhyTest.xml 0 → 100644 +61 −0 Original line number Diff line number Diff line <?xml version="1.0" encoding="utf-8"?> <configuration description="Bumble bluetooth tests."> <target_preparer class="com.android.tradefed.targetprep.RootTargetPreparer"> <option name="force-root" value="true"/> </target_preparer> <target_preparer class="com.android.tradefed.targetprep.suite.SuiteApkInstaller"> <option name="cleanup-apks" value="true" /> <option name="test-file-name" value="BumbleBluetoothTestsApp.apk" /> <option name="install-arg" value="-g" /> </target_preparer> <target_preparer class="com.android.tradefed.targetprep.PythonVirtualenvPreparer"> <option name="dep-module" value="grpcio==1.51.1" /> <option name="dep-module" value="cryptography==35" /> <option name="dep-module" value="libusb1>=2.0.1" /> <option name="dep-module" value="libusb-package==1.0.26.1" /> <option name="dep-module" value="pyusb>=1.2" /> </target_preparer> <target_preparer class="com.android.tradefed.targetprep.RunHostCommandTargetPreparer"> <option name="python-virtualenv" value="true"/> <option name="host-setup-command" value="adb -s $SERIAL reverse tcp:7999 tcp:7999" /> <option name="host-background-command" value="$EXTRA_FILE(host_testcases)/BumbleBluetoothTests/bumble_pandora_server --transport pyusb:8087:0036 --config $EXTRA_FILE(host_testcases)/BumbleBluetoothTests/bumble_config.json"/> <option name="host-teardown-command" value="adb -s $SERIAL reverse --remove tcp:7999" /> </target_preparer> <target_preparer class="com.android.tradefed.targetprep.RunCommandTargetPreparer"> <option name="throw-if-cmd-fail" value="true" /> <option name="run-command" value="setprop persist.bluetooth.btsnooplogmode full" /> <option name="run-command" value="device_config set_sync_disabled_for_tests persistent" /> <option name="run-command" value="setprop log.tag.bluetooth VERBOSE" /> <option name="run-command" value="settings put global ble_scan_always_enabled 0" /> <option name="run-command" value="cmd bluetooth_manager disable" /> <option name="run-command" value="cmd bluetooth_manager wait-for-state:STATE_OFF" /> <option name="run-command" value="cmd bluetooth_manager enable" /> <option name="run-command" value="cmd bluetooth_manager wait-for-state:STATE_ON" /> </target_preparer> <option name="test-tag" value="BumbleBluetoothTests" /> <test class="com.android.tradefed.testtype.AndroidJUnitTest" > <option name="package" value="android.bluetooth" /> </test> <!-- Only run if the Bluetooth Mainline module is installed. --> <object type="module_controller" class="com.android.tradefed.testtype.suite.module.MainlineTestModuleController"> <option name="mainline-module-package-name" value="com.android.btservices" /> <option name="mainline-module-package-name" value="com.google.android.btservices" /> </object> <!-- Collect Bluetooth snoop logs for each test run --> <metrics_collector class="com.android.tradefed.device.metric.FilePullerLogCollector"> <option name="directory-keys" value="/data/misc/bluetooth/logs" /> <option name="collect-on-run-ended-only" value="false" /> <option name="clean-up" value="false" /> </metrics_collector> </configuration> Loading
framework/tests/bumble/Android.bp +25 −0 Original line number Diff line number Diff line Loading @@ -69,6 +69,31 @@ java_test_host { ], } // Runs the Bumble Bluetooth tests on a USB Bluetooth dongle. java_test_host { name: "BumbleBluetoothTestsPhy", test_config: "AndroidPhyTest.xml", libs: [ "tradefed", ], data: [ ":BumbleBluetoothTestsApp", "bumble_config.json", ], data_native_bins: [ "bumble_pandora_server", ], required: ["bumble_pandora_server"], test_suites: [ "general-tests", ], } python_binary_host { name: "bumble_pandora_server", main: "src/bumble_server.py", Loading
framework/tests/bumble/AndroidPhyTest.xml 0 → 100644 +61 −0 Original line number Diff line number Diff line <?xml version="1.0" encoding="utf-8"?> <configuration description="Bumble bluetooth tests."> <target_preparer class="com.android.tradefed.targetprep.RootTargetPreparer"> <option name="force-root" value="true"/> </target_preparer> <target_preparer class="com.android.tradefed.targetprep.suite.SuiteApkInstaller"> <option name="cleanup-apks" value="true" /> <option name="test-file-name" value="BumbleBluetoothTestsApp.apk" /> <option name="install-arg" value="-g" /> </target_preparer> <target_preparer class="com.android.tradefed.targetprep.PythonVirtualenvPreparer"> <option name="dep-module" value="grpcio==1.51.1" /> <option name="dep-module" value="cryptography==35" /> <option name="dep-module" value="libusb1>=2.0.1" /> <option name="dep-module" value="libusb-package==1.0.26.1" /> <option name="dep-module" value="pyusb>=1.2" /> </target_preparer> <target_preparer class="com.android.tradefed.targetprep.RunHostCommandTargetPreparer"> <option name="python-virtualenv" value="true"/> <option name="host-setup-command" value="adb -s $SERIAL reverse tcp:7999 tcp:7999" /> <option name="host-background-command" value="$EXTRA_FILE(host_testcases)/BumbleBluetoothTests/bumble_pandora_server --transport pyusb:8087:0036 --config $EXTRA_FILE(host_testcases)/BumbleBluetoothTests/bumble_config.json"/> <option name="host-teardown-command" value="adb -s $SERIAL reverse --remove tcp:7999" /> </target_preparer> <target_preparer class="com.android.tradefed.targetprep.RunCommandTargetPreparer"> <option name="throw-if-cmd-fail" value="true" /> <option name="run-command" value="setprop persist.bluetooth.btsnooplogmode full" /> <option name="run-command" value="device_config set_sync_disabled_for_tests persistent" /> <option name="run-command" value="setprop log.tag.bluetooth VERBOSE" /> <option name="run-command" value="settings put global ble_scan_always_enabled 0" /> <option name="run-command" value="cmd bluetooth_manager disable" /> <option name="run-command" value="cmd bluetooth_manager wait-for-state:STATE_OFF" /> <option name="run-command" value="cmd bluetooth_manager enable" /> <option name="run-command" value="cmd bluetooth_manager wait-for-state:STATE_ON" /> </target_preparer> <option name="test-tag" value="BumbleBluetoothTests" /> <test class="com.android.tradefed.testtype.AndroidJUnitTest" > <option name="package" value="android.bluetooth" /> </test> <!-- Only run if the Bluetooth Mainline module is installed. --> <object type="module_controller" class="com.android.tradefed.testtype.suite.module.MainlineTestModuleController"> <option name="mainline-module-package-name" value="com.android.btservices" /> <option name="mainline-module-package-name" value="com.google.android.btservices" /> </object> <!-- Collect Bluetooth snoop logs for each test run --> <metrics_collector class="com.android.tradefed.device.metric.FilePullerLogCollector"> <option name="directory-keys" value="/data/misc/bluetooth/logs" /> <option name="collect-on-run-ended-only" value="false" /> <option name="clean-up" value="false" /> </metrics_collector> </configuration>