diff options
author | Ignacio Guarna <iguarna@google.com> | 2018-10-03 17:00:57 -0700 |
---|---|---|
committer | Ignacio Guarna <iguarna@google.com> | 2018-10-03 17:00:57 -0700 |
commit | f12417f14e0a399824b7a5482583b2736d00a7a4 (patch) | |
tree | 647248856f33d7492ec363942940c0aad3338e6f | |
parent | c4a3f8b2fe13aebb72f8f18853a59edbd4afe583 (diff) | |
download | platform_tools_test_connectivity-f12417f14e0a399824b7a5482583b2736d00a7a4.tar.gz platform_tools_test_connectivity-f12417f14e0a399824b7a5482583b2736d00a7a4.tar.bz2 platform_tools_test_connectivity-f12417f14e0a399824b7a5482583b2736d00a7a4.zip |
Restart SIM after loading config files in UMTS
This CL fixes a bug introduced with aosp/770344 in which the simulation
would be stopped when changing config file and then wouldn't be
restarted.
Bug: 112923220
Test: tested in the lab.
Change-Id: I2e6e23fbb1f931466cbdd0fca268fd69cac276c7
-rw-r--r-- | acts/framework/acts/test_utils/power/tel_simulations/UmtsSimulation.py | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/acts/framework/acts/test_utils/power/tel_simulations/UmtsSimulation.py b/acts/framework/acts/test_utils/power/tel_simulations/UmtsSimulation.py index c129abb418..ae86f8f699 100644 --- a/acts/framework/acts/test_utils/power/tel_simulations/UmtsSimulation.py +++ b/acts/framework/acts/test_utils/power/tel_simulations/UmtsSimulation.py @@ -94,6 +94,8 @@ class UmtsSimulation(BaseSimulation): else: log.info("Preferred network type set.") + self.release_version = None + def parse_parameters(self, parameters): """ Configs an UMTS simulation using a list of parameters. @@ -185,7 +187,16 @@ class UmtsSimulation(BaseSimulation): def set_release_version(self, bts, release_version): + """ Sets the release version. + + Loads the cell parameter file matching the requested release version. + Does nothing is release version is already the one requested. + + """ + if release_version == self.release_version: + self.log.info("Release version is already {}.".format(release_version)) + return if release_version == self.PARAM_RELEASE_VERSION_99: cell_parameter_file = self.UMTS_R99_CELL_FILE @@ -205,4 +216,8 @@ class UmtsSimulation(BaseSimulation): raise ValueError("Invalid UMTS release version number.") self.anritsu.load_cell_paramfile(cell_parameter_file) + + # Loading a cell parameter file stops the simulation, so we need to restart it + self.start() + bts.packet_rate = packet_rate |