summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTreehugger Robot <treehugger-gerrit@google.com>2018-11-29 04:17:17 +0000
committerGerrit Code Review <noreply-gerritcodereview@google.com>2018-11-29 04:17:17 +0000
commit1ad57962eea602ec05e6d2e76598492237b15436 (patch)
tree77e4e46f8ec010f220c26b23572fe24e50c6e684
parent4eec0dd5021eb87bd6b6b265ffc6ad9ed975b056 (diff)
parente38fbf2cadcd162c630add5e2cce54808c1fa7b1 (diff)
downloadplatform_tools_test_connectivity-nougat-iot-release.tar.gz
platform_tools_test_connectivity-nougat-iot-release.tar.bz2
platform_tools_test_connectivity-nougat-iot-release.zip
Merge "Set scheduling to static by default"android-n-iot-release-ihome-igv1nougat-iot-release
-rw-r--r--acts/framework/acts/test_utils/power/tel_simulations/LteSimulation.py33
1 files changed, 20 insertions, 13 deletions
diff --git a/acts/framework/acts/test_utils/power/tel_simulations/LteSimulation.py b/acts/framework/acts/test_utils/power/tel_simulations/LteSimulation.py
index 4ac490c625..4d55bd51b8 100644
--- a/acts/framework/acts/test_utils/power/tel_simulations/LteSimulation.py
+++ b/acts/framework/acts/test_utils/power/tel_simulations/LteSimulation.py
@@ -322,14 +322,19 @@ class LteSimulation(BaseSimulation):
values = self.consume_parameter(parameters, self.PARAM_SCHEDULING, 1)
- if values and values[1] == self.PARAM_SCHEDULING_DYNAMIC:
+ if not values:
+ scheduling = LteSimulation.SchedulingMode.STATIC
+ self.log.warning(
+ "The test name does not include the '{}' parameter. Setting to "
+ "static by default.".format(self.PARAM_SCHEDULING))
+ elif values[1] == self.PARAM_SCHEDULING_DYNAMIC:
scheduling = LteSimulation.SchedulingMode.DYNAMIC
- elif values and values[1] == self.PARAM_SCHEDULING_STATIC:
+ elif values[1] == self.PARAM_SCHEDULING_STATIC:
scheduling = LteSimulation.SchedulingMode.STATIC
else:
self.log.error(
- "The test name needs to include parameter {} followed by either"
- " dynamic or static.".format(self.PARAM_SCHEDULING))
+ "The test name parameter '{}' has to be followed by either "
+ "'dynamic' or 'static'.".format(self.PARAM_SCHEDULING))
return False
if scheduling == LteSimulation.SchedulingMode.STATIC:
@@ -337,15 +342,17 @@ class LteSimulation(BaseSimulation):
values = self.consume_parameter(parameters, self.PARAM_PATTERN, 2)
if not values:
- self.log.error(
- "When scheduling mode is set to static the parameter {} "
- "has to be included followed by two ints separated by an "
- "underscore indicating downlink and uplink percentages of"
- " total rbs.".format(self.PARAM_PATTERN))
- return False
-
- dl_pattern = int(values[1])
- ul_pattern = int(values[2])
+ self.log.warning(
+ "The '{}' parameter was not set, using 100% RBs for both "
+ "DL and UL. To set the percentages of total RBs include "
+ "the '{}' parameter followed by two ints separated by an "
+ "underscore indicating downlink and uplink percentages."
+ .format(self.PARAM_PATTERN, self.PARAM_PATTERN))
+ dl_pattern = 100
+ ul_pattern = 100
+ else:
+ dl_pattern = int(values[1])
+ ul_pattern = int(values[2])
if not (0 <= dl_pattern <= 100 and 0 <= ul_pattern <= 100):
self.log.error(