diff options
author | Betty Zhou <bettyzhou@google.com> | 2017-02-07 21:56:38 +0000 |
---|---|---|
committer | Betty Zhou <bettyzhou@google.com> | 2017-02-08 03:37:54 +0000 |
commit | 39ebbb122378bbbca1e217c07344f7758e00ed36 (patch) | |
tree | 6691a345cbcfa1d697b3bd21dab2ec34fcf6f5b3 | |
parent | 92d1b43477c43d16504056eb39a189c29bced7d6 (diff) | |
download | platform_tools_test_connectivity-39ebbb122378bbbca1e217c07344f7758e00ed36.tar.gz platform_tools_test_connectivity-39ebbb122378bbbca1e217c07344f7758e00ed36.tar.bz2 platform_tools_test_connectivity-39ebbb122378bbbca1e217c07344f7758e00ed36.zip |
Merge "Change expected call state for no-hold-button device." am: eafbd8f3ef am: 16a1234633 am: 340bdddf33
am: 5d5ef904f3
Change-Id: I87e14885ae0dd324fd4b44d1f092cdedaaf4ea5a
(cherry picked from commit d4ac16ba50d7f54c4613d6078404bbcde9eb2207)
-rw-r--r-- | acts/tests/google/tel/live/TelLiveVoiceConfTest.py | 60 |
1 files changed, 36 insertions, 24 deletions
diff --git a/acts/tests/google/tel/live/TelLiveVoiceConfTest.py b/acts/tests/google/tel/live/TelLiveVoiceConfTest.py index 3982ea05d8..8168669054 100644 --- a/acts/tests/google/tel/live/TelLiveVoiceConfTest.py +++ b/acts/tests/google/tel/live/TelLiveVoiceConfTest.py @@ -396,6 +396,13 @@ class TelLiveVoiceConfTest(TelephonyBaseTest): """ Private Test Utils """ + def _get_expected_call_state(self, ad): + if ad.model in ("sailfish", "marlin") and "vzw" in [ + sub["operator"] for sub in ad.cfg["subscription"].values() + ]: + return CALL_STATE_ACTIVE + return CALL_STATE_HOLDING + def _hangup_call(self, ad, device_description='Device'): if not hangup_call(self.log, ad): self.log.error("Failed to hang up on {}: {}".format( @@ -1744,7 +1751,8 @@ class TelLiveVoiceConfTest(TelephonyBaseTest): call_conf_id = get_cep_conference_call_id(ads[0]) if call_conf_id is None: self.log.error( - "No call with children. Probably CEP not enabled or merge failed.") + "No call with children. Probably CEP not enabled or merge failed." + ) return None calls.remove(call_conf_id) if (set(ads[0].droid.telecomCallGetCallChildren(call_conf_id)) != @@ -2096,6 +2104,7 @@ class TelLiveVoiceConfTest(TelephonyBaseTest): self.log.info("Hangup at {}, verify call continues.".format( ad_hangup.serial)) if not self._hangup_call(ad_hangup): + ad_hangup.log.error("Phone fails to hang up") return False time.sleep(WAIT_TIME_IN_CALL) @@ -2104,11 +2113,14 @@ class TelLiveVoiceConfTest(TelephonyBaseTest): call_id, ad_verify.droid.telecomCallGetCallState( call_id), call_state)) return False + ad_verify.log.info("Call in expected %s state", call_state) # TODO: b/26296375 add voice check. if not verify_incall_state(self.log, ads_active, True): + ads_active.log.error("Phone not in call state") return False if not verify_incall_state(self.log, [ad_hangup], False): + ad_hangup.log.error("Phone not in hangup state") return False return True @@ -4533,7 +4545,7 @@ class TelLiveVoiceConfTest(TelephonyBaseTest): ad_hangup=ads[2], ad_verify=ads[0], call_id=call_ab_id, - call_state=CALL_STATE_HOLDING, + call_state=self._get_expected_call_state(ads[0]), ads_active=[ads[0], ads[1]]) @TelephonyBaseTest.tel_test_wrap @@ -4581,7 +4593,7 @@ class TelLiveVoiceConfTest(TelephonyBaseTest): ad_hangup=ads[2], ad_verify=ads[0], call_id=call_ab_id, - call_state=CALL_STATE_HOLDING, + call_state=self._get_expected_call_state(ads[0]), ads_active=[ads[0], ads[1]]) @TelephonyBaseTest.tel_test_wrap @@ -4628,7 +4640,7 @@ class TelLiveVoiceConfTest(TelephonyBaseTest): ad_hangup=ads[1], ad_verify=ads[0], call_id=call_ac_id, - call_state=CALL_STATE_HOLDING, + call_state=self._get_expected_call_state(ads[0]), ads_active=[ads[0], ads[2]]) @TelephonyBaseTest.tel_test_wrap @@ -4673,7 +4685,7 @@ class TelLiveVoiceConfTest(TelephonyBaseTest): ad_hangup=ads[1], ad_verify=ads[0], call_id=call_ac_id, - call_state=CALL_STATE_HOLDING, + call_state=self._get_expected_call_state(ads[0]), ads_active=[ads[0], ads[2]]) @TelephonyBaseTest.tel_test_wrap @@ -4721,7 +4733,7 @@ class TelLiveVoiceConfTest(TelephonyBaseTest): ad_hangup=ads[2], ad_verify=ads[0], call_id=call_ab_id, - call_state=CALL_STATE_HOLDING, + call_state=self._get_expected_call_state(ads[0]), ads_active=[ads[0], ads[1]]) @TelephonyBaseTest.tel_test_wrap @@ -4769,7 +4781,7 @@ class TelLiveVoiceConfTest(TelephonyBaseTest): ad_hangup=ads[2], ad_verify=ads[0], call_id=call_ab_id, - call_state=CALL_STATE_HOLDING, + call_state=self._get_expected_call_state(ads[0]), ads_active=[ads[0], ads[1]]) @TelephonyBaseTest.tel_test_wrap @@ -4815,7 +4827,7 @@ class TelLiveVoiceConfTest(TelephonyBaseTest): ad_hangup=ads[1], ad_verify=ads[0], call_id=call_ac_id, - call_state=CALL_STATE_HOLDING, + call_state=self._get_expected_call_state(ads[0]), ads_active=[ads[0], ads[2]]) @TelephonyBaseTest.tel_test_wrap @@ -4861,7 +4873,7 @@ class TelLiveVoiceConfTest(TelephonyBaseTest): ad_hangup=ads[1], ad_verify=ads[0], call_id=call_ac_id, - call_state=CALL_STATE_HOLDING, + call_state=self._get_expected_call_state(ads[0]), ads_active=[ads[0], ads[2]]) @TelephonyBaseTest.tel_test_wrap @@ -4909,7 +4921,7 @@ class TelLiveVoiceConfTest(TelephonyBaseTest): ad_hangup=ads[2], ad_verify=ads[0], call_id=call_ab_id, - call_state=CALL_STATE_HOLDING, + call_state=self._get_expected_call_state(ads[0]), ads_active=[ads[0], ads[1]]) @TelephonyBaseTest.tel_test_wrap @@ -4957,7 +4969,7 @@ class TelLiveVoiceConfTest(TelephonyBaseTest): ad_hangup=ads[2], ad_verify=ads[0], call_id=call_ab_id, - call_state=CALL_STATE_HOLDING, + call_state=self._get_expected_call_state(ads[0]), ads_active=[ads[0], ads[1]]) @TelephonyBaseTest.tel_test_wrap @@ -5003,7 +5015,7 @@ class TelLiveVoiceConfTest(TelephonyBaseTest): ad_hangup=ads[1], ad_verify=ads[0], call_id=call_ac_id, - call_state=CALL_STATE_HOLDING, + call_state=self._get_expected_call_state(ads[0]), ads_active=[ads[0], ads[2]]) @TelephonyBaseTest.tel_test_wrap @@ -5049,7 +5061,7 @@ class TelLiveVoiceConfTest(TelephonyBaseTest): ad_hangup=ads[1], ad_verify=ads[0], call_id=call_ac_id, - call_state=CALL_STATE_HOLDING, + call_state=self._get_expected_call_state(ads[0]), ads_active=[ads[0], ads[2]]) @TelephonyBaseTest.tel_test_wrap @@ -7356,7 +7368,7 @@ class TelLiveVoiceConfTest(TelephonyBaseTest): ad_hangup=ads[2], ad_verify=ads[0], call_id=call_ab_id, - call_state=CALL_STATE_HOLDING, + call_state=self._get_expected_call_state(ads[0]), ads_active=[ads[0], ads[1]]) @TelephonyBaseTest.tel_test_wrap @@ -9017,7 +9029,7 @@ class TelLiveVoiceConfTest(TelephonyBaseTest): ad_hangup=ads[2], ad_verify=ads[0], call_id=call_ab_id, - call_state=CALL_STATE_HOLDING, + call_state=self._get_expected_call_state(ads[0]), ads_active=[ads[0], ads[1]]) @TelephonyBaseTest.tel_test_wrap @@ -9055,7 +9067,7 @@ class TelLiveVoiceConfTest(TelephonyBaseTest): ad_hangup=ads[2], ad_verify=ads[0], call_id=call_ab_id, - call_state=CALL_STATE_HOLDING, + call_state=self._get_expected_call_state(ads[0]), ads_active=[ads[0], ads[1]]) @TelephonyBaseTest.tel_test_wrap @@ -9093,7 +9105,7 @@ class TelLiveVoiceConfTest(TelephonyBaseTest): ad_hangup=ads[2], ad_verify=ads[0], call_id=call_ab_id, - call_state=CALL_STATE_HOLDING, + call_state=self._get_expected_call_state(ads[0]), ads_active=[ads[0], ads[1]]) @TelephonyBaseTest.tel_test_wrap @@ -9204,7 +9216,7 @@ class TelLiveVoiceConfTest(TelephonyBaseTest): ad_hangup=ads[2], ad_verify=ads[0], call_id=call_ab_id, - call_state=CALL_STATE_HOLDING, + call_state=self._get_expected_call_state(ads[0]), ads_active=[ads[0], ads[1]]) @TelephonyBaseTest.tel_test_wrap @@ -9242,7 +9254,7 @@ class TelLiveVoiceConfTest(TelephonyBaseTest): ad_hangup=ads[2], ad_verify=ads[0], call_id=call_ab_id, - call_state=CALL_STATE_HOLDING, + call_state=self._get_expected_call_state(ads[0]), ads_active=[ads[0], ads[1]]) @TelephonyBaseTest.tel_test_wrap @@ -9350,7 +9362,7 @@ class TelLiveVoiceConfTest(TelephonyBaseTest): ad_hangup=ads[1], ad_verify=ads[0], call_id=call_ac_id, - call_state=CALL_STATE_HOLDING, + call_state=self._get_expected_call_state(ads[0]), ads_active=[ads[0], ads[2]]) @TelephonyBaseTest.tel_test_wrap @@ -9387,7 +9399,7 @@ class TelLiveVoiceConfTest(TelephonyBaseTest): ad_hangup=ads[1], ad_verify=ads[0], call_id=call_ac_id, - call_state=CALL_STATE_HOLDING, + call_state=self._get_expected_call_state(ads[0]), ads_active=[ads[0], ads[2]]) @TelephonyBaseTest.tel_test_wrap @@ -9424,7 +9436,7 @@ class TelLiveVoiceConfTest(TelephonyBaseTest): ad_hangup=ads[1], ad_verify=ads[0], call_id=call_ac_id, - call_state=CALL_STATE_HOLDING, + call_state=self._get_expected_call_state(ads[0]), ads_active=[ads[0], ads[2]]) @TelephonyBaseTest.tel_test_wrap @@ -9565,7 +9577,7 @@ class TelLiveVoiceConfTest(TelephonyBaseTest): ad_hangup=ads[1], ad_verify=ads[0], call_id=call_ac_id, - call_state=CALL_STATE_HOLDING, + call_state=self._get_expected_call_state(ads[0]), ads_active=[ads[0], ads[2]]) @TelephonyBaseTest.tel_test_wrap @@ -9602,7 +9614,7 @@ class TelLiveVoiceConfTest(TelephonyBaseTest): ad_hangup=ads[1], ad_verify=ads[0], call_id=call_ac_id, - call_state=CALL_STATE_HOLDING, + call_state=self._get_expected_call_state(ads[0]), ads_active=[ads[0], ads[2]]) def _test_gsm_mo_mo_add_swap_x(self, num_swaps): |