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

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

Merge "[PTS-Bot] Added PAN/BNEP test cases"

parents 2fd67fec 83c5af6c
Loading
Loading
Loading
Loading
+10 −10
Original line number Diff line number Diff line
@@ -32,9 +32,9 @@ from mmi2grpc.hogp import HOGPProxy
from mmi2grpc.l2cap import L2CAPProxy
from mmi2grpc.map import MAPProxy
from mmi2grpc.opp import OPPProxy
from mmi2grpc.pan import PANProxy
from mmi2grpc.pbap import PBAPProxy
from mmi2grpc.rfcomm import RFCOMMProxy
from mmi2grpc.pan import PANProxy
from mmi2grpc.sdp import SDPProxy
from mmi2grpc.sm import SMProxy
from mmi2grpc._helpers import format_proxy
@@ -75,6 +75,7 @@ class IUT:
        # Profile proxies.
        self._a2dp = None
        self._avrcp = None
        self._bnep = None
        self._gatt = None
        self._gap = None
        self._hfp = None
@@ -83,10 +84,9 @@ class IUT:
        self._l2cap = None
        self._map = None
        self._opp = None
        self._pan = None
        self._pbap = None
        self._rfcomm = None
        self._pan = None
        self._bnep = None
        self._sdp = None
        self._sm = None

@@ -111,16 +111,16 @@ class IUT:

        self._a2dp = None
        self._avrcp = None
        self._bnep = None
        self._gatt = None
        self._gap = None
        self._hfp = None
        self._l2cap = None
        self._pan = None
        self._bnep = None
        self._hid = None
        self._hogp = None
        self._map = None
        self._opp = None
        self._pan = None
        self._pbap = None
        self._rfcomm = None
        self._sdp = None
@@ -245,6 +245,11 @@ class IUT:
            if not self._opp:
                self._opp = OPPProxy(grpc.insecure_channel(f"localhost:{self.pandora_server_port}"))
            return self._opp.interact(test, interaction, description, pts_address)
        # Instantiates PAN proxy and reroutes corresponding MMIs to it.
        if profile in ("PAN", "BNEP"):
            if not self._pan:
                self._pan = PANProxy(grpc.insecure_channel(f"localhost:{self.pandora_server_port}"))
            return self._pan.interact(test, interaction, description, pts_address)
        # Instantiates PBAP proxy and reroutes corresponding MMIs to it.
        if profile in ("PBAP"):
            if not self._pbap:
@@ -255,11 +260,6 @@ class IUT:
            if not self._rfcomm:
                self._rfcomm = RFCOMMProxy(grpc.insecure_channel(f"localhost:{self.pandora_server_port}"))
            return self._rfcomm.interact(test, interaction, description, pts_address)
        # Instantiates PAN proxy and reroutes corresponding MMIs to it.
        if profile in ('PAN', 'BNEP'):
            if not self._pan:
                self._pan = PANProxy(grpc.insecure_channel(f'localhost:{self.pandora_server_port}'))
            return self._pan.interact(test, interaction, description, pts_address)
        # Handles SDP MMIs.
        if profile in ("SDP"):
            if not self._sdp:
+95 −9
Original line number Diff line number Diff line
@@ -18,16 +18,17 @@ import sys
from mmi2grpc._helpers import assert_description
from mmi2grpc._proxy import ProfileProxy

from pandora_experimental.pan_grpc import PAN
from pandora_experimental.host_grpc import Host
from pandora_experimental.pan_grpc import PAN


class PANProxy(ProfileProxy):

    def __init__(self, channel):
        super().__init__(channel)
        self.pan = PAN(channel)
        self.host = Host(channel)
        self.pan = PAN(channel)

        self.connection = None

    def TSC_BNEP_mmi_iut_accept_transport(self, pts_addr: bytes, **kwargs):
@@ -41,7 +42,7 @@ class PANProxy(ProfileProxy):
        # Only accepting pairing here.
        self.pan.EnableTethering()
        self.host.WaitConnection(address=pts_addr)
        #self.connection = self.pan.ConnectPan(addr=pts_addr).connection

        return "OK"

    @assert_description
@@ -52,19 +53,21 @@ class PANProxy(ProfileProxy):

        return "OK"

    def TSC_BNEP_mmi_iut_initiate_transport(self, pts_addr: bytes, **kwargs):
    def TSC_BNEP_mmi_iut_initiate_transport(self, test: str, pts_addr: bytes, **kwargs):
        """
        Take action to initiate an PAN transport .

        Note: The IUT must require
        Basic L2cap configuration for this test case.
        """

        self.host.Connect(address=pts_addr)
        #self.pan.ConnectPan(connection=self.connection)
        #self.connection = self.host.WaitConnection(address=pts_addr).connection
        if test in "BNEP/CTRL/BV-02-C":
            self.pan.ConnectPan(address=pts_addr)

        return "OK"

    @assert_description
    def TSC_BNEP_mmi_iut_initiate_setup(self, **kwargs):
        """
        Take action to initiate setup connection
@@ -116,9 +119,6 @@ class PANProxy(ProfileProxy):

        return "OK"

    def TS_MTC_BNEPEX_iut_accept_general_ethernet(self, **kwargs):
        return "OK"

    @assert_description
    def TSC_BNEP_mmi_iut_accept_general_ethernet(self, **kwargs):
        """
