lf_check.py : updated iterations to be a member of the lf_check.py class

Signed-off-by: Chuck SmileyRekiere <chuck.smileyrekiere@candelatech.com>
This commit is contained in:
Chuck SmileyRekiere
2022-03-04 10:24:39 -07:00
committed by shivam
parent a9dc04a0d6
commit b5c7f3413f

View File

@@ -218,7 +218,6 @@ class lf_check():
self.bandwidth_list = [] self.bandwidth_list = []
self.tx_power_list = [] self.tx_power_list = []
# section DUT # section DUT
# dut selection # dut selection
# note the name will be set as --set DUT_NAME ASUSRT-AX88U, this is not # note the name will be set as --set DUT_NAME ASUSRT-AX88U, this is not
@@ -240,6 +239,7 @@ class lf_check():
self.test_timeout = 120 self.test_timeout = 120
self.test_timeout_default = 120 self.test_timeout_default = 120
self.test_iterations_default = 1 self.test_iterations_default = 1
self.iteration = 0
self.use_blank_db = "FALSE" self.use_blank_db = "FALSE"
self.use_factory_default_db = "FALSE" self.use_factory_default_db = "FALSE"
self.use_custom_db = "FALSE" self.use_custom_db = "FALSE"
@@ -961,7 +961,7 @@ QA Report Dashboard: lf_qa.py was not run as last script of test suite"""
for line in stdout_log_fd: for line in stdout_log_fd:
if "Report Location" in line: if "Report Location" in line:
self.report_index += 1 self.report_index += 1
if iteration == self.report_index: if self.iteration == self.report_index:
meta_data_path = line.replace('"', '') meta_data_path = line.replace('"', '')
meta_data_path = meta_data_path.replace( meta_data_path = meta_data_path.replace(
'Report Location:::', '') 'Report Location:::', '')
@@ -1171,7 +1171,6 @@ QA Report Dashboard: lf_qa.py was not run as last script of test suite"""
# self.logger.info("row: {}".format(row)) # self.logger.info("row: {}".format(row))
self.logger.info("test: {} executed".format(self.test)) self.logger.info("test: {} executed".format(self.test))
def run_script_test(self): def run_script_test(self):
self.start_html_results() self.start_html_results()
self.start_csv_results() self.start_csv_results()
@@ -1198,12 +1197,12 @@ QA Report Dashboard: lf_qa.py was not run as last script of test suite"""
else: else:
self.test_iterations = self.test_iterations_default self.test_iterations = self.test_iterations_default
iteration = 0
# log may contain multiple runs - this helps put the meta.txt # log may contain multiple runs - this helps put the meta.txt
# in right directory # in right directory
self.iteration = 0
self.report_index = 0 self.report_index = 0
for iteration in range(self.test_iterations): for self.iteration in range(self.test_iterations):
iteration += 1 self.iteration += 1
self.run_script() self.run_script()