mirror of
https://github.com/Telecominfraproject/wlan-lanforge-scripts.git
synced 2025-11-02 11:48:03 +00:00
test_x script, edits to tests/help
This commit is contained in:
@@ -18,12 +18,13 @@ import pprint
|
||||
|
||||
|
||||
class IPv4Test(LFCliBase):
|
||||
def __init__(self, host, port, ssid, security, password, sta_list=None, number_template="00000", _debug_on=False,
|
||||
def __init__(self, host, port, ssid, security, password, sta_list=None, number_template="00000", radio = "wiphy0",_debug_on=False,
|
||||
_exit_on_error=False,
|
||||
_exit_on_fail=False):
|
||||
super().__init__(host, port, _debug=_debug_on, _halt_on_error=_exit_on_error, _exit_on_fail=_exit_on_fail)
|
||||
self.host = host
|
||||
self.port = port
|
||||
self.radio = radio
|
||||
self.ssid = ssid
|
||||
self.security = security
|
||||
self.password = password
|
||||
@@ -49,7 +50,7 @@ class IPv4Test(LFCliBase):
|
||||
self.station_profile.set_command_flag("add_sta", "create_admin_down", 1)
|
||||
self.station_profile.set_command_param("set_port", "report_timer", 1500)
|
||||
self.station_profile.set_command_flag("set_port", "rpt_timer", 1)
|
||||
self.station_profile.create(radio="wiphy0", sta_names_=self.sta_list, debug=self.debug)
|
||||
self.station_profile.create(radio=self.radio, sta_names_=self.sta_list, debug=self.debug)
|
||||
self._pass("PASS: Station build finished")
|
||||
|
||||
def cleanup(self, sta_list):
|
||||
@@ -70,17 +71,17 @@ def main():
|
||||
''',
|
||||
|
||||
description='''\
|
||||
example_wpa_connection.py
|
||||
example_wep_connection.py
|
||||
--------------------
|
||||
|
||||
Generic command example:
|
||||
python3 ./example_wpa_connection.py \\
|
||||
python3 ./example_wep_connection.py \\
|
||||
--host localhost (optional) \\
|
||||
--port 8080 (optional) \\
|
||||
--num_stations 3 \\
|
||||
--security {open|wep|wpa|wpa2|wpa3} \\
|
||||
--ssid netgear-wep \\
|
||||
--passwd admin123-wep \\
|
||||
--ssid jedway-wep-48 \\
|
||||
--passwd jedway-wep-48 \\
|
||||
--debug
|
||||
|
||||
Note: multiple --radio switches may be entered up to the number of radios available:
|
||||
@@ -99,7 +100,7 @@ def main():
|
||||
end_id_=num_sta-1,
|
||||
padding_number_=10000)
|
||||
ip_test = IPv4Test(lfjson_host, lfjson_port, ssid=args.ssid, password=args.passwd,
|
||||
security=args.security, sta_list=station_list)
|
||||
security=args.security, radio=args.radio, sta_list=station_list)
|
||||
ip_test.cleanup(station_list)
|
||||
ip_test.timeout = 60
|
||||
ip_test.build()
|
||||
|
||||
@@ -75,7 +75,7 @@ def main():
|
||||
--------------------
|
||||
|
||||
Generic command example:
|
||||
python3 ./example_wpa_connection.py \\
|
||||
python3 ./example_wpa2_connection.py \\
|
||||
--host localhost (optional) \\
|
||||
--port 8080 (optional) \\
|
||||
--num_stations 3 \\
|
||||
|
||||
@@ -22,13 +22,13 @@ parser = LFCliBase.create_bare_argparse(
|
||||
description='''scenario.py
|
||||
--------------------
|
||||
Generic command example:
|
||||
python3 scenario.py --load db1 --action overwrite --clean_dut --clean_chambers
|
||||
scenario.py --load db1 --action overwrite --clean_dut --clean_chambers
|
||||
|
||||
python3 scenario.py --start test_group1
|
||||
scenario.py --start test_group1
|
||||
|
||||
python3 scenario.py --quiesce test_group1
|
||||
scenario.py --quiesce test_group1
|
||||
|
||||
python3 scenario.py --stop test_group1
|
||||
scenario.py --stop test_group1
|
||||
''')
|
||||
|
||||
group = parser.add_mutually_exclusive_group()
|
||||
|
||||
79
py-scripts/test_all_scripts.sh
Executable file
79
py-scripts/test_all_scripts.sh
Executable file
@@ -0,0 +1,79 @@
|
||||
#!/bin/bash
|
||||
#Security connection examples#########################################
|
||||
echo "Beginning example_wpa_connection.py test..."
|
||||
chmod +x example_wpa2_connection.py
|
||||
./example_wpa2_connection.py --num_stations 3 --ssid jedway-r8000-36 --passwd jedway-r8000-36 --radio wiphy0
|
||||
chmod +x scenario.py
|
||||
./scenario.py --load BLANK
|
||||
chmod +x example_wep_connection.py
|
||||
./example_wep_connection.py --ssid jedway-wep-48 --passwd jedway-wep-48 --radio wiphy1
|
||||
./scenario.py --load BLANK
|
||||
chmod +x example_wpa3_connection.py
|
||||
./example_wpa3_connection.py
|
||||
./scenario.py --load BLANK
|
||||
chmod +x example_wpa_connection.py
|
||||
./example_wpa_connection.py --radio wiphy1
|
||||
./scenario.py --load BLANK
|
||||
#test generic and test fileio######################################################
|
||||
#chmod +x test_fileio.py
|
||||
#./test_fileio.py
|
||||
chmod +x test_generic.py
|
||||
#lfping
|
||||
./test_generic.py --num_stations 3 --ssid jedway-r8000-36 --passwd jedway-r8000-36 --radio wiphy0
|
||||
#lfcurl
|
||||
./test_generic.py --num_stations 3 --ssid jedway-r8000-36 --passwd jedway-r8000-36 --radio wiphy0
|
||||
#generic
|
||||
./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
|
||||
#iperf3
|
||||
./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
|
||||
chmod +x test_ipv4_l4_ftp_upload.py
|
||||
./test_ipv4_l4_ftp_upload.py
|
||||
chmod +x test_ipv4_l4_ftp_urls_per_ten.py
|
||||
./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
|
||||
@@ -1,7 +1,6 @@
|
||||
#!/usr/bin/env python3
|
||||
|
||||
import sys
|
||||
# import re
|
||||
if sys.version_info[0] != 3:
|
||||
print("This script requires Python 3")
|
||||
exit(1)
|
||||
|
||||
@@ -123,7 +123,7 @@ def main():
|
||||
test_ipv4_connection.py
|
||||
--------------------
|
||||
Generic command example:
|
||||
python3 ./test_ipv4_connection.py --upstream_port eth1 \\
|
||||
./test_ipv4_connection.py --upstream_port eth1 \\
|
||||
--radio wiphy0 \\
|
||||
--num_stations 3 \\
|
||||
--security {open|wep|wpa|wpa2|wpa3} \\
|
||||
|
||||
Reference in New Issue
Block a user