mirror of
https://github.com/Telecominfraproject/wlan-lanforge-scripts.git
synced 2025-11-02 11:48:03 +00:00
Add email functionality to regression_test.sh and improve update_dependencies.py
Signed-off-by: Matthew Stidham <stidmatt@gmail.com>
This commit is contained in:
@@ -101,18 +101,21 @@ if [ ! -d "${REPORT_DATA}" ]; then
|
|||||||
fi
|
fi
|
||||||
TEST_DIR="${REPORT_DATA}/${NOW}"
|
TEST_DIR="${REPORT_DATA}/${NOW}"
|
||||||
|
|
||||||
|
function run_l3_longevity() {
|
||||||
function run_l3_longevity {
|
|
||||||
./test_l3_longevity.py --test_duration 15s --upstream_port eth1 --radio "radio==wiphy0 stations==4 ssid==$SSID_USED ssid_pw==$PASSWD_USED security==$SECURITY" --radio "radio==wiphy1 stations==4 ssid==$SSID_USED ssid_pw==$PASSWD_USED security==$SECURITY" --mgr "$MGR"
|
./test_l3_longevity.py --test_duration 15s --upstream_port eth1 --radio "radio==wiphy0 stations==4 ssid==$SSID_USED ssid_pw==$PASSWD_USED security==$SECURITY" --radio "radio==wiphy1 stations==4 ssid==$SSID_USED ssid_pw==$PASSWD_USED security==$SECURITY" --mgr "$MGR"
|
||||||
}
|
}
|
||||||
function testgroup_list_groups {
|
function testgroup_list_groups() {
|
||||||
./scenario.py --load test_l3_scenario_throughput;./testgroup.py --group_name group1 --add_group --add_cx cx0000,cx0001,cx0002 --remove_cx cx0003 --list_groups --debug --mgr "$MGR"
|
./scenario.py --load test_l3_scenario_throughput
|
||||||
|
./testgroup.py --group_name group1 --add_group --add_cx cx0000,cx0001,cx0002 --remove_cx cx0003 --list_groups --debug --mgr "$MGR"
|
||||||
}
|
}
|
||||||
function testgroup_list_connections {
|
function testgroup_list_connections() {
|
||||||
./scenario.py --load test_l3_scenario_throughput;./testgroup.py --group_name group1 --add_group --add_cx cx0000,cx0001,cx0002 --remove_cx cx0003 --show_group --debug --mgr "$MGR"
|
./scenario.py --load test_l3_scenario_throughput
|
||||||
|
./testgroup.py --group_name group1 --add_group --add_cx cx0000,cx0001,cx0002 --remove_cx cx0003 --show_group --debug --mgr "$MGR"
|
||||||
}
|
}
|
||||||
function testgroup_delete_group {
|
function testgroup_delete_group() {
|
||||||
./scenario.py --load test_l3_scenario_throughput;./testgroup.py --group_name group1 --add_group --add_cx cx0000,cx0001,cx0002 --remove_cx cx0003;./testgroup.py --group_name group1--del_group --debug --mgr "$MGR"
|
./scenario.py --load test_l3_scenario_throughput
|
||||||
|
./testgroup.py --group_name group1 --add_group --add_cx cx0000,cx0001,cx0002 --remove_cx cx0003
|
||||||
|
./testgroup.py --group_name group1--del_group --debug --mgr "$MGR"
|
||||||
}
|
}
|
||||||
if [[ $MGRLEN -gt 0 ]]; then
|
if [[ $MGRLEN -gt 0 ]]; then
|
||||||
testCommands=(
|
testCommands=(
|
||||||
@@ -357,6 +360,9 @@ function html_generator() {
|
|||||||
rm -f "${HOMEPATH}/html-reports/latest.html"
|
rm -f "${HOMEPATH}/html-reports/latest.html"
|
||||||
fi
|
fi
|
||||||
ln -s "${fname}" "${HOMEPATH}/html-reports/latest.html"
|
ln -s "${fname}" "${HOMEPATH}/html-reports/latest.html"
|
||||||
|
HOSTNAME=$(ip -4 addr show eth0 | grep -oP '(?<=inet\s)\d+(\.\d+){3}')
|
||||||
|
content="View the latest regression report at ${HOSTNAME}/html-reports/latest.html"
|
||||||
|
mail -s "Regression Results" scripters@candelatech.com <<<$content
|
||||||
}
|
}
|
||||||
|
|
||||||
results=()
|
results=()
|
||||||
|
|||||||
@@ -18,7 +18,11 @@ def main():
|
|||||||
packages_installed = []
|
packages_installed = []
|
||||||
packages_failed =[]
|
packages_failed =[]
|
||||||
for package in packages:
|
for package in packages:
|
||||||
command = "pip3 install {} ".format(package)#pandas plotly numpy paramiko bokeh websocket-client pyarrow xlsxwriter pyshark influxdb influxdb-client matplotlib pdfkit pip-search --upgrade"
|
command = "if ($( pip3 install {} --upgrade > /tmp/pip-out 2> /tmp/pip-err ));" \
|
||||||
|
"then echo Success;" \
|
||||||
|
"else echo Problem installing {} please run that by hand;" \
|
||||||
|
"fi".format(package, package)
|
||||||
|
|
||||||
res = subprocess.call(command, shell = True)
|
res = subprocess.call(command, shell = True)
|
||||||
if res == 0:
|
if res == 0:
|
||||||
print("Package {} install SUCCESS Returned Value: {} ".format(package, res))
|
print("Package {} install SUCCESS Returned Value: {} ".format(package, res))
|
||||||
@@ -28,9 +32,9 @@ def main():
|
|||||||
print("To see errors try: pip3 install {}".format(package))
|
print("To see errors try: pip3 install {}".format(package))
|
||||||
packages_failed.append(package)
|
packages_failed.append(package)
|
||||||
|
|
||||||
|
if len(packages_failed) > 0:
|
||||||
print("Install Complete")
|
print("Install Complete")
|
||||||
print("Packages Installed Success: {}".format(packages_installed))
|
print("Packages Installed Success: {}\n".format(packages_installed))
|
||||||
print("Packages Failed (Some scripts may not need these packages): {}".format(packages_failed))
|
print("Packages Failed (Some scripts may not need these packages): {}".format(packages_failed))
|
||||||
|
|
||||||
if __name__ == "__main__":
|
if __name__ == "__main__":
|
||||||
|
|||||||
Reference in New Issue
Block a user