mirror of
https://github.com/Telecominfraproject/wlan-lanforge-scripts.git
synced 2025-11-02 03:37:55 +00:00
lf_check.py lf_check_config_template.ini : updates from testing
Signed-off-by: Chuck SmileyRekiere <chuck.smileyrekiere@candelatech.com>
This commit is contained in:
@@ -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
|
# 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)
|
# --num_stations needs to be int not string (no double quotes)
|
||||||
if self.radio_dict[radio]["KEY"] in self.test_dict[test]['args']:
|
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']))
|
.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']:
|
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)
|
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']:
|
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)
|
self.test_dict[test]['args'] = self.test_dict[test]['args'].replace('UPSTREAM_PORT',self.col_names)
|
||||||
|
|
||||||
if self.use_factory_default_db == "TRUE":
|
if self.use_factory_default_db == "TRUE":
|
||||||
self.load_factory_default_db()
|
self.load_factory_default_db()
|
||||||
sleep(3)
|
sleep(3)
|
||||||
self.logger.info("FACTORY_DFLT loaded between tests with scenario.py --load FACTORY_DFLT")
|
self.logger.info("FACTORY_DFLT loaded between tests with scenario.py --load FACTORY_DFLT")
|
||||||
if self.use_blank_db == "TRUE":
|
if self.use_blank_db == "TRUE":
|
||||||
self.load_blank_db()
|
self.load_blank_db()
|
||||||
sleep(3)
|
sleep(1)
|
||||||
self.logger.info("BLANK loaded between tests with scenario.py --load BLANK")
|
self.logger.info("BLANK loaded between tests with scenario.py --load BLANK")
|
||||||
if self.use_custom_db == "TRUE":
|
if self.use_custom_db == "TRUE":
|
||||||
try:
|
try:
|
||||||
self.load_custom_db(self.custom_db)
|
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))
|
self.logger.info("{} loaded between tests with scenario.py --load {}".format(self.custom_db,self.custom_db))
|
||||||
except:
|
except:
|
||||||
self.logger.info("custom database failed to load check existance and location")
|
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))
|
#self.logger.info("stderr_log_txt: {}".format(stderr_log_txt))
|
||||||
stderr_log = open(stderr_log_txt, 'a')
|
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)
|
process = subprocess.Popen((command).split(' '), shell=False, stdout=stdout_log, stderr=stderr_log, universal_newlines=True)
|
||||||
|
|
||||||
try:
|
try:
|
||||||
|
|||||||
@@ -28,17 +28,18 @@ FTP_TEST_IP = "10.40.0.1"
|
|||||||
TEST_IP = "10.40.0.1"
|
TEST_IP = "10.40.0.1"
|
||||||
|
|
||||||
[TEST_GENERIC]
|
[TEST_GENERIC]
|
||||||
RADIO_USED = "wiphy1"
|
RADIO_USED = wiphy1
|
||||||
SSID_USED = "ssid-wpa2"
|
SSID_USED = ct523c-vap
|
||||||
SSID_PW_USED = "ssidpw-wpa2"
|
SSID_PW_USED = ct523c-vap
|
||||||
SECURITY_USED = "wpa2"
|
SECURITY_USED = wpa2
|
||||||
NUM_STA = "3"
|
NUM_STA = 4
|
||||||
COL_NAMES = "name,tx_bytes,rx_bytes,dropped"
|
COL_NAMES = name,tx_bytes,rx_bytes,dropped
|
||||||
UPSTREAM_PORT = "eth1"
|
UPSTREAM_PORT = eth1
|
||||||
|
|
||||||
# NO quotes around test parameters
|
# NO quotes around test parameters
|
||||||
|
# Note: please copy lf_check_config_template.ini - values used for lf_check.py script verification
|
||||||
[TEST_PARAMETERS]
|
[TEST_PARAMETERS]
|
||||||
TEST_TIMEOUT = 120
|
TEST_TIMEOUT = 60
|
||||||
LOAD_BLANK_DB = FALSE
|
LOAD_BLANK_DB = FALSE
|
||||||
LOAD_FACTORY_DEFAULT_DB = FALSE
|
LOAD_FACTORY_DEFAULT_DB = FALSE
|
||||||
LOAD_CUSTOM_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
|
# 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
|
# USE TEST_DICTIONARY_NOT_RUN to ignore tests
|
||||||
[TEST_DICTIONARY]
|
[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: {
|
TEST_DICT: {
|
||||||
"create_l3":{"enabled":"TRUE","command":"create_l3.py","args":"RADIO_1_CFG --debug"},
|
"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"}
|
"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.
|
# 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
|
# 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: {
|
TEST_DICT: {
|
||||||
"example_security_connection0":{"enabled":"FALSE","command":"example_security_connection.py","args":"RADIO_1_CFG --debug"},
|
"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"},
|
"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_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_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_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_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_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_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_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"},
|
"create_l4":{"enabled":"FALSE","command":"create_l4.py","args":"RADIO_1_CFG --debug"},
|
||||||
|
|||||||
Reference in New Issue
Block a user