diff options
author | Patrick Chiang <piyang@google.com> | 2017-02-03 23:52:58 -0800 |
---|---|---|
committer | Patrick Chiang <piyang@google.com> | 2017-02-06 11:39:25 -0800 |
commit | bcfa1aec35030208fd86942b84888c695a51e2d7 (patch) | |
tree | 257e2e6ca66d3a5a9b87f3f4762a10a75ab349cb | |
parent | 9f9a050fce453de48b738d3f66072fad83a1de11 (diff) | |
download | platform_tools_test_connectivity-bcfa1aec35030208fd86942b84888c695a51e2d7.tar.gz platform_tools_test_connectivity-bcfa1aec35030208fd86942b84888c695a51e2d7.tar.bz2 platform_tools_test_connectivity-bcfa1aec35030208fd86942b84888c695a51e2d7.zip |
Add 3 SRLTE E911 test cases
In TelLabEmergencyCallTest.py, add the following 3 SRLTE test cases
test_emergency_call_csfb_1x_ims_unregistered
test_emergency_call_csfb_1x_ps911_unsupported
test_emergency_call_csfb_1x_emc_barred
and make sure phone registers on LTE BTS1
In anritsu_utils.py, make check_ims_reg to be skipped in
ims_mo_cs_teardown function when ims registration is not allowed
Bug: None
Test: Manual, ran it. But the DUT does not pass.
Change-Id: I395e09618cda03f28401ff9a2c8f5b735526b2f0
-rw-r--r-- | acts/framework/acts/test_utils/tel/anritsu_utils.py | 11 | ||||
-rw-r--r-- | acts/tests/google/tel/lab/TelLabEmergencyCallTest.py | 139 |
2 files changed, 140 insertions, 10 deletions
diff --git a/acts/framework/acts/test_utils/tel/anritsu_utils.py b/acts/framework/acts/test_utils/tel/anritsu_utils.py index 58ed3c1b67..756f0d4a30 100644 --- a/acts/framework/acts/test_utils/tel/anritsu_utils.py +++ b/acts/framework/acts/test_utils/tel/anritsu_utils.py @@ -773,6 +773,7 @@ def ims_mo_cs_teardown(log, callee_number, teardown_side=CALL_TEARDOWN_PHONE, is_emergency=False, + check_ims_reg=True, check_ims_calling=True, srvcc=False, wait_time_in_volte=WAIT_TIME_IN_CALL_FOR_IMS, @@ -786,6 +787,7 @@ def ims_mo_cs_teardown(log, callee_number: Number to be called. teardown_side: the side to end the call (Phone or remote). is_emergency: to make emergency call on the phone. + check_ims_reg: check if Anritsu cscf server state is "SIPIDLE". check_ims_calling: check if Anritsu cscf server state is "CALLING". srvcc: is the test case a SRVCC call. wait_time_in_volte: Time for phone in VoLTE call, not used for SRLTE @@ -800,10 +802,11 @@ def ims_mo_cs_teardown(log, try: # confirm ims registration - if not wait_for_ims_cscf_status(log, anritsu_handle, - ims_virtual_network_id, - ImsCscfStatus.SIPIDLE.value): - raise _CallSequenceException("Phone IMS status is not idle.") + if check_ims_reg: + if not wait_for_ims_cscf_status(log, anritsu_handle, + ims_virtual_network_id, + ImsCscfStatus.SIPIDLE.value): + raise _CallSequenceException("IMS/CSCF status is not idle.") # confirm virtual phone in idle if not wait_for_virtualphone_state(log, virtual_phone_handle, VirtualPhoneStatus.STATUS_IDLE): diff --git a/acts/tests/google/tel/lab/TelLabEmergencyCallTest.py b/acts/tests/google/tel/lab/TelLabEmergencyCallTest.py index 55b4d15d2d..99047803e9 100644 --- a/acts/tests/google/tel/lab/TelLabEmergencyCallTest.py +++ b/acts/tests/google/tel/lab/TelLabEmergencyCallTest.py @@ -152,7 +152,28 @@ class TelLabEmergencyCallTest(TelephonyBaseTest): self.anritsu.csfb_type = csfb_type if srlte_csfb == "lte_call_failure": self.anritsu.send_command("IMSPSAPAUTOANSWER 1,DISABLE") - self.anritsu.start_simulation() + self.anritsu.start_simulation() + check_ims_reg = True + check_ims_calling = True + elif srlte_csfb == "ims_unregistered": + self.anritsu.start_simulation() + self.anritsu.send_command( + "IMSCSCFBEHAVIOR 1,SENDERRORRESPONSE603") + check_ims_reg = False + check_ims_calling = False + elif srlte_csfb == "ps911_unsupported": + self.anritsu.send_command("EMCBS NOTSUPPORT,BTS1") + self.anritsu.start_simulation() + check_ims_reg = True + check_ims_calling = False + elif srlte_csfb == "emc_barred": + self.anritsu.send_command("ACBARRED USERSPECIFIC,BTS1") + self.anritsu.send_command("LTEEMERGENCYACBARRED BARRED,BTS1") + self.anritsu.start_simulation() + check_ims_reg = True + check_ims_calling = False + else: + self.anritsu.start_simulation() iterations = 1 if self.stress_test_number > 0: iterations = self.stress_test_number @@ -164,6 +185,12 @@ class TelLabEmergencyCallTest(TelephonyBaseTest): # FIXME: There's no good reason why this must be true; # I can only assume this was done to work around a problem self.ad.droid.telephonyToggleDataConnection(False) + # turn off all other BTS to ensure UE registers on BTS1 + no_of_bts = len( + self.anritsu.send_query("SIMMODEL?").split(",")) + for i in range(2, no_of_bts + 1): + self.anritsu.send_command("OUTOFSERVICE OUT,BTS{}".format( + i)) if phone_setup_func is not None: if not phone_setup_func(self.ad): @@ -171,6 +198,10 @@ class TelLabEmergencyCallTest(TelephonyBaseTest): continue if is_wait_for_registration: self.anritsu.wait_for_registration_state() + # turn all other BTS back to on + for i in range(2, no_of_bts + 1): + self.anritsu.send_command("OUTOFSERVICE IN,BTS{}".format( + i)) if phone_idle_func_after_registration: if not phone_idle_func_after_registration(self.log, @@ -181,7 +212,8 @@ class TelLabEmergencyCallTest(TelephonyBaseTest): if srlte_csfb or srvcc: if not ims_mo_cs_teardown( self.log, self.ad, self.anritsu, emergency_number, - CALL_TEARDOWN_PHONE, True, True, False, + CALL_TEARDOWN_PHONE, True, check_ims_reg, + check_ims_calling, False, WAIT_TIME_IN_CALL_FOR_IMS, WAIT_TIME_IN_CALL): self.log.error( "Phone {} Failed to make emergency call to {}" @@ -514,12 +546,12 @@ class TelLabEmergencyCallTest(TelephonyBaseTest): 2. Turn on DUT and enable VoLTE. Make an emergency call to 911. 3. Make sure Anritsu IMS server does not answer the call 4. The DUT requests CSFB to 1XCDMA and Anritsu accepts the call. - 4. Tear down the call. + 5. Tear down the call. Expected Results: - 2. VoLTE Emergency call is made. - 3. Anritsu receive the call but does not answer. - 4. The 911 call CSFB to CDMA1x and answered successfully. + 1. VoLTE Emergency call is made. + 2. Anritsu receive the call but does not answer. + 3. The 911 call CSFB to CDMA1x and answered successfully. 4. Tear down call succeed. Returns: @@ -536,6 +568,101 @@ class TelLabEmergencyCallTest(TelephonyBaseTest): wait_time_in_call=WAIT_TIME_IN_CALL_FOR_IMS) @TelephonyBaseTest.tel_test_wrap + def test_emergency_call_csfb_1x_ims_unregistered(self): + """ Test Emergency call functionality, + CSFB to CDMA1x because ims registration delcined + Ref: VzW LTE E911 test plan, 2.25, VZ_TC_LTEE911_7483 + Steps: + 1. Setup CallBox on VoLTE network with CDMA1x. + 2. Setup Anritsu IMS server to decline IMS registration + 3. Turn on DUT and enable VoLTE. Make an emergency call to 911. + 4. The DUT requests CSFB to 1XCDMA and Anritsu accepts the call. + 5. Tear down the call. + + Expected Results: + 1. Phone registers on LTE network with VoLTE enabled. + 2. When Emergency call is made, phone request CSFB to CDMA1x. + 3. The 911 call on CDMA1x is answered successfully. + 4. Tear down call succeed. + + Returns: + True if pass; False if fail + """ + return self._setup_emergency_call( + self.CELL_PARAM_FILE, + set_system_model_lte_1x, + self.SIM_PARAM_FILE_FOR_VOLTE, + self._phone_setup_volte, + None, + srlte_csfb="ims_unregistered", + emergency_number=self.emergency_call_number, + wait_time_in_call=WAIT_TIME_IN_CALL_FOR_IMS) + + @TelephonyBaseTest.tel_test_wrap + def test_emergency_call_csfb_1x_ps911_unsupported(self): + """ Test Emergency call functionality, + CSFB to CDMA1x because MME does not support PS911, by setting + Emergency Bearer Service not supported in EPS network feature + Ref: VzW LTE E911 test plan, 2.26, VZ_TC_LTEE911_8357 + Steps: + 1. Setup CallBox on VoLTE network with CDMA1x. + 2. Setup Emergency Bearer Service not supported in EPS network feature + 3. Turn on DUT and enable VoLTE. Make an emergency call to 911. + 4. The DUT requests CSFB to 1XCDMA and Anritsu accepts the call. + 5. Tear down the call. + + Expected Results: + 1. Phone registers on LTE network with VoLTE enabled. + 2. When Emergency call is made, phone request CSFB to CDMA1x. + 3. The 911 call on CDMA1x is answered successfully. + 4. Tear down call succeed. + + Returns: + True if pass; False if fail + """ + return self._setup_emergency_call( + self.CELL_PARAM_FILE, + set_system_model_lte_1x, + self.SIM_PARAM_FILE_FOR_VOLTE, + self._phone_setup_volte, + phone_idle_volte, + srlte_csfb="ps911_unsupported", + emergency_number=self.emergency_call_number, + wait_time_in_call=WAIT_TIME_IN_CALL_FOR_IMS) + + @TelephonyBaseTest.tel_test_wrap + def test_emergency_call_csfb_1x_emc_barred(self): + """ Test Emergency call functionality, + CSFB to CDMA1x because SIB2 Emergency Barred, + by setting Access Class Barred for Emergency + Ref: VzW LTE E911 test plan, 2.27, VZ_TC_LTEE911_8358 + Steps: + 1. Setup CallBox on VoLTE network with CDMA1x. + 2. Set Access Class Barred for Emergency in SIB2 + 3. Turn on DUT and enable VoLTE. Make an emergency call to 911. + 4. The DUT requests CSFB to 1XCDMA and Anritsu accepts the call. + 5. Tear down the call. + + Expected Results: + 1. Phone registers on LTE network with VoLTE enabled. + 2. When Emergency call is made, phone request CSFB to CDMA1x. + 3. The 911 call on CDMA1x is answered successfully. + 4. Tear down call succeed. + + Returns: + True if pass; False if fail + """ + return self._setup_emergency_call( + self.CELL_PARAM_FILE, + set_system_model_lte_1x, + self.SIM_PARAM_FILE_FOR_VOLTE, + self._phone_setup_volte, + phone_idle_volte, + srlte_csfb="emc_barred", + emergency_number=self.emergency_call_number, + wait_time_in_call=WAIT_TIME_IN_CALL_FOR_IMS) + + @TelephonyBaseTest.tel_test_wrap def test_emergency_call_volte_1x(self): """ Test Emergency call functionality on VoLTE with CDMA1x Ref: VzW LTE E911 test plan, 2.24, VZ_TC_LTEE911_7482 |