mirror of
https://github.com/Telecominfraproject/wlan-lanforge-scripts.git
synced 2025-11-02 11:48:03 +00:00
Check CSV file exist for multi-ass-dosasso
Signed-off-by: karthikaeyetea <karthika.subramani@candelatech.com>
This commit is contained in:
@@ -1331,7 +1331,8 @@ class lf_tests(lf_libs):
|
|||||||
f" Enable {traffic_direction} {traffic_rate} Mbps UDP flow from DUT to each of the 8 traffic stations" \
|
f" Enable {traffic_direction} {traffic_rate} Mbps UDP flow from DUT to each of the 8 traffic stations" \
|
||||||
"Disassociate the other 8 stations. Wait for 30 seconds, after that Re-associate the 8 stations.")
|
"Disassociate the other 8 stations. Wait for 30 seconds, after that Re-associate the 8 stations.")
|
||||||
|
|
||||||
self.add_vlan(vlan_ids=vlan)
|
if mode == "VLAN":
|
||||||
|
self.add_vlan(vlan_ids=vlan)
|
||||||
for i in radio:
|
for i in radio:
|
||||||
station_data = ["profile_link " + i.split(".")[0] + "." + i.split(".")[1] +
|
station_data = ["profile_link " + i.split(".")[0] + "." + i.split(".")[1] +
|
||||||
" STA-AUTO " + str(num_stations(rem)) + " 'DUT: " + identifier + " Radio-" +
|
" STA-AUTO " + str(num_stations(rem)) + " 'DUT: " + identifier + " Radio-" +
|
||||||
@@ -1363,8 +1364,11 @@ class lf_tests(lf_libs):
|
|||||||
sort="interleave", )
|
sort="interleave", )
|
||||||
|
|
||||||
report_name = wct_obj[0].report_name[0]['LAST']["response"].split(":::")[1].split("/")[-1] + "/"
|
report_name = wct_obj[0].report_name[0]['LAST']["response"].split(":::")[1].split("/")[-1] + "/"
|
||||||
# self.attach_report_graphs(report_name=report_name)
|
file_name = "/csv-data/data-Combined_bps__60_second_running_average-1.csv"
|
||||||
csv_val = self.read_csv_individual_station_throughput(dir_name=report_name, option=traffic_direction)
|
if not os.path.exists(f"../reports/{report_name}{file_name}"):
|
||||||
|
file_name = file_name.replace('_bps__','_Mbps__')
|
||||||
|
csv_val = self.read_csv_individual_station_throughput(dir_name=report_name, option=traffic_direction,
|
||||||
|
file_name=file_name)
|
||||||
logging.info(csv_val)
|
logging.info(csv_val)
|
||||||
pass_value = int(traffic_rate[0]) * 0.99
|
pass_value = int(traffic_rate[0]) * 0.99
|
||||||
logging.info(csv_val)
|
logging.info(csv_val)
|
||||||
@@ -1375,13 +1379,10 @@ class lf_tests(lf_libs):
|
|||||||
return False, "csv file does not exist"
|
return False, "csv file does not exist"
|
||||||
else:
|
else:
|
||||||
pass_fail = [1 if i >= pass_value else 0 for i in csv_val.values()]
|
pass_fail = [1 if i >= pass_value else 0 for i in csv_val.values()]
|
||||||
try:
|
allure.attach.file(source="../reports/" + report_name + file_name, name="Throughput CSV file",
|
||||||
allure.attach.file(source="../reports/" + report_name + "/csv-data/data-Combined_bps__60_second_running_average-1.csv",
|
attachment_type=allure.attachment_type.CSV)
|
||||||
name="Throughput CSV file", attachment_type=allure.attachment_type.CSV)
|
self.allure_report_table_format(dict_data=csv_val, key="Stations", value="Throughput values",
|
||||||
except FileNotFoundError as e:
|
name="Test_results")
|
||||||
allure.attach.file(
|
|
||||||
source="../reports/" + report_name + "/csv-data/data-Combined_Mbps__60_second_running_average-1.csv",
|
|
||||||
name="Throughput CSV file", attachment_type=allure.attachment_type.CSV)
|
|
||||||
if pass_fail.count(0) == 0:
|
if pass_fail.count(0) == 0:
|
||||||
return True, "Test passed"
|
return True, "Test passed"
|
||||||
else:
|
else:
|
||||||
|
|||||||
Reference in New Issue
Block a user