Loading android/pandora/mmi2grpc/mmi2grpc/__init__.py +11 −1 Original line number Diff line number Diff line Loading @@ -34,6 +34,7 @@ from mmi2grpc.map import MAPProxy from mmi2grpc.opp import OPPProxy 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 Loading Loading @@ -84,6 +85,8 @@ class IUT: self._opp = None self._pbap = None self._rfcomm = None self._pan = None self._bnep = None self._sdp = None self._sm = None Loading Loading @@ -112,6 +115,8 @@ class IUT: self._gap = None self._hfp = None self._l2cap = None self._pan = None self._bnep = None self._hid = None self._hogp = None self._map = None Loading Loading @@ -250,6 +255,11 @@ 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: Loading android/pandora/mmi2grpc/mmi2grpc/pan.py 0 → 100644 +144 −0 Original line number Diff line number Diff line # Copyright 2022 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # https://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. import re 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 class PANProxy(ProfileProxy): def __init__(self, channel): super().__init__(channel) self.pan = PAN(channel) self.host = Host(channel) self.connection = None def TSC_BNEP_mmi_iut_accept_transport(self, pts_addr: bytes, **kwargs): """ Take action to accept the PAN transport from the tester. Note: The IUT must accept the Basic L2cap configuration for this test case. """ # 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 def TSC_BNEP_mmi_iut_accept_setup(self, pts_addr: bytes, **kwargs): """ Take action to accept setup connection. """ return "OK" def TSC_BNEP_mmi_iut_initiate_transport(self, 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 return "OK" def TSC_BNEP_mmi_iut_initiate_setup(self, **kwargs): """ Take action to initiate setup connection """ return "OK" @assert_description def TSC_BNEP_mmi_iut_accept_unknown(self, **kwargs): """ Take action to response to reserve control message """ return "OK" @assert_description def TSC_BNEP_mmi_iut_accept_filter_network(self, **kwargs): """ Take action to accept filter network. """ return "OK" @assert_description def TSC_BNEP_mmi_iut_accept_filter_multicast(self, **kwargs): """ Take action to accept filter multicast. """ return "OK" @assert_description def TSC_BNEP_mmi_iut_confirm_general_ethernet(self, **kwargs): """ Please confirm IUT received general ethernet request. """ return "OK" @assert_description def TSC_PAN_mmi_iut_send_arp_probe_request(self, **kwargs): """ Take action to send ARP probe request for the process of choosing a valid LINKLOCAL IP address. Notes: (1) It may be necessary to clear the assigned IP on the IUT first in order to trigger ARP request. (2) PTS anticipates an ARP request which has the destination protocol address field matching the value set in TSPX_iut_ip_address. """ 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): """ Take action to accept general ethernet. """ return "OK" @assert_description def TSC_PAN_mmi_iut_dhcp_discovery_request(self, **kwargs): """ Take action to send dhcp discovery request """ return "OK" @assert_description def TSC_PAN_mmi_iut_icmp_echo_reply(self, **kwargs): """ Take action to respond with ICMP echo reply """ return "OK" android/pandora/server/configs/PtsBotTest.xml +2 −0 Original line number Diff line number Diff line Loading @@ -51,5 +51,7 @@ <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> android/pandora/server/configs/PtsBotTestMts.xml +1 −0 Original line number Diff line number Diff line Loading @@ -51,6 +51,7 @@ <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" Loading android/pandora/server/configs/pts_bot_tests_config.json +18 −0 Original line number Diff line number Diff line Loading @@ -394,6 +394,8 @@ "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/NAP/SDP/BV-01-C", "PBAP/PSE/GOEP/BC/BV-03-I", "PBAP/PSE/GOEP/CON/BV-02-C", "PBAP/PSE/GOEP/ROB/BV-01-C", Loading Loading @@ -625,6 +627,11 @@ "AVRCP/TG/NFY/BV-06-C", "AVRCP/TG/NFY/BV-07-C", "AVRCP/TG/RCR/BV-02-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", "GAP/BOND/BON/BV-03-C", Loading Loading @@ -846,6 +853,16 @@ "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", "SM/CEN/PKE/BV-01-C", "SM/CEN/SCCT/BV-03-C", "SM/CEN/SCCT/BV-05-C", Loading Loading @@ -1774,6 +1791,7 @@ "TSPC_PAN_2_18": true, "TSPC_PAN_4_1": true, "TSPC_PAN_4_2": true, "TSPC_PAN_4_4": true, "TSPC_PBAP_1_2": true, "TSPC_PBAP_9_1": true, "TSPC_PBAP_9_2": true, Loading Loading
android/pandora/mmi2grpc/mmi2grpc/__init__.py +11 −1 Original line number Diff line number Diff line Loading @@ -34,6 +34,7 @@ from mmi2grpc.map import MAPProxy from mmi2grpc.opp import OPPProxy 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 Loading Loading @@ -84,6 +85,8 @@ class IUT: self._opp = None self._pbap = None self._rfcomm = None self._pan = None self._bnep = None self._sdp = None self._sm = None Loading Loading @@ -112,6 +115,8 @@ class IUT: self._gap = None self._hfp = None self._l2cap = None self._pan = None self._bnep = None self._hid = None self._hogp = None self._map = None Loading Loading @@ -250,6 +255,11 @@ 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: Loading
android/pandora/mmi2grpc/mmi2grpc/pan.py 0 → 100644 +144 −0 Original line number Diff line number Diff line # Copyright 2022 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # https://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. import re 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 class PANProxy(ProfileProxy): def __init__(self, channel): super().__init__(channel) self.pan = PAN(channel) self.host = Host(channel) self.connection = None def TSC_BNEP_mmi_iut_accept_transport(self, pts_addr: bytes, **kwargs): """ Take action to accept the PAN transport from the tester. Note: The IUT must accept the Basic L2cap configuration for this test case. """ # 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 def TSC_BNEP_mmi_iut_accept_setup(self, pts_addr: bytes, **kwargs): """ Take action to accept setup connection. """ return "OK" def TSC_BNEP_mmi_iut_initiate_transport(self, 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 return "OK" def TSC_BNEP_mmi_iut_initiate_setup(self, **kwargs): """ Take action to initiate setup connection """ return "OK" @assert_description def TSC_BNEP_mmi_iut_accept_unknown(self, **kwargs): """ Take action to response to reserve control message """ return "OK" @assert_description def TSC_BNEP_mmi_iut_accept_filter_network(self, **kwargs): """ Take action to accept filter network. """ return "OK" @assert_description def TSC_BNEP_mmi_iut_accept_filter_multicast(self, **kwargs): """ Take action to accept filter multicast. """ return "OK" @assert_description def TSC_BNEP_mmi_iut_confirm_general_ethernet(self, **kwargs): """ Please confirm IUT received general ethernet request. """ return "OK" @assert_description def TSC_PAN_mmi_iut_send_arp_probe_request(self, **kwargs): """ Take action to send ARP probe request for the process of choosing a valid LINKLOCAL IP address. Notes: (1) It may be necessary to clear the assigned IP on the IUT first in order to trigger ARP request. (2) PTS anticipates an ARP request which has the destination protocol address field matching the value set in TSPX_iut_ip_address. """ 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): """ Take action to accept general ethernet. """ return "OK" @assert_description def TSC_PAN_mmi_iut_dhcp_discovery_request(self, **kwargs): """ Take action to send dhcp discovery request """ return "OK" @assert_description def TSC_PAN_mmi_iut_icmp_echo_reply(self, **kwargs): """ Take action to respond with ICMP echo reply """ return "OK"
android/pandora/server/configs/PtsBotTest.xml +2 −0 Original line number Diff line number Diff line Loading @@ -51,5 +51,7 @@ <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>
android/pandora/server/configs/PtsBotTestMts.xml +1 −0 Original line number Diff line number Diff line Loading @@ -51,6 +51,7 @@ <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" Loading
android/pandora/server/configs/pts_bot_tests_config.json +18 −0 Original line number Diff line number Diff line Loading @@ -394,6 +394,8 @@ "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/NAP/SDP/BV-01-C", "PBAP/PSE/GOEP/BC/BV-03-I", "PBAP/PSE/GOEP/CON/BV-02-C", "PBAP/PSE/GOEP/ROB/BV-01-C", Loading Loading @@ -625,6 +627,11 @@ "AVRCP/TG/NFY/BV-06-C", "AVRCP/TG/NFY/BV-07-C", "AVRCP/TG/RCR/BV-02-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", "GAP/BOND/BON/BV-03-C", Loading Loading @@ -846,6 +853,16 @@ "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", "SM/CEN/PKE/BV-01-C", "SM/CEN/SCCT/BV-03-C", "SM/CEN/SCCT/BV-05-C", Loading Loading @@ -1774,6 +1791,7 @@ "TSPC_PAN_2_18": true, "TSPC_PAN_4_1": true, "TSPC_PAN_4_2": true, "TSPC_PAN_4_4": true, "TSPC_PBAP_1_2": true, "TSPC_PBAP_9_1": true, "TSPC_PBAP_9_2": true, Loading