execute all cases even some failed early.

This commit is contained in:
Shuduo Sang 2020-05-11 15:10:17 +08:00
parent 5883ed6e73
commit cbd4542120
2 changed files with 7 additions and 5 deletions

View File

@ -163,7 +163,7 @@ matrix:
cd ${TRAVIS_BUILD_DIR}/tests cd ${TRAVIS_BUILD_DIR}/tests
./test-all.sh $TRAVIS_EVENT_TYPE ./test-all.sh $TRAVIS_EVENT_TYPE COVER
TEST_RESULT=$? TEST_RESULT=$?

View File

@ -21,11 +21,12 @@ fi
echo -e "${GREEN} ### Total $totalSuccess TSIM case(s) succeed! ### ${NC}" echo -e "${GREEN} ### Total $totalSuccess TSIM case(s) succeed! ### ${NC}"
totalFailed=`grep 'failed\|fault' out.txt | wc -l` totalFailed=`grep 'failed\|fault' out.txt | wc -l`
echo -e "${RED} ### Total $totalFailed TSIM case(s) failed! ### ${NC}" # echo -e "${RED} ### Total $totalFailed TSIM case(s) failed! ### ${NC}"
if [ "$totalFailed" -ne "0" ]; then if [ "$totalFailed" -ne "0" ]; then
# echo -e "${RED} ### Total $totalFailed TSIM case(s) failed! ### ${NC}" echo -e "${RED} ### Total $totalFailed TSIM case(s) failed! ### ${NC}"
exit $totalFailed
# exit $totalFailed
fi fi
echo "### run Python script ###" echo "### run Python script ###"
@ -46,6 +47,7 @@ fi
totalPyFailed=`grep 'failed\|fault' pytest-out.txt | wc -l` totalPyFailed=`grep 'failed\|fault' pytest-out.txt | wc -l`
if [ "$totalPyFailed" -ne "0" ]; then if [ "$totalPyFailed" -ne "0" ]; then
echo -e "${RED} ### Total $totalPyFailed python case(s) failed! ### ${NC}" echo -e "${RED} ### Total $totalPyFailed python case(s) failed! ### ${NC}"
exit $totalPyFailed # exit $totalPyFailed
fi fi
exit $(($totalFailed + $totalPyFailed))