mirror of
https://github.com/Telecominfraproject/wlan-lanforge-scripts.git
synced 2025-11-02 11:48:03 +00:00
instruct people to use update_deps.py
This commit is contained in:
committed by
Jed Reynolds
parent
be7e94916f
commit
2550204f3e
@@ -1,7 +1,10 @@
|
||||
# LANForge Python Scripts
|
||||
# LANForge Python Scripts
|
||||
This directory contains python scripts useful for unit-tests. It uses libraries in ../py-json. Please place new tests in this directory. Unless they are libraries, please avoid adding python scripts to ../py-json. Please read https://www.candelatech.com/cookbook/cli/json-python to learn about how to use the LANforge client JSON directly. Review http://www.candelatech.com/scripting_cookbook.php to understand more about scripts in general.
|
||||
|
||||
# Getting Started
|
||||
|
||||
The first step is to make sure all dependencies are installed in your system by running update_deps.py in this folder.
|
||||
|
||||
Please consider using the `LFCliBase` class as your script superclass. It will help you with a consistent set of JSON handling methods and pass and fail methods for recording test results. Below is a sample snippet that includes LFCliBase:
|
||||
|
||||
if 'py-json' not in sys.path:
|
||||
@@ -12,11 +15,11 @@ Please consider using the `LFCliBase` class as your script superclass. It will h
|
||||
from LANforge.LFUtils import *
|
||||
import realm
|
||||
from realm import Realm
|
||||
|
||||
|
||||
class Eggzample(LFCliBase):
|
||||
def __init__(self, lfclient_host, lfclient_port):
|
||||
super().__init__(lfclient_host, lfclient_port, debug=True)
|
||||
|
||||
|
||||
def main():
|
||||
eggz = Eggzample("http://localhost", 8080)
|
||||
frontpage_json = eggz.json_get("/")
|
||||
@@ -25,7 +28,7 @@ Please consider using the `LFCliBase` class as your script superclass. It will h
|
||||
"message": "hello world"
|
||||
}
|
||||
eggz.json_post("/cli-json/gossip", data, debug_=True)
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
main()
|
||||
|
||||
@@ -47,14 +50,14 @@ The above example will stimulate output on the LANforge client websocket `ws://l
|
||||
* /stations: entities that are associated to your virtual access points (vAP)
|
||||
There are more URIs you can explore, these are the more useful ones.
|
||||
|
||||
#### Scripts included are:
|
||||
#### Scripts included are:
|
||||
|
||||
* `cicd_TipIntegration.py`: battery of TIP tests that include upgrading DUT and executing sta_connect script
|
||||
|
||||
* `cicd_testrail.py`:
|
||||
* `cicd_testrail.py`:
|
||||
* `function send_get`: Issues a GET request (read) against the API.
|
||||
* `function send_post`: Issues a write against the API.
|
||||
* `function __send_request`:
|
||||
* `function __send_request`:
|
||||
* `function get_project_id`: Gets the project ID using the project name
|
||||
* `function get_run_id`: Gets the run ID using test name and project name
|
||||
* `function update_testrail`: Update TestRail for a given run_id and case_id
|
||||
@@ -74,7 +77,7 @@ There are more URIs you can explore, these are the more useful ones.
|
||||
* `run_cv_scenario.py`:
|
||||
* class `RunCvScenario`: imports the LFCliBase class.
|
||||
* function `get_report_file_name`: returns report name
|
||||
* function `build`: loads and sends the ports available?
|
||||
* function `build`: loads and sends the ports available?
|
||||
* function `start`: /gui_cli takes commands keyed on 'cmd' and this function create an array of commands
|
||||
* `sta_connect.py`: This function creates a station, create TCP and UDP traffic, run it a short amount of time,
|
||||
and verify whether traffic was sent and received. It also verifies the station connected
|
||||
@@ -88,7 +91,7 @@ There are more URIs you can explore, these are the more useful ones.
|
||||
* function `remove_stations`: removes all stations
|
||||
* function `num_associated`:
|
||||
* function `clear_test_results`:
|
||||
* function `run`:
|
||||
* function `run`:
|
||||
* function `setup`:
|
||||
* function `start`:
|
||||
* function `stop`:
|
||||
@@ -103,61 +106,61 @@ There are more URIs you can explore, these are the more useful ones.
|
||||
* function `get_upstream_url`:
|
||||
* function `compare_vals`: compares pre-test values to post-test values
|
||||
* function `remove_stations`: removes all ports
|
||||
* function `num_associated`:
|
||||
* function `num_associated`:
|
||||
* function `clear_test_results`
|
||||
* function `setup`: verifies upstream url, creates stations and turns dhcp on, creates endpoints,
|
||||
UDP endpoints,
|
||||
* function `start`:
|
||||
* function `start`:
|
||||
* function `stop`:
|
||||
* function `cleanup`:
|
||||
* function `main`:
|
||||
* function `main`:
|
||||
|
||||
* `sta_connect_example.py`: example of how to instantiate StaConnect and run the test
|
||||
|
||||
* `sta_connect_multi_example.py`: example of how to instantiate StaConnect and run the test and create multiple OPEN stations,have
|
||||
some stations using WPA2
|
||||
* `sta_connect_multi_example.py`: example of how to instantiate StaConnect and run the test and create multiple OPEN stations,have
|
||||
some stations using WPA2
|
||||
|
||||
* `stations_connected.py`: Contains examples of using realm to query stations and get specific information from them
|
||||
|
||||
* `test_ipv4_connection.py`: This script will create a variable number of stations that will attempt to connect to a chosen SSID using a provided password and security type.
|
||||
The test is considered passed if all stations are able to associate and obtain IPV4 addresses
|
||||
* `test_ipv4_connection.py`: This script will create a variable number of stations that will attempt to connect to a chosen SSID using a provided password and security type.
|
||||
The test is considered passed if all stations are able to associate and obtain IPV4 addresses
|
||||
* class `IPv4Test`
|
||||
* function `build`: This function will use the given parameters (Number of stations, SSID, password, and security type) to create a series of stations.
|
||||
* function `start`: This function will admin-up the stations created in the build phase. It will then check all stations periodically for association and IP addresses.
|
||||
This will continue until either the specified timeout has been reached or all stations obtain an IP address.
|
||||
* function `stop`: This function will admin-down all stations once one of the ending criteria is met.
|
||||
* function `start`: This function will admin-up the stations created in the build phase. It will then check all stations periodically for association and IP addresses.
|
||||
This will continue until either the specified timeout has been reached or all stations obtain an IP address.
|
||||
* function `stop`: This function will admin-down all stations once one of the ending criteria is met.
|
||||
* function `cleanup`: This function will clean up all stations created during the test.
|
||||
* command line options :
|
||||
* `--mgr`: Specifies the hostname where LANforge is running. Defaults to http://localhost
|
||||
* `--mgr_port`: Specifies the port to use when connecting to LANforge. Defaults to 8080
|
||||
* `--ssid`: Specifies SSID to be used in the test
|
||||
* `--password`: Specifies the password for the SSID to be used in the test
|
||||
* `--password`: Specifies the password for the SSID to be used in the test
|
||||
* `--security`: Specifies security type (WEP, WPA, WPA2, WPA3, Open) of SSID to be used in the test
|
||||
* `--num_stations`: Specifies number of stations to create for the test
|
||||
* `--radio`: Specifies the radio to be used in the test. Eg wiphy0
|
||||
* `--debug`: Turns on debug output for the test
|
||||
* `--help`: Displays help output for the script
|
||||
|
||||
* `test_ipv6_connection.py`: This script will create a variable number of stations that will attempt to connect to a chosen SSID using a provided password and security type.
|
||||
The test is considered passed if all stations are able to associate and obtain IPV6 addresses
|
||||
* `test_ipv6_connection.py`: This script will create a variable number of stations that will attempt to connect to a chosen SSID using a provided password and security type.
|
||||
The test is considered passed if all stations are able to associate and obtain IPV6 addresses
|
||||
* class `IPv6Test`
|
||||
* function `build`: This function will use the given parameters (Number of stations, SSID, password, and security type) to create a series of stations.
|
||||
* function `start`: This function will admin-up the stations created in the build phase. It will then check all stations periodically for association and IP addresses.
|
||||
This will continue until either the specified timeout has been reached or all stations obtain an IP address.
|
||||
* function `stop`: This function will admin-down all stations once one of the ending criteria is met.
|
||||
* function `start`: This function will admin-up the stations created in the build phase. It will then check all stations periodically for association and IP addresses.
|
||||
This will continue until either the specified timeout has been reached or all stations obtain an IP address.
|
||||
* function `stop`: This function will admin-down all stations once one of the ending criteria is met.
|
||||
* function `cleanup`: This function will clean up all stations created during the test.
|
||||
* Command line options :
|
||||
* `--mgr`: Specifies the hostname where LANforge is running. Defaults to http://localhost
|
||||
* `--mgr_port`: Specifies the port to use when connecting to LANforge. Defaults to 8080
|
||||
* `--ssid`: Specifies SSID to be used in the test
|
||||
* `--password`: Specifies the password for the SSID to be used in the test
|
||||
* `--password`: Specifies the password for the SSID to be used in the test
|
||||
* `--security`: Specifies security type (WEP, WPA, WPA2, WPA3, Open) of SSID to be used in the test
|
||||
* `--num_stations`: Specifies number of stations to create for the test
|
||||
* `--radio`: Specifies the radio to be used in the test. Eg wiphy0
|
||||
* `--debug`: Turns on debug output for the test
|
||||
* `--help`: Displays help output for the script
|
||||
|
||||
* `test_l3_unicast_traffic_gen.py`: This script will create stations, create traffic between upstream port and stations, run traffic.
|
||||
* `test_l3_unicast_traffic_gen.py`: This script will create stations, create traffic between upstream port and stations, run traffic.
|
||||
The traffic on the stations will be checked once per minute to verify that traffic is transmitted and received.
|
||||
Test will exit on failure of not receiving traffic for one minute on any station.
|
||||
* class `L3VariableTimeLongevity`
|
||||
@@ -170,10 +173,10 @@ Test will exit on failure of not receiving traffic for one minute on any station
|
||||
* `-d, --test_duration`: Determines the total length of the test. Consists of number followed by letter indicating length
|
||||
10m would be 10 minutes or 3d would be 3 days. Available options for length are Day (d), Hour (h), Minute (m), or Second (s)
|
||||
* `-t, --endp_type`: Specifies type of endpoint to be used in the test. Options are lf_udp, lf_udp6, lf_tcp, lf_tcp6
|
||||
* `-u, --upstream_port`: This is the upstream port to be used for traffic. An upstream port is some data source on the wired LAN or WAN beyond the AP
|
||||
* `-u, --upstream_port`: This is the upstream port to be used for traffic. An upstream port is some data source on the wired LAN or WAN beyond the AP
|
||||
* `-r, --radio`: This switch will determine the radio name, number of stations, ssid, and ssid password. Security type is fixed at WPA2.
|
||||
Usage of this switch could look like: `--radio wiphy1 64 candelaTech-wpa2-x2048-5-3 candelaTech-wpa2-x2048-5-3`
|
||||
|
||||
|
||||
* `test_ipv4_l4_urls_per_ten.py`: This script measure the number of urls per ten minutes over layer 4 traffic
|
||||
* class `IPV4L4`
|
||||
* function `build`: This function will create all stations and cross-connects to be used in the test
|
||||
@@ -186,17 +189,17 @@ Test will exit on failure of not receiving traffic for one minute on any station
|
||||
* `--mgr`: Specifies the hostname where LANforge is running. Defaults to http://localhost
|
||||
* `--mgr_port`: Specifies the port to use when connecting to LANforge. Defaults to 8080
|
||||
* `--ssid`: Specifies SSID to be used in the test
|
||||
* `--password`: Specifies the password for the SSID to be used in the test
|
||||
* `--password`: Specifies the password for the SSID to be used in the test
|
||||
* `--security`: Specifies security type (WEP, WPA, WPA2, WPA3, Open) of SSID to be used in the test
|
||||
* `--num_stations`: Specifies number of stations to create for the test
|
||||
* `--radio`: Specifies the radio to be used in the test. Eg wiphy0
|
||||
* `--requests_per_ten`: Configures the number of request per ten minutes
|
||||
* `--num_tests`: Configures the number of tests to be run. Each test runs for ten minutes
|
||||
* `--url`: Specifies the upload/download, address, and destination. Example: dl http://10.40.0.1 /dev/null
|
||||
* `--target_per_ten`: Rate of target urls per ten minutes. 90% of this value will be considered the threshold for a passed test.
|
||||
* `--target_per_ten`: Rate of target urls per ten minutes. 90% of this value will be considered the threshold for a passed test.
|
||||
* `--debug`: Turns on debug output for the test
|
||||
* `--help`: Displays help output for the script
|
||||
|
||||
|
||||
|
||||
* `test_ipv4_l4_ftp_urls_per_ten.py`: This script measure the number of urls per ten minutes over layer 4 ftp traffic
|
||||
* class `IPV4L4`
|
||||
@@ -210,29 +213,29 @@ Test will exit on failure of not receiving traffic for one minute on any station
|
||||
* `--mgr`: Specifies the hostname where LANforge is running. Defaults to http://localhost
|
||||
* `--mgr_port`: Specifies the port to use when connecting to LANforge. Defaults to 8080
|
||||
* `--ssid`: Specifies SSID to be used in the test
|
||||
* `--password`: Specifies the password for the SSID to be used in the test
|
||||
* `--password`: Specifies the password for the SSID to be used in the test
|
||||
* `--security`: Specifies security type (WEP, WPA, WPA2, WPA3, Open) of SSID to be used in the test
|
||||
* `--num_stations`: Specifies number of stations to create for the test
|
||||
* `--radio`: Specifies the radio to be used in the test. Eg wiphy0
|
||||
* `--requests_per_ten`: Configures the number of request per ten minutes
|
||||
* `--num_tests`: Configures the number of tests to be run. Each test runs for ten minutes
|
||||
* `--url`: Specifies the upload/download, address, and destination. Example: dl http://10.40.0.1 /dev/null
|
||||
* `--target_per_ten`: Rate of target urls per ten minutes. 90% of this value will be considered the threshold for a passed test.
|
||||
* `--target_per_ten`: Rate of target urls per ten minutes. 90% of this value will be considered the threshold for a passed test.
|
||||
* `--debug`: Turns on debug output for the test
|
||||
* `--help`: Displays help output for the script
|
||||
|
||||
* `test_generic`:
|
||||
* class `GenTest`: This script will create
|
||||
* class `GenTest`: This script will create
|
||||
* function `build`: This function will create the stations and cross-connects to be used during the test.
|
||||
* function `start`: This function will start traffic and measure different values dependent on the command chosen.
|
||||
* function `start`: This function will start traffic and measure different values dependent on the command chosen.
|
||||
Commands currently available for use: lfping, generic, and speedtest.
|
||||
* function `stop`: This function will admin-down stations, stop traffic on cross-connects and cleanup any stations or cross-connects associated with the test.
|
||||
* function `cleanup`: This function will remove any stations and cross-connects created during the test.
|
||||
* Command line options:
|
||||
* Command line options:
|
||||
* `--mgr`: Specifies the hostname where LANforge is running. Defaults to http://localhost
|
||||
* `--mgr_port`: Specifies the port to use when connecting to LANforge. Defaults to 8080
|
||||
* `--ssid`: Specifies SSID to be used in the test
|
||||
* `--password`: Specifies the password for the SSID to be used in the test
|
||||
* `--password`: Specifies the password for the SSID to be used in the test
|
||||
* `--security`: Specifies security type (WEP, WPA, WPA2, WPA3, Open) of SSID to be used in the test
|
||||
* `--num_stations`: Specifies number of stations to create for the test
|
||||
* `--radio`: Specifies the radio to be used in the test. Eg wiphy0
|
||||
@@ -263,6 +266,3 @@ Test will exit on failure of not receiving traffic for one minute on any station
|
||||
* class `VapStations`
|
||||
* function `run`:
|
||||
* function `main`:
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -14,23 +14,26 @@ CURR_TEST_NUM=0
|
||||
CURR_TEST_NAME="BLANK"
|
||||
STOP_NUM=9
|
||||
|
||||
DATA_DIR="/home/lanforge/report-data"
|
||||
DATA_DIR="${TEST_DIR}"
|
||||
REPORT_DIR="/home/lanforge/html-reports"
|
||||
|
||||
#set -vex
|
||||
|
||||
#Test array
|
||||
testCommands=("./example_security_connection.py --num_stations $NUM_STA --ssid jedway-r8000-36 --passwd jedway-r8000-36 --radio $RADIO_USED --security wpa "
|
||||
testCommands=(
|
||||
"./example_security_connection.py --num_stations $NUM_STA --ssid jedway-r8000-36 --passwd jedway-r8000-36 --radio $RADIO_USED --security wpa"
|
||||
"./example_security_connection.py --num_stations $NUM_STA --ssid $SSID_USED --passwd $SSID_USED --radio $RADIO_USED --security wpa2"
|
||||
"./example_security_connection.py --num_stations $NUM_STA --ssid jedway-wep-48 --passwd jedway-wep-48 --radio $RADIO_USED --security wep"
|
||||
"./example_security_connection.py --num_stations $NUM_STA --ssid jedway-wpa3-1 --passwd jedway-wpa3-1 --radio $RADIO_USED --security wpa3"
|
||||
"./test_ipv4_connection.py --radio wiphy2 --num_stations $NUM_STA --ssid $SSID_USED --passwd $PASSWD_USED --security $SECURITY"
|
||||
"./test_generic.py --mgr localhost --radio $RADIO_USED --ssid $SSID_USED --passwd $PASSWD_USED --num_stations $NUM_STA --type lfping --dest 10.40.0.1 --security $SECURITY"
|
||||
"./test_generic.py --mgr localhost --radio $RADIO_USED --ssid $SSID_USED --passwd $PASSWD_USED --num_stations $NUM_STA --type speedtest --speedtest_min_up 20 --speedtest_min_dl 20 --speedtest_max_ping 150 --security $SECURITY"
|
||||
"./test_ipv4_l4_urls_per_ten.py --radio $RADIO_USED --num_stations $NUM_STA --security $SECURITY --ssid $SSID_USED --passwd $PASSWD_USED --num_tests 1 --requests_per_ten 600 --target_per_ten 600"
|
||||
"./test_ipv4_l4_wifi.py --radio wiphy0 --num_stations $NUM_STA --security $SECURITY --ssid $SSID_USED --passwd $PASSWD_USED --test_duration 2m"
|
||||
"./test_ipv4_l4.py --radio wiphy3 --num_stations 4 --security $SECURITY --ssid $SSID_USED --passwd $PASSWD_USED --url \"dl http://10.40.0.1 /dev/null\" --test_duration 2m"
|
||||
"./test_generic.py --radio $RADIO_USED --ssid $SSID_USED --passwd $PASSWD_USED --num_stations $NUM_STA --type lfping --dest 10.40.0.1 --security $SECURITY"
|
||||
"./test_generic.py --radio $RADIO_USED --ssid $SSID_USED --passwd $PASSWD_USED --num_stations $NUM_STA --type speedtest --speedtest_min_up 20 --speedtest_min_dl 20 --speedtest_max_ping 150 --security $SECURITY"
|
||||
"./test_ipv4_l4_urls_per_ten.py --radio $RADIO_USED --num_stations $NUM_STA --security $SECURITY --ssid $SSID_USED --passwd $PASSWD_USED --num_tests 1 --requests_per_ten 600 --target_per_ten 600"
|
||||
"./test_ipv4_l4_wifi.py --radio wiphy0 --num_stations $NUM_STA --security $SECURITY --ssid $SSID_USED --passwd $PASSWD_USED --test_duration 2m"
|
||||
"./test_ipv4_l4.py --radio wiphy3 --num_stations 4 --security $SECURITY --ssid $SSID_USED --passwd $PASSWD_USED --url \"dl http://10.40.0.1 /dev/null\" --test_duration 2m"
|
||||
"./test_ipv4_variable_time.py --radio wiphy1 --ssid $SSID_USED --passwd $PASSWD_USED --security $SECURITY --test_duration 30s --output_format excel"
|
||||
"./test_ipv4_variable_time.py --radio wiphy1 --ssid $SSID_USED --passwd $PASSWD_USED --security $SECURITY --test_duration 30s --output_format csv"
|
||||
"./create_bridge.py --radio wiphy1 --upstream_port eth1 --target_device sta0000"
|
||||
#"./create_bridge.py --radio wiphy1 --upstream_port eth1 --target_device sta0000"
|
||||
#"./create_l3.py --radio wiphy1 --ssid $SSID_USED --passwd $PASSWD_USED --security $SECURITY"
|
||||
#"./create_l4.py --radio wiphy1 --ssid $SSID_USED --passwd $PASSWD_USED --security $SECURITY"
|
||||
#"./create_macvlan.py --radio wiphy1"
|
||||
@@ -63,6 +66,11 @@ function echo_print() {
|
||||
echo "Beginning $CURR_TEST_NAME test..." >>~/test_all_output_file.txt
|
||||
}
|
||||
results=()
|
||||
detailedresults=()
|
||||
NOW=$(date +"%Y-%m-%d-%H-%M")
|
||||
NOW="${NOW/:/-}"
|
||||
TEST_DIR="/home/lanforge/report-data/${NOW}"
|
||||
mkdir "$TEST_DIR"
|
||||
function run_test() {
|
||||
for i in "${testCommands[@]}"; do
|
||||
CURR_TEST_NAME=${i%%.py*}
|
||||
@@ -78,10 +86,14 @@ function run_test() {
|
||||
if (( $CURR_TEST_NUM > $START_NUM )) || (( $CURR_TEST_NUM == $START_NUM )); then
|
||||
echo_print
|
||||
echo "$i"
|
||||
if $i; then
|
||||
results+=("<tr><td>${CURR_TEST_NAME}</td><td>Success</td></tr>")
|
||||
$i > "${TEST_DIR}/${i}.txt" 2> "${TEST_DIR}/${i}_stderr.txt"
|
||||
retval=$?
|
||||
grep -i fail "${TEST_DIR}/${i}.txt" && retval=1
|
||||
chmod 664 "${TEST_DIR}/${i}.txt"
|
||||
if (( $retval == 0 )); then
|
||||
results+=("<tr><td>${CURR_TEST_NAME}</td><td class='scriptdetails'>${i}</td><td class='success'>Success</td><td><button onclick=\"toggle_visibility('${i}');\">Show/Hide</button></td></tr>")
|
||||
else
|
||||
results+=("<tr><td>${CURR_TEST_NAME}</td><td>Failure</td></tr>")
|
||||
results+=("<tr><td>${CURR_TEST_NAME}</td><td class='scriptdetails'>${i}</td><td class='failure'>Failure</td><td><button onclick=\"toggle_visibility('${i}');\">Show/Hide</button></td></tr>")
|
||||
fi
|
||||
fi
|
||||
done
|
||||
@@ -98,46 +110,64 @@ function check_args() {
|
||||
function html_generator() {
|
||||
NOW=$(date +"%Y-%m-%d-%T")
|
||||
header="<html>
|
||||
<head>
|
||||
<title>Test All Scripts Results $NOW</title>
|
||||
<style>
|
||||
.success {
|
||||
background-color:green;
|
||||
}
|
||||
.failure {
|
||||
background-color:red;
|
||||
}
|
||||
table {
|
||||
border: 1px solid gray;
|
||||
}
|
||||
td {
|
||||
margin: 0;
|
||||
padding: 2px;
|
||||
font-family: 'Courier New',courier,sans-serif;
|
||||
}
|
||||
h1, h2, h3, h4 {
|
||||
font-family: 'Century Gothic',Arial,sans,sans-serif;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<h1>Test All Scripts Results</h1>
|
||||
<h4> $NOW</h4>
|
||||
<table border ='1'>
|
||||
"
|
||||
tail="</table>
|
||||
</body>
|
||||
</html>"
|
||||
<head>
|
||||
<title>Test All Scripts Results $NOW</title>
|
||||
<style>
|
||||
.success {
|
||||
background-color:green;
|
||||
}
|
||||
.failure {
|
||||
background-color:red;
|
||||
}
|
||||
table {
|
||||
border: 1px solid gray;
|
||||
}
|
||||
td {
|
||||
margin: 0;
|
||||
padding: 2px;
|
||||
font-family: 'Courier New',courier,sans-serif;
|
||||
}
|
||||
h1, h2, h3, h4 {
|
||||
font-family: 'Century Gothic',Arial,sans,sans-serif;
|
||||
}
|
||||
.scriptdetails {
|
||||
font-size: 10px;
|
||||
}
|
||||
</style>
|
||||
<script type='text/javascript'>
|
||||
function toggle_visibility(id) {
|
||||
var e = document.getElementById(id);
|
||||
if(e.style.display == 'block')
|
||||
e.style.display = 'none';
|
||||
else
|
||||
e.style.display = 'block';
|
||||
}
|
||||
</script>
|
||||
</head>
|
||||
<body>
|
||||
<h1>Test All Scripts Results</h1>
|
||||
<h4>$NOW</h4>
|
||||
<table border ='1'>
|
||||
"
|
||||
tail="</body>
|
||||
</html>"
|
||||
|
||||
fname="/home/lanforge/html-reports/test_all_output_file-${NOW}.html"
|
||||
echo $fname >> $fname
|
||||
echo "$header" >> $fname
|
||||
echo "${results[@]}" >> $fname
|
||||
echo "</table>" >> $fname
|
||||
for item in "${testCommands[@]}"; do
|
||||
CURR_TEST_NAME=${item%%.py*}
|
||||
CURR_TEST_NAME=${CURR_TEST_NAME#./*}
|
||||
echo "<div id=${item} style=\"display:none;\"><iframe src=\"${TEST_DIR}/${item}.txt\"></iframe></div>" >> $fname
|
||||
done;
|
||||
echo "$tail" >> $fname
|
||||
}
|
||||
|
||||
#true >~/test_all_output_file.txt
|
||||
check_args $1 $2
|
||||
run_test
|
||||
echo "${detailedresults}"
|
||||
html_generator
|
||||
#test generic and fileio are for macvlans
|
||||
|
||||
Reference in New Issue
Block a user