Turn calibration on/off from config file
am: 2fc5158a36
Change-Id: I5550d1fa07feac7272ebf47dfd1632418de14338
diff --git a/acts/framework/acts/test_utils/power/tel_simulations/BaseSimulation.py b/acts/framework/acts/test_utils/power/tel_simulations/BaseSimulation.py
index 0e97cdf..cff5895 100644
--- a/acts/framework/acts/test_utils/power/tel_simulations/BaseSimulation.py
+++ b/acts/framework/acts/test_utils/power/tel_simulations/BaseSimulation.py
@@ -48,6 +48,9 @@
UPLINK_MIN_POWER = -60.0
+ # Key to read the calibration setting from the test_config dictionary.
+ KEY_CALIBRATION = "calibration"
+
# Time in seconds to wait for the phone to settle
# after attaching to the base station.
SETTLING_TIME = 10
@@ -79,6 +82,17 @@
self.dut = dut
self.calibration_table = calibration_table
+ # Turn calibration on or off depending on the test config value. If the
+ # key is not present, set to False by default
+ if self.KEY_CALIBRATION not in test_config:
+ self.log.warning("The '{} 'key is not set in the testbed "
+ "parameters. Setting to off by default. To "
+ "turn calibration on, include the key with "
+ "a true/false value.".format(self.KEY_CALIBRATION))
+
+ self.calibration_required = test_config.get(self.KEY_CALIBRATION, False)
+
+
# Gets BTS1 since this sim only has 1 BTS
self.bts1 = self.anritsu.get_BTS(BtsNumber.BTS1)
@@ -540,7 +554,8 @@
# self.dl_path_loss and self.ul_path_loss will be none if the band has
# just changed or calibration for this band failed in previous tests.
- if not self.dl_path_loss or not self.ul_path_loss:
+ if (self.calibration_required and
+ (not self.dl_path_loss or not self.ul_path_loss)):
# Try loading the path loss values from the calibration table. If
# they are not available, use the automated calibration procedure.
try: