From d927985e581540ce9873cf586eae0bd286957a01 Mon Sep 17 00:00:00 2001 From: Shuduo Sang Date: Fri, 1 May 2020 16:53:53 +0800 Subject: [PATCH] fix test script grep to match accuretely. --- tests/test-all.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/test-all.sh b/tests/test-all.sh index ee1904ba7c..4bffca1201 100755 --- a/tests/test-all.sh +++ b/tests/test-all.sh @@ -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 -- GitLab