diff --git a/py-scripts/tools/lf_check.py b/py-scripts/tools/lf_check.py index a804e18a..07b039e4 100755 --- a/py-scripts/tools/lf_check.py +++ b/py-scripts/tools/lf_check.py @@ -251,7 +251,7 @@ class lf_check(): # not "KEY" is just a word to refer to the RADIO define (e.g. RADIO_0_CFG) to get the vlaues # --num_stations needs to be int not string (no double quotes) if self.radio_dict[radio]["KEY"] in self.test_dict[test]['args']: - self.test_dict[test]['args'] = self.test_dict[test]['args'].replace(self.radio_dict[radio]["KEY"],'--radio "{}" --ssid "{}" --passwd "{}" --security "{}" --num_stations {}' + self.test_dict[test]['args'] = self.test_dict[test]['args'].replace(self.radio_dict[radio]["KEY"],'--radio {} --ssid {} --passwd {} --security {} --num_stations {}' .format(self.radio_dict[radio]['RADIO'],self.radio_dict[radio]['SSID'],self.radio_dict[radio]['PASSWD'],self.radio_dict[radio]['SECURITY'],self.radio_dict[radio]['STATIONS'])) if 'HTTP_TEST_IP' in self.test_dict[test]['args']: @@ -275,19 +275,18 @@ class lf_check(): self.test_dict[test]['args'] = self.test_dict[test]['args'].replace('COL_NAMES',self.col_names) if 'UPSTREAM_PORT' in self.test_dict[test]['args']: self.test_dict[test]['args'] = self.test_dict[test]['args'].replace('UPSTREAM_PORT',self.col_names) - if self.use_factory_default_db == "TRUE": self.load_factory_default_db() sleep(3) self.logger.info("FACTORY_DFLT loaded between tests with scenario.py --load FACTORY_DFLT") if self.use_blank_db == "TRUE": self.load_blank_db() - sleep(3) + sleep(1) self.logger.info("BLANK loaded between tests with scenario.py --load BLANK") if self.use_custom_db == "TRUE": try: self.load_custom_db(self.custom_db) - sleep(3) + sleep(1) self.logger.info("{} loaded between tests with scenario.py --load {}".format(self.custom_db,self.custom_db)) except: self.logger.info("custom database failed to load check existance and location") @@ -316,6 +315,8 @@ class lf_check(): #self.logger.info("stderr_log_txt: {}".format(stderr_log_txt)) stderr_log = open(stderr_log_txt, 'a') + + print("running {}".format(command)) process = subprocess.Popen((command).split(' '), shell=False, stdout=stdout_log, stderr=stderr_log, universal_newlines=True) try: diff --git a/py-scripts/tools/lf_check_config_template.ini b/py-scripts/tools/lf_check_config_template.ini index 33ac4cee..7e6dd2ab 100755 --- a/py-scripts/tools/lf_check_config_template.ini +++ b/py-scripts/tools/lf_check_config_template.ini @@ -28,17 +28,18 @@ FTP_TEST_IP = "10.40.0.1" TEST_IP = "10.40.0.1" [TEST_GENERIC] -RADIO_USED = "wiphy1" -SSID_USED = "ssid-wpa2" -SSID_PW_USED = "ssidpw-wpa2" -SECURITY_USED = "wpa2" -NUM_STA = "3" -COL_NAMES = "name,tx_bytes,rx_bytes,dropped" -UPSTREAM_PORT = "eth1" +RADIO_USED = wiphy1 +SSID_USED = ct523c-vap +SSID_PW_USED = ct523c-vap +SECURITY_USED = wpa2 +NUM_STA = 4 +COL_NAMES = name,tx_bytes,rx_bytes,dropped +UPSTREAM_PORT = eth1 # NO quotes around test parameters +# Note: please copy lf_check_config_template.ini - values used for lf_check.py script verification [TEST_PARAMETERS] -TEST_TIMEOUT = 120 +TEST_TIMEOUT = 60 LOAD_BLANK_DB = FALSE LOAD_FACTORY_DEFAULT_DB = FALSE LOAD_CUSTOM_DB = FALSE @@ -58,14 +59,24 @@ LF_MGR_PORT=8080 # TEST_DICTIONARY used by lf_check, Other section names will be ignored so can save other test lists # USE TEST_DICTIONARY_NOT_RUN to ignore tests [TEST_DICTIONARY] +TEST_DICT: { + "test_ipv4_l4":{"enabled":"FALSE","command":"test_ipv4_l4.py","args":"--radio wiphy1 --ssid ct523c-vap --passwd ct523c-vap --security wpa2 --num_stations 4 --test_duration 15s --debug"}, + "test_ipv4_variable_time2":{"enabled":"TRUE","command":"test_ipv4_variable_time.py","args":"--radio wiphy1 --ssid ct523c-vap --passwd ct523c-vap --security wpa2 --test_duration 15s --output_format excel --layer3_cols name,tx_bytes,rx_bytes,dropped --traffic_type lf_udp --debug"} + } + +# TEST_DICTIONARY used by lf_check, Other section names will be ignored so can save other test lists +# USE TEST_DICTIONARY_NOT_RUN to ignore tests +[TEST_DICTIONARY_EXAMPLE] TEST_DICT: { "create_l3":{"enabled":"TRUE","command":"create_l3.py","args":"RADIO_1_CFG --debug"}, "create_l4":{"enabled":"TRUE","command":"create_l4.py","args":"RADIO_1_CFG --debug"} } + # This is an EXAMPLE dictionary of tests that can be run, copy to TEST_DICTIONARY to test. # Feature update pass in the DICTIONARY name to be run -[TEST_DICTIONARY_EXAMPLE] +# NOTE: please do not edit this example it is used for lf_check.py script verification +[TEST_DICTIONARY_EXAMPLE_2] TEST_DICT: { "example_security_connection0":{"enabled":"FALSE","command":"example_security_connection.py","args":"RADIO_1_CFG --debug"}, "example_security_connection1":{"enabled":"FALSE","command":"example_security_connection.py","args":"RADIO_2_CFG --debug"}, @@ -81,9 +92,10 @@ TEST_DICT: { "test_ipv4_connection":{"enabled":"FALSE","command":"test_ipv4_connection.py","args":"RADIO_1_CFG --debug"}, "test_ipv4_l4_urls_per_ten":{"enabled":"FALSE","command":"test_ipv4_l4_urls_per_ten.py","args":"RADIO_1_CFG --num_tests 1 --requests_per_ten 600 --target_per_ten 600 --debug"}, "test_ipv4_l4_wifi":{"enabled":"FALSE","command":"test_ipv4_l4_wifi.py","args":"RADIO_1_CFG --test_duration 15s --debug"}, - "test_ipv4_l4":{"enabled":"FALSE","command":"test_ipv4_l4.py","args":"RADIO_1_CFG --test_duration 15s --debug"}, + "test_ipv4_l4":{"enabled":"FALSE","command":"test_ipv4_l4.py","args":"--radio wiphy1 --ssid ct523c-vap --passwd ct523c-vap --security wpa2 --num_stations 4 --test_duration 15s --debug"}, "test_ipv4_variable_time0":{"enabled":"FALSE","command":"test_ipv4_variable_time.py","args":"RADIO_1_CFG --test_duration 15s --output_format excel --layer3_cols COL_NAMES --traffic_type lf_udp --debug"}, "test_ipv4_variable_time1":{"enabled":"FALSE","command":"test_ipv4_variable_time.py","args":"RADIO_1_CFG --test_duration 15s --output_format csv --layer3_cols COL_NAMES --traffic_type lf_udp --debug"}, + "test_ipv4_variable_time2":{"enabled":"TRUE","command":"test_ipv4_variable_time.py","args":"--radio wiphy1 --ssid ct523c-vap --passwd ct523c-vap --security wpa2 --test_duration 15s --output_format excel --layer3_cols name,tx_bytes,rx_bytes,dropped --traffic_type lf_udp --debug"}, "create_bridge":{"enabled":"FALSE","command":"create_bridge.py","args":"--radio RADIO_USED --upstream_port UPSTREAM_PORT --target_device sta0000 --debug"}, "create_l3":{"enabled":"FALSE","command":"create_l3.py","args":"RADIO_1_CFG --debug"}, "create_l4":{"enabled":"FALSE","command":"create_l4.py","args":"RADIO_1_CFG --debug"},