Loading android/pandora/mmi2grpc/mmi2grpc/__init__.py +4 −1 Original line number Diff line number Diff line Loading @@ -190,7 +190,10 @@ class IUT: # Handles A2DP and AVDTP MMIs. if profile in ("A2DP", "AVDTP"): if not self._a2dp: self._a2dp = A2DPProxy(grpc.insecure_channel(f"localhost:{self.pandora_server_port}")) self._a2dp = A2DPProxy( grpc.insecure_channel(f"localhost:{self.pandora_server_port}"), self.rootcanal, ) return self._a2dp.interact(test, interaction, description, pts_address) # Handles AVRCP and AVCTP MMIs. if profile in ("AVRCP", "AVCTP"): Loading android/pandora/mmi2grpc/mmi2grpc/a2dp.py +61 −14 Original line number Diff line number Diff line Loading @@ -19,8 +19,9 @@ from typing import Optional from grpc import RpcError from mmi2grpc._audio import AudioSignal from mmi2grpc._helpers import assert_description from mmi2grpc._helpers import assert_description, match_description from mmi2grpc._proxy import ProfileProxy from mmi2grpc._rootcanal import RootCanal from pandora_experimental.a2dp_grpc import A2DP from pandora_experimental.a2dp_pb2 import Sink, Source, PlaybackAudioRequest from pandora.host_grpc import Host Loading @@ -40,11 +41,12 @@ class A2DPProxy(ProfileProxy): sink: Optional[Sink] = None source: Optional[Source] = None def __init__(self, channel): def __init__(self, channel, rootcanal): super().__init__(channel) self.host = Host(channel) self.a2dp = A2DP(channel) self.rootcanal = rootcanal def convert_frame(data): return PlaybackAudioRequest(data=data, source=self.source) Loading Loading @@ -162,11 +164,8 @@ class A2DPProxy(ProfileProxy): Action: This can be also be done by placing the IUT or PTS in an RF shielded box. """ assert self.connection self.host.Disconnect(connection=self.connection) self.connection = None self.sink = None self.source = None self.rootcanal.disconnect_phy() return "OK" @assert_description Loading @@ -186,7 +185,7 @@ class A2DPProxy(ProfileProxy): if test == "A2DP/SRC/SUS/BV-01-I": # Stream is not suspended when we receive the interaction time.sleep(1) if test != "A2DP/SRC/SET/BV-03-I": # Not initiating a2dp start again for this test case self.a2dp.Start(source=self.source) self.audio.start() return "OK" Loading Loading @@ -397,6 +396,7 @@ class A2DPProxy(ProfileProxy): Action: Press OK when the IUT is ready to accept Bluetooth connections again. """ self.rootcanal.reconnect_phy_if_needed() return "OK" Loading Loading @@ -434,17 +434,20 @@ class A2DPProxy(ProfileProxy): # TODO: Extract and verify attribute name and value from description return "OK" @assert_description def TSC_A2DP_mmi_user_confirm_optional_string_attribute(self, **kwargs): @match_description def TSC_A2DP_mmi_user_confirm_optional_string_attribute(self, name: str, test: str, **kwargs): """ Tester found the optional SDP attribute named 'Service Name'. Press 'Yes' if the string displayed below is correct. Value: Advanced Audio Source Value: (?P<name>[\w\s]+) """ # TODO: Extract and verify attribute name and value from description if "SRC" in test: assert name == "Advanced Audio Source", name else: assert name == "Advanced Audio Sink", name return "OK" @assert_description Loading Loading @@ -584,3 +587,47 @@ class A2DPProxy(ProfileProxy): # TODO: verify return "OK" @assert_description def TSC_AVDTPEX_mmi_iut_initiate_delayreport(self, **kwargs): """ Take action if necessary to initiate a Delay Reporting command. """ return "OK" @assert_description def TSC_AVDTPEX_mmi_iut_initiate_set_configuration_delay_reporting(self, **kwargs): """ Take action to configure a stream with Delay Reporting. """ return "OK" @assert_description def TSC_AVDTPEX_mmi_iut_initiate_set_configuration_delayreport(self, **kwargs): """ Take action to initiate a stream using delay reporting. Note: The IUT must send a Delay Report command immediately after configuration of the stream. """ return "OK" @assert_description def TSC_AVDTP_mmi_iut_initiate_delayreport(self, **kwargs): """ Take action if necessary to initiate a Delay Reporting command. """ return "OK" @assert_description def TSC_A2DP_mmi_user_verify_delay_report_value(self, **kwargs): """ Is the delay value 3000, within a device acceptable range? """ # TODO: verify return "OK" android/pandora/mmi2grpc/mmi2grpc/hid.py +6 −1 Original line number Diff line number Diff line Loading @@ -43,7 +43,12 @@ class HIDProxy(ProfileProxy): range. """ self.host.Disconnect(connection=self.connection) # Performing out of range action def disconnect(): sleep(2) self.rootcanal.disconnect_phy() Thread(target=disconnect).start() return "OK" Loading android/pandora/server/configs/pts_bot_tests_config.json +9 −9 Original line number Diff line number Diff line Loading @@ -10,10 +10,14 @@ "A2DP/SNK/CC/BV-08-I", "A2DP/SNK/REL/BV-01-I", "A2DP/SNK/REL/BV-02-I", "A2DP/SNK/SDP/BV-02-I", "A2DP/SNK/SET/BV-01-I", "A2DP/SNK/SET/BV-02-I", "A2DP/SNK/SET/BV-03-I", "A2DP/SNK/SET/BV-05-I", "A2DP/SNK/SUS/BV-01-I", "A2DP/SNK/SYN/BV-01-C", "A2DP/SRC/AS/BV-02-I", "A2DP/SRC/CC/BV-09-I", "A2DP/SRC/REL/BV-01-I", "A2DP/SRC/REL/BV-02-I", Loading Loading @@ -46,11 +50,13 @@ "AVDTP/SNK/ACP/SIG/SMG/BV-12-C", "AVDTP/SNK/ACP/SIG/SMG/BV-16-C", "AVDTP/SNK/ACP/SIG/SMG/BV-18-C", "AVDTP/SNK/ACP/SIG/SMG/BV-20-C", "AVDTP/SNK/ACP/SIG/SMG/BV-22-C", "AVDTP/SNK/ACP/SIG/SMG/BV-24-C", "AVDTP/SNK/ACP/SIG/SMG/BV-26-C", "AVDTP/SNK/ACP/SIG/SMG/ESR04/BI-28-C", "AVDTP/SNK/ACP/SIG/SYN/BV-01-C", "AVDTP/SNK/ACP/SIG/SYN/BV-03-C", "AVDTP/SNK/ACP/TRA/BTR/BI-01-C", "AVDTP/SNK/ACP/TRA/BTR/BV-02-C", "AVDTP/SNK/INT/SIG/SMG/BI-30-C", Loading @@ -63,6 +69,8 @@ "AVDTP/SNK/INT/SIG/SMG/BV-25-C", "AVDTP/SNK/INT/SIG/SMG/BV-28-C", "AVDTP/SNK/INT/SIG/SMG/BV-31-C", "AVDTP/SNK/INT/SIG/SYN/BV-02-C", "AVDTP/SNK/INT/SIG/SYN/BV-04-C", "AVDTP/SRC/ACP/SIG/SMG/BI-05-C", "AVDTP/SRC/ACP/SIG/SMG/BI-08-C", "AVDTP/SRC/ACP/SIG/SMG/BI-14-C", Loading Loading @@ -408,6 +416,7 @@ "HID/HOS/HCE/BV-01-I", "HID/HOS/HCE/BV-03-I", "HID/HOS/HCE/BV-04-I", "HID/HOS/HCR/BV-01-I", "HID/HOS/HCR/BV-02-I", "HID/HOS/HDT/BV-01-I ", "HID/HOS/HDT/BV-02-I", Loading Loading @@ -680,14 +689,10 @@ "PAN/NAP/MISC/UUID/BV-02-C" ], "skip": [ "A2DP/SNK/SDP/BV-02-I", "A2DP/SNK/SET/BV-04-I", "A2DP/SNK/SET/BV-05-I", "A2DP/SNK/SET/BV-06-I", "A2DP/SNK/SUS/BV-02-I", "A2DP/SNK/SYN/BV-01-C", "A2DP/SRC/AS/BV-01-I", "A2DP/SRC/AS/BV-02-I", "A2DP/SRC/AS/BV-03-I", "A2DP/SRC/CC/BV-10-I", "A2DP/SRC/SET/BV-05-I", Loading @@ -704,16 +709,12 @@ "AVDTP/SNK/ACP/SIG/SMG/BI-11-C", "AVDTP/SNK/ACP/SIG/SMG/BI-23-C", "AVDTP/SNK/ACP/SIG/SMG/BV-14-C", "AVDTP/SNK/ACP/SIG/SMG/BV-20-C", "AVDTP/SNK/ACP/SIG/SMG/ESR05/BV-14-C", "AVDTP/SNK/ACP/SIG/SYN/BV-03-C", "AVDTP/SNK/INT/SIG/SMG/BV-11-C", "AVDTP/SNK/INT/SIG/SMG/BV-13-C", "AVDTP/SNK/INT/SIG/SMG/BV-19-C", "AVDTP/SNK/INT/SIG/SMG/BV-23-C", "AVDTP/SNK/INT/SIG/SMG/ESR05/BV-13-C", "AVDTP/SNK/INT/SIG/SYN/BV-02-C", "AVDTP/SNK/INT/SIG/SYN/BV-04-C", "AVDTP/SRC/ACP/SIG/SMG/BI-11-C", "AVDTP/SRC/ACP/SIG/SMG/BI-23-C", "AVDTP/SRC/ACP/SIG/SMG/BV-14-C", Loading Loading @@ -866,7 +867,6 @@ "HFP/HF/ACC/BV-02-I", "HFP/HF/ECC/BV-01-I", "HFP/HF/ECC/BV-02-I", "HID/HOS/HCR/BV-01-I", "L2CAP/CMC/BI-01-C", "L2CAP/CMC/BI-02-C", "L2CAP/CMC/BI-03-C", Loading Loading
android/pandora/mmi2grpc/mmi2grpc/__init__.py +4 −1 Original line number Diff line number Diff line Loading @@ -190,7 +190,10 @@ class IUT: # Handles A2DP and AVDTP MMIs. if profile in ("A2DP", "AVDTP"): if not self._a2dp: self._a2dp = A2DPProxy(grpc.insecure_channel(f"localhost:{self.pandora_server_port}")) self._a2dp = A2DPProxy( grpc.insecure_channel(f"localhost:{self.pandora_server_port}"), self.rootcanal, ) return self._a2dp.interact(test, interaction, description, pts_address) # Handles AVRCP and AVCTP MMIs. if profile in ("AVRCP", "AVCTP"): Loading
android/pandora/mmi2grpc/mmi2grpc/a2dp.py +61 −14 Original line number Diff line number Diff line Loading @@ -19,8 +19,9 @@ from typing import Optional from grpc import RpcError from mmi2grpc._audio import AudioSignal from mmi2grpc._helpers import assert_description from mmi2grpc._helpers import assert_description, match_description from mmi2grpc._proxy import ProfileProxy from mmi2grpc._rootcanal import RootCanal from pandora_experimental.a2dp_grpc import A2DP from pandora_experimental.a2dp_pb2 import Sink, Source, PlaybackAudioRequest from pandora.host_grpc import Host Loading @@ -40,11 +41,12 @@ class A2DPProxy(ProfileProxy): sink: Optional[Sink] = None source: Optional[Source] = None def __init__(self, channel): def __init__(self, channel, rootcanal): super().__init__(channel) self.host = Host(channel) self.a2dp = A2DP(channel) self.rootcanal = rootcanal def convert_frame(data): return PlaybackAudioRequest(data=data, source=self.source) Loading Loading @@ -162,11 +164,8 @@ class A2DPProxy(ProfileProxy): Action: This can be also be done by placing the IUT or PTS in an RF shielded box. """ assert self.connection self.host.Disconnect(connection=self.connection) self.connection = None self.sink = None self.source = None self.rootcanal.disconnect_phy() return "OK" @assert_description Loading @@ -186,7 +185,7 @@ class A2DPProxy(ProfileProxy): if test == "A2DP/SRC/SUS/BV-01-I": # Stream is not suspended when we receive the interaction time.sleep(1) if test != "A2DP/SRC/SET/BV-03-I": # Not initiating a2dp start again for this test case self.a2dp.Start(source=self.source) self.audio.start() return "OK" Loading Loading @@ -397,6 +396,7 @@ class A2DPProxy(ProfileProxy): Action: Press OK when the IUT is ready to accept Bluetooth connections again. """ self.rootcanal.reconnect_phy_if_needed() return "OK" Loading Loading @@ -434,17 +434,20 @@ class A2DPProxy(ProfileProxy): # TODO: Extract and verify attribute name and value from description return "OK" @assert_description def TSC_A2DP_mmi_user_confirm_optional_string_attribute(self, **kwargs): @match_description def TSC_A2DP_mmi_user_confirm_optional_string_attribute(self, name: str, test: str, **kwargs): """ Tester found the optional SDP attribute named 'Service Name'. Press 'Yes' if the string displayed below is correct. Value: Advanced Audio Source Value: (?P<name>[\w\s]+) """ # TODO: Extract and verify attribute name and value from description if "SRC" in test: assert name == "Advanced Audio Source", name else: assert name == "Advanced Audio Sink", name return "OK" @assert_description Loading Loading @@ -584,3 +587,47 @@ class A2DPProxy(ProfileProxy): # TODO: verify return "OK" @assert_description def TSC_AVDTPEX_mmi_iut_initiate_delayreport(self, **kwargs): """ Take action if necessary to initiate a Delay Reporting command. """ return "OK" @assert_description def TSC_AVDTPEX_mmi_iut_initiate_set_configuration_delay_reporting(self, **kwargs): """ Take action to configure a stream with Delay Reporting. """ return "OK" @assert_description def TSC_AVDTPEX_mmi_iut_initiate_set_configuration_delayreport(self, **kwargs): """ Take action to initiate a stream using delay reporting. Note: The IUT must send a Delay Report command immediately after configuration of the stream. """ return "OK" @assert_description def TSC_AVDTP_mmi_iut_initiate_delayreport(self, **kwargs): """ Take action if necessary to initiate a Delay Reporting command. """ return "OK" @assert_description def TSC_A2DP_mmi_user_verify_delay_report_value(self, **kwargs): """ Is the delay value 3000, within a device acceptable range? """ # TODO: verify return "OK"
android/pandora/mmi2grpc/mmi2grpc/hid.py +6 −1 Original line number Diff line number Diff line Loading @@ -43,7 +43,12 @@ class HIDProxy(ProfileProxy): range. """ self.host.Disconnect(connection=self.connection) # Performing out of range action def disconnect(): sleep(2) self.rootcanal.disconnect_phy() Thread(target=disconnect).start() return "OK" Loading
android/pandora/server/configs/pts_bot_tests_config.json +9 −9 Original line number Diff line number Diff line Loading @@ -10,10 +10,14 @@ "A2DP/SNK/CC/BV-08-I", "A2DP/SNK/REL/BV-01-I", "A2DP/SNK/REL/BV-02-I", "A2DP/SNK/SDP/BV-02-I", "A2DP/SNK/SET/BV-01-I", "A2DP/SNK/SET/BV-02-I", "A2DP/SNK/SET/BV-03-I", "A2DP/SNK/SET/BV-05-I", "A2DP/SNK/SUS/BV-01-I", "A2DP/SNK/SYN/BV-01-C", "A2DP/SRC/AS/BV-02-I", "A2DP/SRC/CC/BV-09-I", "A2DP/SRC/REL/BV-01-I", "A2DP/SRC/REL/BV-02-I", Loading Loading @@ -46,11 +50,13 @@ "AVDTP/SNK/ACP/SIG/SMG/BV-12-C", "AVDTP/SNK/ACP/SIG/SMG/BV-16-C", "AVDTP/SNK/ACP/SIG/SMG/BV-18-C", "AVDTP/SNK/ACP/SIG/SMG/BV-20-C", "AVDTP/SNK/ACP/SIG/SMG/BV-22-C", "AVDTP/SNK/ACP/SIG/SMG/BV-24-C", "AVDTP/SNK/ACP/SIG/SMG/BV-26-C", "AVDTP/SNK/ACP/SIG/SMG/ESR04/BI-28-C", "AVDTP/SNK/ACP/SIG/SYN/BV-01-C", "AVDTP/SNK/ACP/SIG/SYN/BV-03-C", "AVDTP/SNK/ACP/TRA/BTR/BI-01-C", "AVDTP/SNK/ACP/TRA/BTR/BV-02-C", "AVDTP/SNK/INT/SIG/SMG/BI-30-C", Loading @@ -63,6 +69,8 @@ "AVDTP/SNK/INT/SIG/SMG/BV-25-C", "AVDTP/SNK/INT/SIG/SMG/BV-28-C", "AVDTP/SNK/INT/SIG/SMG/BV-31-C", "AVDTP/SNK/INT/SIG/SYN/BV-02-C", "AVDTP/SNK/INT/SIG/SYN/BV-04-C", "AVDTP/SRC/ACP/SIG/SMG/BI-05-C", "AVDTP/SRC/ACP/SIG/SMG/BI-08-C", "AVDTP/SRC/ACP/SIG/SMG/BI-14-C", Loading Loading @@ -408,6 +416,7 @@ "HID/HOS/HCE/BV-01-I", "HID/HOS/HCE/BV-03-I", "HID/HOS/HCE/BV-04-I", "HID/HOS/HCR/BV-01-I", "HID/HOS/HCR/BV-02-I", "HID/HOS/HDT/BV-01-I ", "HID/HOS/HDT/BV-02-I", Loading Loading @@ -680,14 +689,10 @@ "PAN/NAP/MISC/UUID/BV-02-C" ], "skip": [ "A2DP/SNK/SDP/BV-02-I", "A2DP/SNK/SET/BV-04-I", "A2DP/SNK/SET/BV-05-I", "A2DP/SNK/SET/BV-06-I", "A2DP/SNK/SUS/BV-02-I", "A2DP/SNK/SYN/BV-01-C", "A2DP/SRC/AS/BV-01-I", "A2DP/SRC/AS/BV-02-I", "A2DP/SRC/AS/BV-03-I", "A2DP/SRC/CC/BV-10-I", "A2DP/SRC/SET/BV-05-I", Loading @@ -704,16 +709,12 @@ "AVDTP/SNK/ACP/SIG/SMG/BI-11-C", "AVDTP/SNK/ACP/SIG/SMG/BI-23-C", "AVDTP/SNK/ACP/SIG/SMG/BV-14-C", "AVDTP/SNK/ACP/SIG/SMG/BV-20-C", "AVDTP/SNK/ACP/SIG/SMG/ESR05/BV-14-C", "AVDTP/SNK/ACP/SIG/SYN/BV-03-C", "AVDTP/SNK/INT/SIG/SMG/BV-11-C", "AVDTP/SNK/INT/SIG/SMG/BV-13-C", "AVDTP/SNK/INT/SIG/SMG/BV-19-C", "AVDTP/SNK/INT/SIG/SMG/BV-23-C", "AVDTP/SNK/INT/SIG/SMG/ESR05/BV-13-C", "AVDTP/SNK/INT/SIG/SYN/BV-02-C", "AVDTP/SNK/INT/SIG/SYN/BV-04-C", "AVDTP/SRC/ACP/SIG/SMG/BI-11-C", "AVDTP/SRC/ACP/SIG/SMG/BI-23-C", "AVDTP/SRC/ACP/SIG/SMG/BV-14-C", Loading Loading @@ -866,7 +867,6 @@ "HFP/HF/ACC/BV-02-I", "HFP/HF/ECC/BV-01-I", "HFP/HF/ECC/BV-02-I", "HID/HOS/HCR/BV-01-I", "L2CAP/CMC/BI-01-C", "L2CAP/CMC/BI-02-C", "L2CAP/CMC/BI-03-C", Loading