mirror of
https://github.com/Telecominfraproject/wlan-lanforge-scripts.git
synced 2025-11-20 03:54:50 +00:00
regression_text: add in end text function regression commands file
Signed-off-by: Matthew Stidham <stidmatt@gmail.com>
This commit is contained in:
@@ -21,7 +21,7 @@ Help()
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
while getopts ":h:s:S:p:w:m:A:r:F:B:U:D:H:M:C:" option; do
|
while getopts ":h:s:S:p:w:m:A:r:F:B:U:D:H:M:C:e:" option; do
|
||||||
case "${option}" in
|
case "${option}" in
|
||||||
h) # display Help
|
h) # display Help
|
||||||
Help
|
Help
|
||||||
@@ -49,7 +49,7 @@ while getopts ":h:s:S:p:w:m:A:r:F:B:U:D:H:M:C:" option; do
|
|||||||
RADIO_USED=${OPTARG}
|
RADIO_USED=${OPTARG}
|
||||||
;;
|
;;
|
||||||
F)
|
F)
|
||||||
RC_FILE=${OPTARG}
|
REGRESSION_COMMANDS=${OPTARG}
|
||||||
;;
|
;;
|
||||||
B)
|
B)
|
||||||
BSSID=${OPTARG}
|
BSSID=${OPTARG}
|
||||||
@@ -70,6 +70,9 @@ while getopts ":h:s:S:p:w:m:A:r:F:B:U:D:H:M:C:" option; do
|
|||||||
C)
|
C)
|
||||||
RESOURCE=${OPTARG}
|
RESOURCE=${OPTARG}
|
||||||
;;
|
;;
|
||||||
|
e)
|
||||||
|
END_TEXT=${OPTARG}
|
||||||
|
;;
|
||||||
*)
|
*)
|
||||||
|
|
||||||
;;
|
;;
|
||||||
@@ -140,10 +143,6 @@ fi
|
|||||||
|
|
||||||
HOMEPATH=$(realpath ~)
|
HOMEPATH=$(realpath ~)
|
||||||
|
|
||||||
if [[ ${#RC_FILE} -gt 0 ]]; then
|
|
||||||
source "$RC_FILE"
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [[ ${#SSID_USED} -gt 0 ]]; then
|
if [[ ${#SSID_USED} -gt 0 ]]; then
|
||||||
if [ -f ./regression_test.rc ]; then
|
if [ -f ./regression_test.rc ]; then
|
||||||
source ./regression_test.rc # this version is a better unix name
|
source ./regression_test.rc # this version is a better unix name
|
||||||
@@ -259,6 +258,8 @@ if [[ ${#SHORT} -gt 0 ]]; then
|
|||||||
|
|
||||||
|
|
||||||
)
|
)
|
||||||
|
elif [[ ${#REGRESSION_COMMANDS} -gt 0 ]]; then
|
||||||
|
testCommands=(cat "$REGRESSION_COMMANDS")
|
||||||
else
|
else
|
||||||
testCommands=(
|
testCommands=(
|
||||||
"./create_bond.py --network_dev_list $RESOURCE.eth0,$UPSTREAM --debug --mgr $MGR"
|
"./create_bond.py --network_dev_list $RESOURCE.eth0,$UPSTREAM --debug --mgr $MGR"
|
||||||
@@ -669,7 +670,7 @@ td.testname {
|
|||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
<tbody>"
|
<tbody>"
|
||||||
f="</body></html>"
|
tail="</body></html>"
|
||||||
|
|
||||||
fname="${HOMEPATH}/html-reports/regression_file-${NOW}.html"
|
fname="${HOMEPATH}/html-reports/regression_file-${NOW}.html"
|
||||||
echo "$header" >> "$fname"
|
echo "$header" >> "$fname"
|
||||||
@@ -704,6 +705,10 @@ td.testname {
|
|||||||
</table>
|
</table>
|
||||||
<script> sortTable('myTable2', 2); </script>
|
<script> sortTable('myTable2', 2); </script>
|
||||||
" >> "$fname"
|
" >> "$fname"
|
||||||
|
if [[ ${#END_TEXT} -gt 0 ]]; then
|
||||||
|
end_text=$(cat "$END_TEXT")
|
||||||
|
"<p>${end_text}</p>" >> "$fname"
|
||||||
|
fi
|
||||||
echo "$tail" >> "$fname"
|
echo "$tail" >> "$fname"
|
||||||
if [ -f "${HOMEPATH}/html-reports/latest.html" ]; then
|
if [ -f "${HOMEPATH}/html-reports/latest.html" ]; then
|
||||||
rm -f "${HOMEPATH}/html-reports/latest.html"
|
rm -f "${HOMEPATH}/html-reports/latest.html"
|
||||||
|
|||||||
Reference in New Issue
Block a user