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=""
./scenario.py --load BLANK #declare -i CURR_TEST_NUM=0
chmod +x example_wep_connection.py CURR_TEST_NAME=""
./example_wep_connection.py --ssid jedway-wep-48 --passwd jedway-wep-48 --radio wiphy1 declare -a testCommands=("./example_wpa_connection.py --num_stations NUM_STA --ssid jedway-r8000-36 --passwd jedway-r8000-36 --radio RADIO_USED --security wpa"
./scenario.py --load BLANK "./example_wpa_connection.py --num_stations NUM_STA --ssid jedway-r8000-36 --passwd jedway-r8000-36 --radio RADIO_USED --security wpa"
chmod +x example_wpa3_connection.py "./example_wpa2_connection.py --num_stations NUM_STA --ssid jedway-r8000-36 --passwd jedway-r8000-36 --radio RADIO_USED --security wpa2"
./example_wpa3_connection.py "./example_wep_connection.py --num_stations NUM_STA --ssid jedway-wep-48 --passwd jedway-wep-48 --radio RADIO_USED --security wep"
./scenario.py --load BLANK "./example_wpa3_connection.py --num_stations NUM_STA --ssid jedway-wpa3-1 jedway-wpa3-1 --radio RADIO_USED --security wpa3")
chmod +x example_wpa_connection.py
./example_wpa_connection.py --radio wiphy1 function blank_db() {
./scenario.py --load BLANK echo "Loading blank scenario..."
#test generic and test fileio###################################################### ./scenario.py --load BLANK
#chmod +x test_fileio.py #check_blank.py
#./test_fileio.py }
chmod +x test_generic.py function stop_script() {
#lfping echo "Stopping bash script here."
./test_generic.py --num_stations 3 --ssid jedway-r8000-36 --passwd jedway-r8000-36 --radio wiphy0 exit 1
#lfcurl }
./test_generic.py --num_stations 3 --ssid jedway-r8000-36 --passwd jedway-r8000-36 --radio wiphy0 function start_script{
#generic echo "Starting bash script at test...insert test name here"
./test_generic.py --num_stations 3 --ssid jedway-r8000-36 --passwd jedway-r8000-36 --radio wiphy0
#speedtest }
./test_generic.py --num_stations 3 --ssid jedway-r8000-36 --passwd jedway-r8000-36 --radio wiphy0 function echoPrint{
#iperf3 echo "Beginning $CURR_TEST ..."
./test_generic.py --num_stations 3 --ssid jedway-r8000-36 --passwd jedway-r8000-36 --radio wiphy0 }
#Ipv4 connection tests########################################## function runTest{
chmod +x test_ipv4_connection.py #get first test
./test_ipv4_connection.py for i in "${testCommands[@]}"
chmod +x test_ipv4_l4_ftp_upload.py do
./test_ipv4_l4_ftp_upload.py $CURR_TEST= "${i%%.py*}"
chmod +x test_ipv4_l4_ftp_urls_per_ten.py echoPrint()
./test_ipv4_l4_ftp_urls_per_ten.py eval "$i"
chmod +x test_ipv4_l4_ftp_wifi.py sleep 15
./test_ipv4_l4_ftp_wifi.py if ! [[ "$CURR_TEST_NAME" =~ ^(example_wpa_connection|example_wpa2_connection|example_wpa3_connection|example_wep_connection)$ ]]; then blank_db() ; fi
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 #TODO
chmod +x test_ipv4_l4 #check_blank.py
./test_ipv4_l4.py #edit scenario.py
chmod +x test_ipv4_ps.py #add stop and start
./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