diff --git a/libs/lanforge/lf_tests.py b/libs/lanforge/lf_tests.py index d962d98bb..ea3a4b600 100644 --- a/libs/lanforge/lf_tests.py +++ b/libs/lanforge/lf_tests.py @@ -1270,12 +1270,13 @@ class RunTest: sets=sets, test_rig=dut_name ) + self.cvtest_obj.result = True self.cvtest_obj.setup() t1 = threading.Thread(target=self.cvtest_obj.run) t1.start() + t2 = threading.Thread(target=self.pcap_obj.sniff_packets, args=(sniff_radio, "mu-mimo", channel, 30)) if t1.is_alive(): - time.sleep(150) - t2 = threading.Thread(target=self.pcap_obj.sniff_packets, args=(sniff_radio, "mu-mimo", channel, 45)) + time.sleep(480) t2.start() while t1.is_alive(): time.sleep(1) @@ -1289,12 +1290,37 @@ class RunTest: else: raise ValueError("pcap_name should not be None") + table_heads = ["Packet Type", "Capability Check", 'PASS/FAIL'] + table_data = [] + # check for mu-mimo bearmformee association request assoc_req = self.pcap_obj.check_beamformee_association_request(pcap_file=self.pcap_obj.pcap_name) allure.attach(body=assoc_req, name="Check Bearmformee Association Request") + if assoc_req == "MU Beamformee Capable: Supported": + table_data.append(['Association Request', assoc_req, 'PASS']) + else: + table_data.append(['Association Request', assoc_req, 'FAIL']) + self.cvtest_obj.result = 'FAIL' + + #check for mu-mimo bearmformer association response + assoc_res = self.pcap_obj.check_beamformer_association_response(pcap_file=self.pcap_obj.pcap_name) + allure.attach(body=assoc_res, name="Check Bearmformer Association Response") + if assoc_res == "MU Beamformer Capable: Supported": + table_data.append(['Association Response', assoc_res, 'PASS']) + else: + table_data.append(['Association Response', assoc_res, 'FAIL']) + self.cvtest_obj.result = 'FAIL' + + print(table_data) + # attach test data in a table to allure + report_obj = Report() + table_info = report_obj.table2(table=table_data, headers=table_heads) + allure.attach(name="Test Results Info", body=table_info) + allure.attach.file(source=self.pcap_obj.pcap_name, name="pcap_file", attachment_type=allure.attachment_type.PCAP) + report_name = self.cvtest_obj.report_name[0]['LAST']["response"].split(":::")[1].split("/")[-1] influx = CSVtoInflux(influx_host=self.influx_params["influx_host"], influx_port=self.influx_params["influx_port"],