make test-all.sh flexible to manually execute.

This commit is contained in:
Shuduo Sang 2020-06-10 10:17:44 +08:00
parent d20c24f9b3
commit b0810ef391
1 changed files with 51 additions and 42 deletions

View File

@ -24,11 +24,17 @@ GREEN_DARK='\033[0;32m'
GREEN_UNDERLINE='\033[4;32m'
NC='\033[0m'
totalFailed=0
totalPyFailed=0
current_dir=`pwd`
if [ "$2" != "python" ]; then
echo "### run TSIM test case ###"
cd script
cd $current_dir/script
[ -f out.log ] && rm -f out.log
if [ "$1" == "cron" ]; then
echo "### run TSIM regression test ###"
runSimCaseOneByOne regressionSuite.sim
@ -57,9 +63,11 @@ if [ "$totalFailed" -ne "0" ]; then
# exit $totalFailed
fi
fi
if [ "$2" != "sim" ]; then
echo "### run Python test case ###"
cd ../pytest
cd $current_dir/pytest
[ -f pytest-out.log ] && rm -f pytest-out.log
@ -84,5 +92,6 @@ if [ "$totalPyFailed" -ne "0" ]; then
echo -e "${RED} ### Total $totalPyFailed python case(s) failed! ### ${NC}"
# exit $totalPyFailed
fi
fi
exit $(($totalFailed + $totalPyFailed))