Merge pull request #1769 from taosdata/hotfix/fix-test-script-grep-issue

fix test script grep to match accuretely.
This commit is contained in:
slguan 2020-05-01 17:22:08 +08:00 committed by GitHub
commit 1262b443eb
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 2 deletions

View File

@ -10,7 +10,7 @@ NC='\033[0m'
cd script
./test.sh -f basicSuite.sim 2>&1 | grep 'success\|failed\|fault' | tee out.txt
totalSuccess=`grep success out.txt | wc -l`
totalSuccess=`grep -w 'success' out.txt | wc -l`
totalBasic=`grep success out.txt | grep Suite | wc -l`
if [ "$totalSuccess" -gt "0" ]; then
@ -18,7 +18,7 @@ if [ "$totalSuccess" -gt "0" ]; then
echo -e "${GREEN} ### Total $totalSuccess TSIM case(s) succeed! ### ${NC}"
fi
totalFailed=`grep 'failed\|fault' out.txt | wc -l`
totalFailed=`grep -w 'failed\|fault' out.txt | wc -l`
if [ "$totalFailed" -ne "0" ]; then
echo -e "${RED} ### Total $totalFailed TSIM case(s) failed! ### ${NC}"
exit $totalFailed