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

Commit 1ff355c3 authored by Thomas Girardier's avatar Thomas Girardier Committed by Gerrit Code Review
Browse files

Merge changes Ibe6d9844,If25bcd20

* changes:
  [Pandora] - Enable skipped HFP tests
  [Pandora] Fix HFP tests (part 1)
parents 5e2e02ad c3c07e6a
Loading
Loading
Loading
Loading
+22 −5
Original line number Original line Diff line number Diff line
@@ -18,17 +18,17 @@ from mmi2grpc._proxy import ProfileProxy


from pandora_experimental.hfp_grpc import HFP
from pandora_experimental.hfp_grpc import HFP
from pandora_experimental.host_grpc import Host
from pandora_experimental.host_grpc import Host
from pandora_experimental.security_grpc import Security


import sys
import sys
import threading
import threading
import time


# Standard time to wait before asking for waitConnection
# Standard time to wait before asking for waitConnection
WAIT_DELAY_BEFORE_CONNECTION = 2
WAIT_DELAY_BEFORE_CONNECTION = 2


# The tests needs the MMI to accept pairing confirmation request.
# The tests needs the MMI to accept pairing confirmation request.
NEEDS_WAIT_CONNECTION_BEFORE_TEST = {
NEEDS_WAIT_CONNECTION_BEFORE_TEST = {'HFP/AG/WBS/BV-01-I', 'HFP/AG/SLC/BV-05-I'}
    'HFP/AG/WBS/BV-01-I',
}




class HFPProxy(ProfileProxy):
class HFPProxy(ProfileProxy):
@@ -37,6 +37,7 @@ class HFPProxy(ProfileProxy):
        super().__init__(channel)
        super().__init__(channel)
        self.hfp = HFP(channel)
        self.hfp = HFP(channel)
        self.host = Host(channel)
        self.host = Host(channel)
        self.security = Security(channel)


        self.connection = None
        self.connection = None


@@ -65,7 +66,7 @@ class HFPProxy(ProfileProxy):
        (IUT), then click Ok.
        (IUT), then click Ok.
        """
        """


        self.host.DeletePairing(address=pts_addr)
        self.security.DeletePairing(address=pts_addr)
        return "OK"
        return "OK"


    @assert_description
    @assert_description
@@ -99,6 +100,17 @@ class HFPProxy(ProfileProxy):
        self.connection = self.host.Connect(address=pts_addr).connection
        self.connection = self.host.Connect(address=pts_addr).connection
        return "OK"
        return "OK"


    @assert_description
    def TSC_iut_connectable(self, pts_addr: str, test: str, **kwargs):
        """
        Make the Implementation Under Test (IUT) connectable, then click Ok.
        """

        if "HFP/AG/SLC/BV-03-C" in test:
            self.connection = self.host.WaitConnection(pts_addr).connection

        return "OK"

    @assert_description
    @assert_description
    def TSC_iut_disable_slc(self, pts_addr: bytes, **kwargs):
    def TSC_iut_disable_slc(self, pts_addr: bytes, **kwargs):
        """
        """
@@ -106,7 +118,12 @@ class HFPProxy(ProfileProxy):
        Implementation Under Test (IUT).
        Implementation Under Test (IUT).
        """
        """


        def go():
            time.sleep(2)
            self.hfp.DisableSlc(connection=self.connection)
            self.hfp.DisableSlc(connection=self.connection)

        threading.Thread(target=go).start()

        return "OK"
        return "OK"


    @assert_description
    @assert_description
+1 −1
Original line number Original line Diff line number Diff line
@@ -37,7 +37,7 @@
        <option name="profile" value="AVRCP" />
        <option name="profile" value="AVRCP" />
        <option name="profile" value="GAP" />
        <option name="profile" value="GAP" />
        <option name="profile" value="GATT" />
        <option name="profile" value="GATT" />
        <option name="profile" value="HFP/AG/PSI" />
        <option name="profile" value="HFP/AG" />
        <option name="profile" value="HID/HOS" />
        <option name="profile" value="HID/HOS" />
        <option name="profile" value="HOGP" />
        <option name="profile" value="HOGP" />
        <option name="profile" value="L2CAP/LE" />
        <option name="profile" value="L2CAP/LE" />
+1 −1
Original line number Original line Diff line number Diff line
@@ -37,7 +37,7 @@
        <option name="profile" value="AVRCP" />
        <option name="profile" value="AVRCP" />
        <option name="profile" value="GAP" />
        <option name="profile" value="GAP" />
        <option name="profile" value="GATT" />
        <option name="profile" value="GATT" />
        <option name="profile" value="HFP/AG/PSI" />
        <option name="profile" value="HFP/AG" />
        <option name="profile" value="HID/HOS" />
        <option name="profile" value="HID/HOS" />
        <option name="profile" value="HOGP" />
        <option name="profile" value="HOGP" />
        <option name="profile" value="L2CAP/LE" />
        <option name="profile" value="L2CAP/LE" />
