additions to test_all_x.bash, help additions

This commit is contained in:
Dipti
2020-11-23 08:55:40 -08:00
parent a89752e664
commit 59b1377d43
3 changed files with 58 additions and 87 deletions

View File

@@ -1,79 +1,54 @@
#!/bin/bash #!/bin/bash
#Security connection examples######################################### declare -i NUM_STA="5"
echo "Beginning example_wpa_connection.py test..." SSID_USED="jedway-open-1"
chmod +x example_wpa2_connection.py PASSWD_USED=None
./example_wpa2_connection.py --num_stations 3 --ssid jedway-r8000-36 --passwd jedway-r8000-36 --radio wiphy0 RADIO_USED="wiphy0"
chmod +x scenario.py DEF_SECURITY=""
#declare -i CURR_TEST_NUM=0
CURR_TEST_NAME=""
declare -a testCommands=("./example_wpa_connection.py --num_stations NUM_STA --ssid jedway-r8000-36 --passwd jedway-r8000-36 --radio RADIO_USED --security wpa"
"./example_wpa_connection.py --num_stations NUM_STA --ssid jedway-r8000-36 --passwd jedway-r8000-36 --radio RADIO_USED --security wpa"
"./example_wpa2_connection.py --num_stations NUM_STA --ssid jedway-r8000-36 --passwd jedway-r8000-36 --radio RADIO_USED --security wpa2"
"./example_wep_connection.py --num_stations NUM_STA --ssid jedway-wep-48 --passwd jedway-wep-48 --radio RADIO_USED --security wep"
"./example_wpa3_connection.py --num_stations NUM_STA --ssid jedway-wpa3-1 jedway-wpa3-1 --radio RADIO_USED --security wpa3")
function blank_db() {
echo "Loading blank scenario..."
./scenario.py --load BLANK ./scenario.py --load BLANK
chmod +x example_wep_connection.py #check_blank.py
./example_wep_connection.py --ssid jedway-wep-48 --passwd jedway-wep-48 --radio wiphy1 }
./scenario.py --load BLANK function stop_script() {
chmod +x example_wpa3_connection.py echo "Stopping bash script here."
./example_wpa3_connection.py exit 1
./scenario.py --load BLANK }
chmod +x example_wpa_connection.py function start_script{
./example_wpa_connection.py --radio wiphy1 echo "Starting bash script at test...insert test name here"
./scenario.py --load BLANK
#test generic and test fileio###################################################### }
#chmod +x test_fileio.py function echoPrint{
#./test_fileio.py echo "Beginning $CURR_TEST ..."
chmod +x test_generic.py }
#lfping function runTest{
./test_generic.py --num_stations 3 --ssid jedway-r8000-36 --passwd jedway-r8000-36 --radio wiphy0 #get first test
#lfcurl for i in "${testCommands[@]}"
./test_generic.py --num_stations 3 --ssid jedway-r8000-36 --passwd jedway-r8000-36 --radio wiphy0 do
#generic $CURR_TEST= "${i%%.py*}"
./test_generic.py --num_stations 3 --ssid jedway-r8000-36 --passwd jedway-r8000-36 --radio wiphy0 echoPrint()
#speedtest eval "$i"
./test_generic.py --num_stations 3 --ssid jedway-r8000-36 --passwd jedway-r8000-36 --radio wiphy0 sleep 15
#iperf3 if ! [[ "$CURR_TEST_NAME" =~ ^(example_wpa_connection|example_wpa2_connection|example_wpa3_connection|example_wep_connection)$ ]]; then blank_db() ; fi
./test_generic.py --num_stations 3 --ssid jedway-r8000-36 --passwd jedway-r8000-36 --radio wiphy0
#Ipv4 connection tests########################################## }
chmod +x test_ipv4_connection.py
./test_ipv4_connection.py #TODO
chmod +x test_ipv4_l4_ftp_upload.py #check_blank.py
./test_ipv4_l4_ftp_upload.py #edit scenario.py
chmod +x test_ipv4_l4_ftp_urls_per_ten.py #add stop and start
./test_ipv4_l4_ftp_urls_per_ten.py
chmod +x test_ipv4_l4_ftp_wifi.py
./test_ipv4_l4_ftp_wifi.py
chmod +x test_ipv4_l4_urls_per_ten.py
./test_ipv4_l4_urls_per_ten.py
chmod +x test_ipv4_l4_wifi.py
./test_ipv4_l4_wifi.py
chmod +x test_ipv4_l4
./test_ipv4_l4.py
chmod +x test_ipv4_ps.py
./test_ipv4_l4_ps.py
chmod +x test_ipv4_ttls.py
./test_ipv4_l4_ttls.py
chmod +x test_ipv4_variable_time.py
./test_ipv4_variable_time.py
#Layer 3 tests################################################
chmod +x test_l3_longevity.py
./test_l3_longevity.py
chmod +x test_l3_powersave_traffic
./test_l3_powersave_traffic.py
chmod +x test_l3_scenario_traffic.py
./test_l3_scenario_traffic.py
chmod +x test_l3_unicast_traffic_gen.py
./test_l3_unicast_traffic_gen.py
chmod +x test_l3_WAN_LAN.py
./test_l3_WAN_LAN.py
#WANlink######################################################
chmod +x test_wanlink.py
./test_wanlink.py
#IPv6 connection tests########################################
chmod +x test_ipv6_connection.py
./test_ipv6_variable_connection.py
chmod +x test_ipv6_variable_time.py
./test_ipv6_variable_time.py
#STA Connect examples#########################################
chmod +x sta_connect_example.py
./sta_connect_example.py
chmod +x sta_connect_multi_example.py
./sta_connect_multi_example.py
chmod +x sta_connect.py
./sta_connect.py
chmod +x sta_connect2.py
./sta_connect2.py

