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

Commit fc9fdc88 authored by William Escande's avatar William Escande Committed by Gerrit Code Review
Browse files

Merge changes I20edbbec,I45fa6c19 into main

* changes:
  Setup verbose log for test
  Add verbose logging during pts bot test
parents bc43487e dcf40761
Loading
Loading
Loading
Loading
+5 −0
Original line number Diff line number Diff line
@@ -27,6 +27,11 @@
        <option name="host-background-command" value="adb -s $SERIAL shell am instrument --no-hidden-api-checks -w com.android.pandora/.Main" />
    </target_preparer>

    <target_preparer class="com.android.tradefed.targetprep.RunCommandTargetPreparer">
        <option name="run-command" value="setprop persist.bluetooth.btsnooplogmode full" />
        <option name="run-command" value="setprop log.tag.bluetooth VERBOSE" />
    </target_preparer>

    <target_preparer class="com.android.tradefed.targetprep.PythonVirtualenvPreparer">
        <option name="dep-module" value="grpcio" />
        <option name="dep-module" value="protobuf==3.20.1" />
+1 −4
Original line number Diff line number Diff line
@@ -32,10 +32,7 @@
        <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="device_config put bluetooth INIT_logging_debug_enabled_for_all true" />
        <option name="run-command"
                value="device_config put bluetooth INIT_default_log_level_str LOG_VERBOSE" />
        <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" />
+3 −3
Original line number Diff line number Diff line
@@ -74,8 +74,8 @@ class GdSl4aBaseTestClass(BaseTestClass):

    def setup_test(self):
        self.cert.rootservice.StartStack(
            facade_rootservice.StartStackRequest(
                module_under_test=facade_rootservice.BluetoothModule.Value(self.cert_module),))
            facade_rootservice.StartStackRequest(module_under_test=facade_rootservice.BluetoothModule.Value(
                self.cert_module),))
        self.cert.wait_channel_ready()

        self.timer_list = []
@@ -87,7 +87,7 @@ class GdSl4aBaseTestClass(BaseTestClass):
        self.dut.sl4a.bluetoothDisableBLE()
        disable_bluetooth(self.dut.sl4a, self.dut.ed)
        # Enable full verbose logging for Bluetooth
        self.dut.adb.shell("device_config put bluetooth INIT_logging_debug_enabled_for_all true")
        self.dut.adb.shell("setprop log.tag.bluetooth VERBOSE")
        # Then enable Bluetooth
        enable_bluetooth(self.dut.sl4a, self.dut.ed)
        self.dut.sl4a.bluetoothDisableBLE()
+5 −5
Original line number Diff line number Diff line
@@ -78,14 +78,14 @@ class Sl4aSl4aBaseTestClass(BaseTestClass):
        self.dut.adb.shell("setprop persist.bluetooth.btsnooplogmode full")
        getprop_result = self.dut.adb.getprop("persist.bluetooth.btsnooplogmode")
        if getprop_result is None or ("full" not in getprop_result.lower()):
            self.dut.log.warning("Failed to enable Bluetooth HCI Snoop Logging on DUT, mode is {}"
                                 .format(getprop_result))
            self.dut.log.warning(
                "Failed to enable Bluetooth HCI Snoop Logging on DUT, mode is {}".format(getprop_result))
        self.cert.adb.root()
        self.cert.adb.shell("setprop persist.bluetooth.btsnooplogmode full")
        getprop_result = self.cert.adb.getprop("persist.bluetooth.btsnooplogmode")
        if getprop_result is None or ("full" not in getprop_result.lower()):
            self.cert.log.warning("Failed to enable Bluetooth HCI Snoop Logging on CERT, mode is {}"
                                  .format(getprop_result))
            self.cert.log.warning(
                "Failed to enable Bluetooth HCI Snoop Logging on CERT, mode is {}".format(getprop_result))

        self.ble = BleLib(dut=self.dut)

@@ -103,7 +103,7 @@ class Sl4aSl4aBaseTestClass(BaseTestClass):
        device.sl4a.bluetoothDisableBLE()
        disable_bluetooth(device.sl4a, device.ed)
        # Enable full verbose logging for Bluetooth
        device.adb.shell("device_config put bluetooth INIT_logging_debug_enabled_for_all true")
        device.adb.shell("setprop log.tag.bluetooth VERBOSE")
        # Then enable Bluetooth
        enable_bluetooth(device.sl4a, device.ed)
        device.sl4a.bluetoothDisableBLE()
+1 −1
Original line number Diff line number Diff line
@@ -98,7 +98,7 @@ class IrkRotationTest(sl4a_sl4a_base_test.Sl4aSl4aBaseTestClass):
        self.cert.sl4a.bluetoothDisableBLE()
        disable_bluetooth(self.cert.sl4a, self.cert.ed)
        self.cert.adb.shell("setprop bluetooth.core.gap.le.privacy.enabled false")
        self.cert.adb.shell("device_config put bluetooth INIT_logging_debug_enabled_for_all true")
        self.cert.adb.shell("setprop log.tag.bluetooth VERBOSE")
        enable_bluetooth(self.cert.sl4a, self.cert.ed)
        self.cert.sl4a.bluetoothDisableBLE()
        self._test_le_reconnect_after_irk_rotation(False)
Loading