+59 −13
Original line number Original line Diff line number Diff line
@@ -212,7 +212,13 @@
    "GATT/SR/GAW/BI-12-C",
    "GATT/SR/GAW/BI-12-C",
    "GATT/SR/UNS/BI-01-C",
    "GATT/SR/UNS/BI-01-C",
    "GATT/SR/UNS/BI-02-C",
    "GATT/SR/UNS/BI-02-C",
    "HFP/AG/PSI/BV-05-I",
    "HFP/AG/DIS/BV-01-I",
    "HFP/AG/HFI/BV-02-I",
    "HFP/AG/PSI/BV-03-C",
    "HFP/AG/SLC/BV-09-I",
    "HFP/AG/SLC/BV-10-I",
    "HFP/AG/TCA/BV-04-I",
    "HFP/AG/WBS/BV-01-I",
    "HID/HOS/DAT/BV-01-C",
    "HID/HOS/DAT/BV-01-C",
    "HID/HOS/HCE/BV-01-I",
    "HID/HOS/HCE/BV-01-I",
    "HID/HOS/HCE/BV-03-I",
    "HID/HOS/HCE/BV-03-I",
@@ -554,13 +560,43 @@
    "GATT/SR/GAW/BV-09-C",
    "GATT/SR/GAW/BV-09-C",
    "GATT/SR/GAW/BV-10-C",
    "GATT/SR/GAW/BV-10-C",
    "GATT/SR/GAW/BV-11-C",
    "GATT/SR/GAW/BV-11-C",
    "HFP/AG/DIS/BV-01-I",
    "HFP/AG/TRS/BV-01-C",
    "HFP/AG/HFI/BI-03-I",
    "HFP/AG/HFI/BV-02-I",
    "HFP/AG/PSI/BV-01-C",
    "HFP/AG/PSI/BV-01-C",
    "HFP/AG/PSI/BV-02-C",
    "HFP/AG/PSI/BV-04-I",
    "HFP/AG/PSI/BV-04-I",
    "HFP/AG/PSI/BV-05-I",
    "HFP/AG/ACS/BV-04-I",
    "HFP/AG/ACS/BV-08-I",
    "HFP/AG/ACS/BV-11-I",
    "HFP/AG/ACS/BI-14-I",
    "HFP/AG/ACS/BV-16-I",
    "HFP/AG/ACR/BV-01-I",
    "HFP/AG/ACR/BV-02-I",
    "HFP/AG/CLI/BV-01-I",
    "HFP/AG/ICA/BV-04-I",
    "HFP/AG/ICA/BV-07-I",
    "HFP/AG/ICA/BV-08-I",
    "HFP/AG/ICA/BV-09-I",
    "HFP/AG/TCA/BV-01-I",
    "HFP/AG/TCA/BV-02-I",
    "HFP/AG/TCA/BV-03-I",
    "HFP/AG/TCA/BV-05-I",
    "HFP/AG/ATH/BV-03-I",
    "HFP/AG/ATH/BV-04-I",
    "HFP/AG/ATH/BV-06-I",
    "HFP/AG/ATA/BV-01-I",
    "HFP/AG/ATA/BV-02-I",
    "HFP/AG/OCN/BV-01-I",
    "HFP/AG/OCM/BV-01-I",
    "HFP/AG/OCM/BV-02-I",
    "HFP/AG/OCL/BV-01-I",
    "HFP/AG/OCL/BV-02-I",
    "HFP/AG/TWC/BV-02-I",
    "HFP/AG/TWC/BV-03-I",
    "HFP/AG/TWC/BV-05-I",
    "HFP/AG/ENO/BV-01-I",
    "HFP/AG/VRA/BV-01-I",
    "HFP/AG/TDC/BV-01-I",
    "HFP/AG/ECS/BV-03-I",
    "HFP/AG/NUM/BV-01-I",
    "HFP/AG/SLC/BV-01-C",
    "HFP/AG/SLC/BV-01-C",
    "HFP/AG/SLC/BV-02-C",
    "HFP/AG/SLC/BV-02-C",
    "HFP/AG/SLC/BV-03-C",
    "HFP/AG/SLC/BV-03-C",
@@ -568,13 +604,23 @@
    "HFP/AG/SLC/BV-05-I",
    "HFP/AG/SLC/BV-05-I",
    "HFP/AG/SLC/BV-06-I",
    "HFP/AG/SLC/BV-06-I",
    "HFP/AG/SLC/BV-07-I",
    "HFP/AG/SLC/BV-07-I",
    "HFP/AG/SLC/BV-09-I",
    "HFP/AG/ACC/BV-08-I",
    "HFP/AG/SLC/BV-10-I",
    "HFP/AG/ACC/BV-09-I",
    "HFP/AG/TCA/BV-01-I",
    "HFP/AG/ACC/BV-10-I",
    "HFP/AG/TCA/BV-02-I",
    "HFP/AG/ACC/BV-11-I",
    "HFP/AG/TCA/BV-03-I",
    "HFP/AG/ACC/BI-12-I",
    "HFP/AG/TCA/BV-04-I",
    "HFP/AG/ACC/BI-13-I",
    "HFP/AG/TCA/BV-05-I",
    "HFP/AG/ACC/BI-14-I",
    "HFP/AG/ACC/BV-15-I",
    "HFP/AG/SDP/BV-01-I",
    "HFP/AG/IIA/BV-01-I",
    "HFP/AG/IIA/BV-02-I",
    "HFP/AG/IID/BV-01-I",
    "HFP/AG/IID/BV-03-I",
    "HFP/AG/IIC/BV-01-I",
    "HFP/AG/IIC/BV-02-I",
    "HFP/AG/IIC/BV-03-I",
    "HFP/AG/HFI/BI-03-I",
    "HID/HOS/HCR/BV-01-I",
    "HID/HOS/HCR/BV-01-I",
    "L2CAP/LE/CFC/BV-07-C",
    "L2CAP/LE/CFC/BV-07-C",
    "L2CAP/LE/CFC/BV-11-C",
    "L2CAP/LE/CFC/BV-11-C",