diff options
author | Xianyuan Jia <xianyuanjia@google.com> | 2020-09-18 16:37:02 -0700 |
---|---|---|
committer | Xianyuan Jia <xianyuanjia@google.com> | 2020-09-18 17:50:00 -0700 |
commit | bec5beccd4199085976731abbcf42c364fe7824a (patch) | |
tree | 2d05ee7495737dbe4f586d50d2da0cf9c3a9d989 | |
parent | 12313bf7b00e73030c14e44cb8eb2ea9898f112d (diff) | |
download | platform_tools_test_connectivity-bec5beccd4199085976731abbcf42c364fe7824a.tar.gz platform_tools_test_connectivity-bec5beccd4199085976731abbcf42c364fe7824a.tar.bz2 platform_tools_test_connectivity-bec5beccd4199085976731abbcf42c364fe7824a.zip |
Refactor band constants from test_utils/tel/anritsu_utils to controllers/anritsu_lib/band_constants
Bug: 168834810
Test: local
Change-Id: I4d2aa8851b2815bed8d3839dd388b72160a252be
4 files changed, 45 insertions, 29 deletions
diff --git a/acts/framework/acts/controllers/anritsu_lib/band_constants.py b/acts/framework/acts/controllers/anritsu_lib/band_constants.py new file mode 100644 index 0000000000..c7f5771e54 --- /dev/null +++ b/acts/framework/acts/controllers/anritsu_lib/band_constants.py @@ -0,0 +1,31 @@ +#!/usr/bin/env python3 +# +# Copyright 2020 - The Android Open Source Project +# +# 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 +# +# http://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. + +# GSM BAND constants +GSM_BAND_GSM450 = "GSM450" +GSM_BAND_GSM480 = "GSM480" +GSM_BAND_GSM850 = "GSM850" +GSM_BAND_PGSM900 = "P-GSM900" +GSM_BAND_EGSM900 = "E-GSM900" +GSM_BAND_RGSM900 = "R-GSM900" +GSM_BAND_DCS1800 = "DCS1800" +GSM_BAND_PCS1900 = "PCS1900" + +LTE_BAND_2 = 2 +LTE_BAND_4 = 4 +LTE_BAND_12 = 12 +WCDMA_BAND_1 = 1 +WCDMA_BAND_2 = 2 diff --git a/acts/framework/acts/controllers/anritsu_lib/cell_configurations.py b/acts/framework/acts/controllers/anritsu_lib/cell_configurations.py index a8d79b5ebe..636b03f0a6 100644 --- a/acts/framework/acts/controllers/anritsu_lib/cell_configurations.py +++ b/acts/framework/acts/controllers/anritsu_lib/cell_configurations.py @@ -16,14 +16,14 @@ """ Sanity tests for voice tests in telephony """ +from acts.controllers.anritsu_lib.band_constants import GSM_BAND_PCS1900 +from acts.controllers.anritsu_lib.band_constants import GSM_BAND_GSM850 +from acts.controllers.anritsu_lib.band_constants import LTE_BAND_2 +from acts.controllers.anritsu_lib.band_constants import LTE_BAND_4 +from acts.controllers.anritsu_lib.band_constants import LTE_BAND_12 +from acts.controllers.anritsu_lib.band_constants import WCDMA_BAND_1 +from acts.controllers.anritsu_lib.band_constants import WCDMA_BAND_2 from acts.controllers.anritsu_lib.md8475a import BtsBandwidth -from acts.test_utils.tel.anritsu_utils import GSM_BAND_PCS1900 -from acts.test_utils.tel.anritsu_utils import GSM_BAND_GSM850 -from acts.test_utils.tel.anritsu_utils import LTE_BAND_2 -from acts.test_utils.tel.anritsu_utils import LTE_BAND_4 -from acts.test_utils.tel.anritsu_utils import LTE_BAND_12 -from acts.test_utils.tel.anritsu_utils import WCDMA_BAND_1 -from acts.test_utils.tel.anritsu_utils import WCDMA_BAND_2 # Different Cell configurations # TMO bands diff --git a/acts/framework/acts/controllers/cellular_lib/GsmSimulation.py b/acts/framework/acts/controllers/cellular_lib/GsmSimulation.py index 20c731b8fa..b7237f354c 100644 --- a/acts/framework/acts/controllers/cellular_lib/GsmSimulation.py +++ b/acts/framework/acts/controllers/cellular_lib/GsmSimulation.py @@ -17,15 +17,15 @@ import ntpath import time +from acts.controllers.anritsu_lib.band_constants import GSM_BAND_DCS1800 +from acts.controllers.anritsu_lib.band_constants import GSM_BAND_EGSM900 +from acts.controllers.anritsu_lib.band_constants import GSM_BAND_GSM850 +from acts.controllers.anritsu_lib.band_constants import GSM_BAND_RGSM900 from acts.controllers.anritsu_lib.md8475a import BtsGprsMode from acts.controllers.anritsu_lib.md8475a import BtsNumber from acts.controllers.anritsu_lib import md8475_cellular_simulator as anritsusim from acts.controllers.cellular_lib import BaseCellularDut from acts.controllers.cellular_lib.BaseSimulation import BaseSimulation -from acts.test_utils.tel.anritsu_utils import GSM_BAND_DCS1800 -from acts.test_utils.tel.anritsu_utils import GSM_BAND_EGSM900 -from acts.test_utils.tel.anritsu_utils import GSM_BAND_GSM850 -from acts.test_utils.tel.anritsu_utils import GSM_BAND_RGSM900 class GsmSimulation(BaseSimulation): diff --git a/acts/framework/acts/test_utils/tel/anritsu_utils.py b/acts/framework/acts/test_utils/tel/anritsu_utils.py index a06fd99350..4ffdd8b883 100644 --- a/acts/framework/acts/test_utils/tel/anritsu_utils.py +++ b/acts/framework/acts/test_utils/tel/anritsu_utils.py @@ -18,6 +18,7 @@ import time from queue import Empty from datetime import datetime +from acts.controllers.anritsu_lib import band_constants from acts.controllers.anritsu_lib._anritsu_utils import AnritsuUtils from acts.controllers.anritsu_lib.md8475a import BtsNumber from acts.controllers.anritsu_lib.md8475a import BtsNwNameEnable @@ -145,22 +146,6 @@ Fi_CSCF_IPV6_ADDR_IMS = "2001:0:0:1::3" Fi_CSCF_IPV4_ADDR_911 = "192.168.1.12" Fi_CSCF_IPV6_ADDR_911 = "2001:0:0:2::2" -# GSM BAND constants -GSM_BAND_GSM450 = "GSM450" -GSM_BAND_GSM480 = "GSM480" -GSM_BAND_GSM850 = "GSM850" -GSM_BAND_PGSM900 = "P-GSM900" -GSM_BAND_EGSM900 = "E-GSM900" -GSM_BAND_RGSM900 = "R-GSM900" -GSM_BAND_DCS1800 = "DCS1800" -GSM_BAND_PCS1900 = "PCS1900" - -LTE_BAND_2 = 2 -LTE_BAND_4 = 4 -LTE_BAND_12 = 12 -WCDMA_BAND_1 = 1 -WCDMA_BAND_2 = 2 - # Default Cell Parameters DEFAULT_OUTPUT_LEVEL = -30 DEFAULT_1X_OUTPUT_LEVEL = -35 @@ -169,10 +154,10 @@ DEFAULT_LTE_BAND = [2, 4] Fi_LTE_TMO_BAND = [4] Fi_LTE_SPR_BAND = [25] Fi_LTE_USCC_BAND = [12] -Fi_GSM_TMO_BAND = GSM_BAND_PGSM900 +Fi_GSM_TMO_BAND = band_constants.GSM_BAND_PGSM900 DEFAULT_WCDMA_BAND = 1 DEFAULT_WCDMA_PACKET_RATE = BtsPacketRate.WCDMA_DLHSAUTO_REL7_ULHSAUTO -DEFAULT_GSM_BAND = GSM_BAND_GSM850 +DEFAULT_GSM_BAND = band_constants.GSM_BAND_GSM850 #Google Fi CDMA Bands |