Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 4295426a authored by Jack He's avatar Jack He
Browse files

Disable Bluetooth before instrumentation test

* Disable Bluetooth and BLE scanning before running Java instrumentation
  tests on Tradefed so that when test runner kills Bluetooth process, it
  won't be restarted again by ActivityManager

Bug: 68740198
Test: make, unit tests
Change-Id: Ic396a02eced7b355f5ff3eea49702468caa0ac37
parent 4c31cbde
Loading
Loading
Loading
Loading
+6 −0
Original line number Diff line number Diff line
@@ -17,6 +17,12 @@
    <target_preparer class="com.android.tradefed.targetprep.TestAppInstallSetup">
        <option name="test-file-name" value="BluetoothInstrumentationTests.apk" />
    </target_preparer>
    <target_preparer class="com.android.tradefed.targetprep.RunCommandTargetPreparer">
        <option name="run-command" value="settings put global ble_scan_always_enabled 0" />
        <option name="run-command" value="svc bluetooth disable" />
        <option name="teardown-command" value="svc bluetooth enable" />
        <option name="teardown-command" value="settings put global ble_scan_always_enabled 1" />
    </target_preparer>

    <option name="test-suite-tag" value="apct" />
    <option name="test-tag" value="BluetoothInstrumentationTests" />