mirror of
https://github.com/Telecominfraproject/wlan-lanforge-scripts.git
synced 2025-11-01 11:18:03 +00:00
lf_check.py : added iterations to the individual tests
Signed-off-by: Chuck SmileyRekiere <chuck.smileyrekiere@candelatech.com>
This commit is contained in:
@@ -146,6 +146,7 @@ class lf_check():
|
||||
self.logger = logging.getLogger(__name__)
|
||||
self.test_timeout = 120
|
||||
self.test_timeout_default = 120
|
||||
self.test_iterations_default = 1
|
||||
self.use_blank_db = "FALSE"
|
||||
self.use_factory_default_db = "FALSE"
|
||||
self.use_custom_db = "FALSE"
|
||||
@@ -471,7 +472,7 @@ NOTE: Diagrams are links in dashboard""".format(ip_qa=ip,qa_url=qa_url)
|
||||
else:
|
||||
self.logger.info("NOTE: test_blog not found in json")
|
||||
|
||||
|
||||
#TODO change code so if parameter is not present then implied to be false
|
||||
def read_test_parameters(self):
|
||||
if "test_timeout" in self.json_rig["test_parameters"]:
|
||||
self.test_timeout = self.json_rig["test_parameters"]["test_timeout"]
|
||||
@@ -771,6 +772,16 @@ NOTE: Diagrams are links in dashboard""".format(ip_qa=ip,qa_url=qa_url)
|
||||
# load the default database
|
||||
elif self.test_dict[test]['enabled'] == "TRUE":
|
||||
#TODO Place test interations here
|
||||
if 'iterations' in self.test_dict[test]:
|
||||
self.logger.info("iterations : {}".format(self.test_dict[test]['iterations']))
|
||||
self.test_iterations = int(self.test_dict[test]['iterations'])
|
||||
else:
|
||||
self.test_iterations = self.test_iterations_default
|
||||
|
||||
iteration = 0
|
||||
for iteration in range(self.test_iterations):
|
||||
iteration += 1
|
||||
|
||||
# if args key has a value of an empty string then need to manipulate the args_list to args
|
||||
# list does not have replace only stings do to args_list will be joined and converted to a string and placed
|
||||
# in args. Then the replace below will work.
|
||||
@@ -872,9 +883,9 @@ NOTE: Diagrams are links in dashboard""".format(ip_qa=ip,qa_url=qa_url)
|
||||
if 'DUT_SET_NAME' in self.test_dict[test]['args']:
|
||||
self.test_dict[test]['args'] = self.test_dict[test]['args'].replace('DUT_SET_NAME',
|
||||
self.dut_set_name)
|
||||
|
||||
if 'TEST_RIG' in self.test_dict[test]['args']:
|
||||
self.test_dict[test]['args'] = self.test_dict[test]['args'].replace('TEST_RIG', self.test_rig)
|
||||
# end of database configuration
|
||||
|
||||
# dashboard configuration
|
||||
if 'DASHBOARD_HOST' in self.test_dict[test]['args']:
|
||||
@@ -883,6 +894,7 @@ NOTE: Diagrams are links in dashboard""".format(ip_qa=ip,qa_url=qa_url)
|
||||
if 'DASHBOARD_TOKEN' in self.test_dict[test]['args']:
|
||||
self.test_dict[test]['args'] = self.test_dict[test]['args'].replace('DASHBOARD_TOKEN',
|
||||
self.dashboard_token)
|
||||
# end of dashboard configuraiton
|
||||
|
||||
# blog configuration
|
||||
if 'BLOG_HOST' in self.test_dict[test]['args']:
|
||||
@@ -903,6 +915,7 @@ NOTE: Diagrams are links in dashboard""".format(ip_qa=ip,qa_url=qa_url)
|
||||
self.blog_password_push)
|
||||
if 'BLOG_FLAG' in self.test_dict[test]['args']:
|
||||
self.test_dict[test]['args'] = self.test_dict[test]['args'].replace('BLOG_FLAG', self.blog_flag)
|
||||
# end of blog configruation
|
||||
|
||||
if 'timeout' in self.test_dict[test]:
|
||||
self.logger.info("timeout : {}".format(self.test_dict[test]['timeout']))
|
||||
|
||||
Reference in New Issue
Block a user