From 195ba76a65a261e2717d18e1f8451db28709fa9e Mon Sep 17 00:00:00 2001 From: Chuck SmileyRekiere Date: Tue, 7 Sep 2021 10:25:14 -0600 Subject: [PATCH] lf_check.py : initial checkin for separating out the dut configuration ct_us_001_test.json : initial AP testing to work through subtest pass / fail Signed-off-by: Chuck SmileyRekiere --- py-scripts/tools/ct_us_001_tests.json | 55 +++++++++++++++++++++++++++ py-scripts/tools/lf_check.py | 22 +++++++++-- 2 files changed, 74 insertions(+), 3 deletions(-) diff --git a/py-scripts/tools/ct_us_001_tests.json b/py-scripts/tools/ct_us_001_tests.json index 653a0c77..0547d4b8 100644 --- a/py-scripts/tools/ct_us_001_tests.json +++ b/py-scripts/tools/ct_us_001_tests.json @@ -178,6 +178,61 @@ ] } }, + "suite_ap":{ + "CT-US-001_create_chamberview_dut_ap":{ + "enabled":"TRUE", + "load_db":"skip", + "command":"create_chamberview_dut.py", + "args":"", + "args_list":[ + " --lfmgr LF_MGR_IP --port LF_MGR_PORT --dut_name DUT_NAME", + " --ssid 'ssid_idx=0 ssid=asus11ax-5 security=WPA2 password=hello123 bssid=DUT_BSSID_5G'", + " --ssid 'ssid_idx=1 ssid=asus11ax-5 security=WPA2 password=hello123 bssid=DUT_BSSID_5G'", + " --sw_version DUT_SW --hw_version DUT_HW --serial_num DUT_SERIAL --model_num DUT_NAME" + ]}, + "CT-US-001_create_chamberview_ap":{ + "enabled":"TRUE", + "load_db":"skip", + "command":"create_chamberview.py", + "args":"", + "args_list":[ + " --lfmgr LF_MGR_IP --port LF_MGR_PORT --delete_scenario", + " --create_scenario ap-scenario ", + " --raw_line \"profile_link 1.1 STA-AC 64 'DUT: DUT_NAME Radio-1' NA wiphy1,AUTO -1 NA\" ", + " --raw_line \"profile_link 1.1 STA-AC 1 'DUT: DUT_NAME Radio-1' NA wiphy4,AUTO -1 NA\" ", + " --raw_line \"profile_link 1.1 upstream-dhcp 1 NA NA UPSTREAM_PORT,AUTO -1 NA \" " + ] + }, + "CT-US-001_lf_ap_auto_test": { + "enabled": "TRUE", + "command": "lf_ap_auto_test.py", + "timeout":"1200", + "iterations":"1", + "args": "", + "args_list":[ + " --mgr LF_MGR_IP --port LF_MGR_PORT --lf_user lanforge --lf_password lanforge", + " --instance_name ap-auto-instance --config_name test_con --upstream UPSTREAM_PORT", + " --dut5_0 'DUT_NAME lanforge DUT_BSSID_5G (1)' --dut2_0 'DUT_NAME lanforge DUT_BSSID_5G (1)'", + " --max_stations_2 32 --max_stations_5 32 --max_stations_dual 100 --radio2 1.1.wiphy1", + " --radio5 1.1.wiphy2 --set 'Basic Client Connectivity' 1", + " --set 'Multi Band Performance' 1 --set 'Stability' 0 --set 'Multi-Station Throughput vs Pkt Size' 0,", + " --set 'Throughput vs Pkt Size' 1 --set 'Capacity' 1 --set 'Band-Steering' 1 --set 'Skip 2.4 Ghz Tests' 1", + " --pull_report --local_lf_report_dir REPORT_PATH --test_tag 'ATH10K(9984)'", + " --test_rig TEST_RIG", + " --set DUT_SET_NAME" + ] + }, + "CT-US-001_QA":{ + "enabled":"TRUE", + "timeout":"600", + "load_db":"skip", + "command":"./tools/lf_qa.py", + "args":"", + "args_list":[ + " --path REPORT_PATH --store --png --database ./tools/qa_001_test_db" + ] + } + }, "suite_wc_dp":{ "CT-US-001_create_chamberview_dut_for_ATH10K":{ "enabled":"TRUE", diff --git a/py-scripts/tools/lf_check.py b/py-scripts/tools/lf_check.py index 10fc5f6e..87d80287 100755 --- a/py-scripts/tools/lf_check.py +++ b/py-scripts/tools/lf_check.py @@ -98,6 +98,7 @@ FORMAT = '%(asctime)s %(name)s %(levelname)s: %(message)s' class lf_check(): def __init__(self, _json_rig, + _json_dut, _json_test, _test_suite, _json_igg, @@ -108,6 +109,7 @@ class lf_check(): _report_path, _log_path): self.json_rig = _json_rig + self.json_dut = _json_dut self.json_test = _json_test self.test_suite = _test_suite self.json_igg = _json_igg @@ -447,9 +449,13 @@ http://{blog}:2368""".format(blog=self.blog_host)
""" - # there is probably a more efficient way to do this in python - # Keeping it obvious for now, may be refactored later - # Top level for reading the test rig configuration + # Read the json configuration + # Read the test rig configuration, which is the LANforge system configuration + # Read the dut configuration, which is the specific configuration for the AP / VAP or other device under test + # Read the test configuration, replace the wide card parameters + # Read igg configuration is for Influx, Grafana and Ghost + + # Reading the test rig configuration def read_json_rig(self): # self.logger.info("read_config_json_contents {}".format(self.json_rig)) if "test_parameters" in self.json_rig: @@ -1231,6 +1237,7 @@ Example : parser.add_argument('--dir', help="--dir ", default="lf_check") parser.add_argument('--path', help="--path ", default="/home/lanforge/html-results") parser.add_argument('--json_rig', help="--json_rig ", default="") + parser.add_argument('--json_dut', help="--json_dut ", default="") parser.add_argument('--json_test', help="--json_test ", default="") parser.add_argument('--json_igg', help="--json_igg ", default="") parser.add_argument('--suite', help="--suite default TEST_DICTIONARY", default="TEST_DICTIONARY") @@ -1252,6 +1259,14 @@ Example : except: print("Error reading {}".format(args.json_rig)) + json_dut = "" + try: + print("args.json_dut {dut}".format(dut=args.json_dut)) + with open(args.json_dut, 'r') as json_dut_config: + json_dut = json.load(json_dut_config) + except: + print("Error reading {}".format(args.json_dut)) + json_test = "" try: print("args.json_test {}".format(args.json_test)) @@ -1304,6 +1319,7 @@ Example : # lf_check() class created check = lf_check(_json_rig=json_rig, + _json_dut=json_dut, _json_test=json_test, _test_suite=test_suite, _json_igg=json_igg,