Loading android/pandora/mmi2grpc/mmi2grpc/hfp.py +26 −0 Original line number Diff line number Diff line Loading @@ -22,6 +22,14 @@ from pandora.host_grpc import Host import sys import threading # Standard time to wait before asking for waitConnection WAIT_DELAY_BEFORE_CONNECTION = 2 # The tests needs the MMI to accept pairing confirmation request. NEEDS_WAIT_CONNECTION_BEFORE_TEST = { 'HFP/AG/WBS/BV-01-I', } class HFPProxy(ProfileProxy): Loading @@ -32,6 +40,24 @@ class HFPProxy(ProfileProxy): self.connection = None def asyncWaitConnection(self, pts_addr, delay=WAIT_DELAY_BEFORE_CONNECTION): """ Send a WaitConnection in a grpc callback """ def waitConnectionCallback(self, pts_addr): self.connection = self.host.WaitConnection(address=pts_addr).connection print(f'HFP placeholder mmi: asyncWaitConnection', file=sys.stderr) th = threading.Timer(interval=delay, function=waitConnectionCallback, args=(self, pts_addr)) th.start() def test_started(self, test: str, pts_addr: bytes, **kwargs): if test in NEEDS_WAIT_CONNECTION_BEFORE_TEST: self.asyncWaitConnection(pts_addr) return "OK" @assert_description def TSC_delete_pairing_iut(self, pts_addr: bytes, **kwargs): """ Loading android/pandora/server/configs/PtsBotTest.xml +1 −0 Original line number Diff line number Diff line Loading @@ -26,6 +26,7 @@ <option name="profile" value="HFP/AG/DIS" /> <option name="profile" value="HFP/AG/HFI" /> <option name="profile" value="HFP/AG/SLC" /> <option name="profile" value="HFP/AG/WBS" /> <option name="profile" value="SDP/SR" /> <option name="profile" value="SM/CEN/EKS" /> <option name="profile" value="SM/CEN/JW" /> Loading android/pandora/server/configs/pts_bot_tests_config.json +2 −1 Original line number Diff line number Diff line Loading @@ -45,7 +45,8 @@ "HFP/AG/HFI/BI-03-I", "HFP/AG/HFI/BV-02-I", "HFP/AG/SLC/BV-09-I", "HFP/AG/SLC/BV-10-I" "HFP/AG/SLC/BV-10-I", "HFP/AG/WBS/BV-01-I" ], "skip": [ "A2DP/SRC/AS/BV-01-I", Loading Loading
android/pandora/mmi2grpc/mmi2grpc/hfp.py +26 −0 Original line number Diff line number Diff line Loading @@ -22,6 +22,14 @@ from pandora.host_grpc import Host import sys import threading # Standard time to wait before asking for waitConnection WAIT_DELAY_BEFORE_CONNECTION = 2 # The tests needs the MMI to accept pairing confirmation request. NEEDS_WAIT_CONNECTION_BEFORE_TEST = { 'HFP/AG/WBS/BV-01-I', } class HFPProxy(ProfileProxy): Loading @@ -32,6 +40,24 @@ class HFPProxy(ProfileProxy): self.connection = None def asyncWaitConnection(self, pts_addr, delay=WAIT_DELAY_BEFORE_CONNECTION): """ Send a WaitConnection in a grpc callback """ def waitConnectionCallback(self, pts_addr): self.connection = self.host.WaitConnection(address=pts_addr).connection print(f'HFP placeholder mmi: asyncWaitConnection', file=sys.stderr) th = threading.Timer(interval=delay, function=waitConnectionCallback, args=(self, pts_addr)) th.start() def test_started(self, test: str, pts_addr: bytes, **kwargs): if test in NEEDS_WAIT_CONNECTION_BEFORE_TEST: self.asyncWaitConnection(pts_addr) return "OK" @assert_description def TSC_delete_pairing_iut(self, pts_addr: bytes, **kwargs): """ Loading
android/pandora/server/configs/PtsBotTest.xml +1 −0 Original line number Diff line number Diff line Loading @@ -26,6 +26,7 @@ <option name="profile" value="HFP/AG/DIS" /> <option name="profile" value="HFP/AG/HFI" /> <option name="profile" value="HFP/AG/SLC" /> <option name="profile" value="HFP/AG/WBS" /> <option name="profile" value="SDP/SR" /> <option name="profile" value="SM/CEN/EKS" /> <option name="profile" value="SM/CEN/JW" /> Loading
android/pandora/server/configs/pts_bot_tests_config.json +2 −1 Original line number Diff line number Diff line Loading @@ -45,7 +45,8 @@ "HFP/AG/HFI/BI-03-I", "HFP/AG/HFI/BV-02-I", "HFP/AG/SLC/BV-09-I", "HFP/AG/SLC/BV-10-I" "HFP/AG/SLC/BV-10-I", "HFP/AG/WBS/BV-01-I" ], "skip": [ "A2DP/SRC/AS/BV-01-I", Loading