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

Commit 109f6061 authored by Thomas Girardier's avatar Thomas Girardier Committed by Android (Google) Code Review
Browse files

Merge "[PANDORA_TEST] Implement SMP test on pts-bot" into tm-qpr-dev

parents aac78f5f c427241d
Loading
Loading
Loading
Loading
+31 −3
Original line number Diff line number Diff line
@@ -24,6 +24,17 @@ NEEDS_PAIRING_CONFIRMATION = {
    "SM/CEN/EKS/BV-01-C",
    "SM/CEN/JW/BI-04-C",
    "SM/CEN/JW/BI-01-C",
    "SM/CEN/KDU/BV-04-C",
    "SM/CEN/KDU/BV-05-C",
    "SM/CEN/KDU/BV-06-C",
    "SM/CEN/KDU/BV-10-C",
    "SM/CEN/KDU/BV-11-C",
}

ACCEPTS_REMOTE_PAIRING_CONFIRMATION = {
    "SM/CEN/KDU/BI-01-C",
    "SM/CEN/KDU/BI-02-C",
    "SM/CEN/KDU/BI-03-C",
}


@@ -36,11 +47,13 @@ class SMProxy(ProfileProxy):
        self.connection = None

    @assert_description
    def MMI_IUT_ENABLE_CONNECTION_SM(self, pts_addr: bytes, **kwargs):
    def MMI_IUT_ENABLE_CONNECTION_SM(self, test, pts_addr: bytes, **kwargs):
        """
        Initiate an connection from the IUT to the PTS.
        """
        self.connection = self.host.ConnectLE(address=pts_addr).connection
        if self.connection and test in ACCEPTS_REMOTE_PAIRING_CONFIRMATION:
            self.sm.ProvidePairingConfirmation(connection=self.connection, pairing_confirmation_value=True)
        return "OK"

    @assert_description
@@ -68,3 +81,18 @@ class SMProxy(ProfileProxy):
            self.host.DisconnectLE(connection=self.connection)
            self.connection = None
        return "OK"

    def MMI_LESC_NUMERIC_COMPARISON(self, **kwargs):
        """
        Please confirm the following number matches IUT: 385874.
        """

        return "OK"

    @assert_description
    def MMI_ASK_IUT_PERFORM_RESET(self, **kwargs):
        """
        Please reset your device.
        """
        self.host.Reset()
        return "OK"
+2 −0
Original line number Diff line number Diff line
@@ -32,5 +32,7 @@
        <option name="profile" value="SDP/SR" />
        <option name="profile" value="SM/CEN/EKS" />
        <option name="profile" value="SM/CEN/JW" />
        <option name="profile" value="SM/CEN/KDU" />

    </test>
</configuration>
+9 −1
Original line number Diff line number Diff line
@@ -102,7 +102,15 @@
    "SM/CEN/EKS/BV-01-C",
    "SM/CEN/JW/BI-01-C",
    "SM/CEN/JW/BI-04-C",
    "SM/CEN/JW/BV-05-C"
    "SM/CEN/JW/BV-05-C",
    "SM/CEN/KDU/BI-01-C",
    "SM/CEN/KDU/BV-04-C",
    "SM/CEN/KDU/BV-05-C",
    "SM/CEN/KDU/BI-02-C",
    "SM/CEN/KDU/BV-06-C",
    "SM/CEN/KDU/BV-10-C",
    "SM/CEN/KDU/BI-03-C",
    "SM/CEN/KDU/BV-11-C"
  ],
  "skip": [
    "A2DP/SRC/AS/BV-01-I",
+0 −1
Original line number Diff line number Diff line
@@ -122,7 +122,6 @@ class GattInstance(val mDevice: BluetoothDevice, val mTransport: Int, val mConte
    require(isConnected()) {
      "Trying to disconnect an already disconnected device $mDevice"
    }
    mGatt.close()
    mGatt.disconnect()
    gattInstances.remove(mDevice.address)
  }