View File

@@ -126,12 +126,9 @@ Generic command example:
./test_ipv4_connection.py --upstream_port eth1 \\ ./test_ipv4_connection.py --upstream_port eth1 \\
--radio wiphy0 \\ --radio wiphy0 \\
--num_stations 3 \\ --num_stations 3 \\
--security {open|wep|wpa|wpa2|wpa3} \\ --security open {open|wep|wpa|wpa2|wpa3} \\
--ssid netgear \\ --ssid netgear \\
--passwd admin123 \\ --passwd BLANK \\
--dest 10.40.0.1 \\
--test_duration 2m \\
--interval 1s \\
--debug --debug
''') ''')
@@ -164,7 +161,8 @@ Generic command example:
ip_test.cleanup(station_list) ip_test.cleanup(station_list)
if ip_test.passes(): if ip_test.passes():
print("Full test passed, all stations associated and got IP") print("Full test passed, all stations associated and got IP")
ws_event.add_event(name="test_ipv4_connection.py", message="Full test passed, all stations associated and got IP") #ws_event.add_event(name="test_ipv4_connection.py", message="Full test passed, all stations associated and got IP")
#exit(1)
if __name__ == "__main__": if __name__ == "__main__":
main() main()

View File

@@ -165,15 +165,13 @@ def main():
test_ipv4_l4_ftp_upload.py test_ipv4_l4_ftp_upload.py
-------------------- --------------------
Generic command example: Generic command example:
python3 ./test_ipv4_l4_ftp_wifi.py --upstream_port eth1 \\ ./test_ipv4_l4_ftp_upload.py --upstream_port eth1 \\
--radio wiphy0 \\ --radio wiphy0 \\
--num_stations 3 \\ --num_stations 3 \\
--security {open|wep|wpa|wpa2|wpa3} \\ --security {open|wep|wpa|wpa2|wpa3} \\
--ssid netgear \\ --ssid netgear \\
--passwd admin123 \\ --passwd admin123 \\
--dest 10.40.0.1 \\
--test_duration 2m \\ --test_duration 2m \\
--interval 1s \\
--url "ul ftp://10.40.0.1 /dev/null" \\ --url "ul ftp://10.40.0.1 /dev/null" \\
--requests_per_ten 600 \\ --requests_per_ten 600 \\
--debug --debug