@@ -142,3 +142,89 @@ class PANProxy(ProfileProxy):
        """

        return "OK"

    @assert_description
    def TSC_BNEP_mmi_iut_initiate_general_ethernet(self, **kwargs):
        """
        Take action to initiate general ethernet
        """

        return "OK"

    @assert_description
    def TSC_BNEP_mmi_iut_initiate_compressed_ethernet_dest(self, **kwargs):
        """
        Take action to initiate compressed ethernet destination
        """

        return "OK"

    @assert_description
    def TSC_BNEP_mmi_iut_confirm_compressed_ethernet_dest(self, **kwargs):
        """
        Please confirm IUT received compressed ethernet destination request.
        """

        return "OK"

    @assert_description
    def TSC_PAN_mmi_iut_dhcp_request_request(self, **kwargs):
        """
        Take action to send dhcp request
        """

        return "OK"

    @assert_description
    def TSC_PAN_mmi_confirm_ip_address_configured_from_DHCP(self, **kwargs):
        """
        Click OK if the IUT has configured a new IP address assigned by the DHCP
        server.

        Note: If IUT is able to handle multiple IP addresses, any
        active IP connections may be maintained. If IUT is able to handle one
        single IP address at the time any active applications SHALL be
        terminated.
        """

        return "OK"

    @assert_description
    def TSC_BNEP_mmi_iut_initiate_compressed_ethernet_source(self, **kwargs):
        """
        Take action to initiate compressed ethernet source
        """

        return "OK"

    @assert_description
    def TSC_BNEP_mmi_iut_confirm_compressed_ethernet_source(self, **kwargs):
        """
        Please confirm IUT received compressed ethernet source request.
        """

        return "OK"

    @assert_description
    def TSC_BNEP_mmi_iut_initiate_compressed_ethernet(self, **kwargs):
        """
        Take action to initiate compressed ethernet
        """

        return "OK"

    @assert_description
    def TSC_BNEP_mmi_iut_confirm_compressed_ethernet(self, **kwargs):
        """
        Please confirm IUT received compressed ethernet request.
        """

        return "OK"

    @assert_description
    def TSC_PAN_mmi_confirm_linklocal_ip_address_selected(self, **kwargs):
        """
        Click OK if the IUT has selected a LINKLOCAL IP address:
        """

        return "OK"
+2 −2
Original line number Diff line number Diff line
@@ -35,6 +35,7 @@
        <option name="profile" value="AVDTP/SNK" />
        <option name="profile" value="AVDTP/SRC" />
        <option name="profile" value="AVRCP" />
        <option name="profile" value="BNEP" />
        <option name="profile" value="GAP" />
        <option name="profile" value="GATT" />
        <option name="profile" value="HFP/AG" />
@@ -47,11 +48,10 @@
        <option name="profile" value="L2CAP/LE" />
        <option name="profile" value="MAP" />
        <option name="profile" value="OPP" />
        <option name="profile" value="PAN" />
        <option name="profile" value="PBAP/PSE" />
        <option name="profile" value="RFCOMM" />
        <option name="profile" value="SDP" />
        <option name="profile" value="SM" />
        <option name="profile" value="PAN" />
        <option name="profile" value="BNEP" />
    </test>
</configuration>
+2 −1
Original line number Diff line number Diff line
@@ -36,6 +36,7 @@
        <option name="profile" value="AVDTP/SNK" />
        <option name="profile" value="AVDTP/SRC" />
        <option name="profile" value="AVRCP" />
        <option name="profile" value="BNEP" />
        <option name="profile" value="GAP" />
        <option name="profile" value="GATT" />
        <option name="profile" value="HFP/AG" />
@@ -48,11 +49,11 @@
        <option name="profile" value="L2CAP/LE" />
        <option name="profile" value="MAP" />
        <option name="profile" value="OPP" />
        <option name="profile" value="PAN" />
        <option name="profile" value="PBAP/PSE" />
        <option name="profile" value="RFCOMM" />
        <option name="profile" value="SDP" />
        <option name="profile" value="SM" />
        <option name="profile" value="PAN" />
    </test>

    <object type="module_controller"
+27 −12
Original line number Diff line number Diff line
@@ -151,6 +151,23 @@
    "AVRCP/TG/PTT/BV-05-I",
    "AVRCP/TG/RCR/BV-02-C",
    "AVRCP/TG/RCR/BV-04-C",
    "BNEP/CTRL/BV-01-C",
    "BNEP/CTRL/BV-02-C",
    "BNEP/CTRL/BV-03-C",
    "BNEP/CTRL/BV-04-C",
    "BNEP/CTRL/BV-05-C",
    "BNEP/CTRL/BV-06-C",
    "BNEP/CTRL/BV-08-C",
    "BNEP/CTRL/BV-10-C",
    "BNEP/CTRL/BV-19-C",
    "BNEP/RX-C-D/BV-14-C",
    "BNEP/RX-C-S/BV-13-C",
    "BNEP/RX-C/BV-12-C",
    "BNEP/RX-TYPE-0/BV-11-C",
    "BNEP/RX-TYPE-0/BV-15-C",
    "BNEP/RX-TYPE-0/BV-16-C",
    "BNEP/RX-TYPE-0/BV-17-C",
    "BNEP/RX-TYPE-0/BV-18-C",
    "GAP/ADV/BV-01-C",
    "GAP/ADV/BV-02-C",
    "GAP/ADV/BV-03-C",
@@ -418,8 +435,11 @@
    "OPP/SR/OPH/BV-01-I",
    "OPP/SR/OPH/BV-02-I",
    "OPP/SR/OPH/BV-34-I",
    "PAN/NAP/MISC/UUID/BV-01-C",
    "PAN/GN/MISC/UUID/BV-01-C",
    "PAN/GN/MISC/UUID/BV-02-C",
    "PAN/NAP/SDP/BV-01-C",
    "PAN/PANU/IP/APP/BV-05-I",
    "PAN/PANU/IP/DHCP/BV-03-I",
    "PBAP/PSE/GOEP/BC/BV-03-I",
    "PBAP/PSE/GOEP/CON/BV-02-C",
    "PBAP/PSE/GOEP/ROB/BV-01-C",
@@ -553,7 +573,9 @@
  "flaky": [
    "A2DP/SRC/SUS/BV-02-I",
    "GATT/CL/GAD/BV-07-C",
    "GATT/CL/GAD/BV-08-C"
    "GATT/CL/GAD/BV-08-C",
    "PAN/NAP/MISC/UUID/BV-01-C",
    "PAN/NAP/MISC/UUID/BV-02-C"
  ],
  "skip": [
    "A2DP/SNK/SDP/BV-02-I",
@@ -606,10 +628,6 @@
    "AVRCP/TG/MCN/CB/BV-04-I",
    "AVRCP/TG/MCN/CB/BV-09-C",
    "AVRCP/TG/NFY/BV-04-C",
    "BNEP/CTRL/BV-02-C",
    "BNEP/RX-C-D/BV-14-C",
    "BNEP/RX-C-S/BV-13-C",
    "BNEP/RX-C/BV-12-C",
    "BNEP/TX-TYPE-0/BV-20-C",
    "GAP/BOND/BON/BV-01-C",
    "GAP/BOND/BON/BV-02-C",
@@ -824,24 +842,21 @@
    "MAP/MSE/MMN/BV-07-I",
    "MAP/MSE/MMN/BV-14-I",
    "MAP/MSE/MMU/BV-02-I",
    "PBAP/PSE/SSM/BV-07-C",
    "OPP/SR/BCP/BV-02-I",
    "OPP/SR/GOEP/ROB/BV-02-C",
    "OPP/SR/OPH/BV-10-I",
    "OPP/SR/OPH/BV-14-I",
    "OPP/SR/OPH/BV-18-I",
    "RFCOMM/DEVA-DEVB/RFC/BV-21-C",
    "RFCOMM/DEVA-DEVB/RFC/BV-22-C",
    "PAN/GN/MISC/UUID/BV-01-C",
    "PAN/GN/MISC/UUID/BV-02-C",
    "PAN/GN/SDP/BV-02-C",
    "PAN/NAP/BRIDGE/RX/BV-02-I",
    "PAN/NAP/BRIDGE/TX/BV-01-I",
    "PAN/NAP/MISC/UUID/BV-01-C",
    "PAN/NAP/MISC/UUID/BV-02-C",
    "PAN/PANU/IP/APP/BV-04-I",
    "PAN/PANU/IP/DHCP/BV-03-I",
    "PAN/PANU/IPv4/AUTONET/BV-01-I",
    "PBAP/PSE/SSM/BV-07-C",
    "RFCOMM/DEVA-DEVB/RFC/BV-21-C",
    "RFCOMM/DEVA-DEVB/RFC/BV-22-C",
    "SM/CEN/PKE/BV-01-C",
    "SM/CEN/SCCT/BV-03-C",
    "SM/CEN/SCCT/BV-05-C",
Loading