mirror of
https://github.com/Telecominfraproject/wlan-lanforge-scripts.git
synced 2025-11-03 12:18:00 +00:00
test_all_scripts.sh: adds test for debug env variable
This commit is contained in:
@@ -49,8 +49,6 @@ function echo_print() {
|
|||||||
}
|
}
|
||||||
function run_test() {
|
function run_test() {
|
||||||
for i in "${testCommands[@]}"; do
|
for i in "${testCommands[@]}"; do
|
||||||
set -x
|
|
||||||
set -e
|
|
||||||
CURR_TEST_NAME=${i%%.py*}
|
CURR_TEST_NAME=${i%%.py*}
|
||||||
CURR_TEST_NAME=${CURR_TEST_NAME#./*}
|
CURR_TEST_NAME=${CURR_TEST_NAME#./*}
|
||||||
CURR_TEST_NUM="${name_to_num[$CURR_TEST_NAME]}"
|
CURR_TEST_NUM="${name_to_num[$CURR_TEST_NAME]}"
|
||||||
@@ -62,10 +60,11 @@ function run_test() {
|
|||||||
if (( $CURR_TEST_NUM > $START_NUM )) || (( $CURR_TEST_NUM == $START_NUM )); then
|
if (( $CURR_TEST_NUM > $START_NUM )) || (( $CURR_TEST_NUM == $START_NUM )); then
|
||||||
echo_print
|
echo_print
|
||||||
echo "$i"
|
echo "$i"
|
||||||
sleep 3
|
[[ x$DEBUG != x ]] && sleep 2
|
||||||
eval $i >>~/test_all_output_file.txt
|
eval $i >>~/test_all_output_file.txt
|
||||||
if [ $? -ne 0 ]; then
|
if [ $? -ne 0 ]; then
|
||||||
echo $CURR_TEST_NAME failure
|
echo $CURR_TEST_NAME failure
|
||||||
|
[[ x$DEBUG != x ]] && exit 1
|
||||||
else
|
else
|
||||||
echo $CURR_TEST_NAME success
|
echo $CURR_TEST_NAME success
|
||||||
fi
|
fi
|
||||||
|
|||||||
Reference in New Issue
Block a user