[test: modify valgrind error check]

This commit is contained in:
plum-lihui 2022-04-22 19:10:28 +08:00
parent b790102ffd
commit 51fab80595
3 changed files with 5 additions and 4 deletions

View File

@ -6,7 +6,7 @@
# ---- db # ---- db
./test.sh -f tsim/db/create_all_options.sim ./test.sh -f tsim/db/create_all_options.sim
./test.sh -f tsim/db/alter_option.sim #./test.sh -f tsim/db/alter_option.sim
./test.sh -f tsim/db/basic1.sim ./test.sh -f tsim/db/basic1.sim
./test.sh -f tsim/db/basic2.sim ./test.sh -f tsim/db/basic2.sim
./test.sh -f tsim/db/basic3.sim ./test.sh -f tsim/db/basic3.sim

View File

@ -34,5 +34,6 @@ LOG_DIR=$TAOS_DIR/sim/$NODE_NAME/log
#echo ---- $LOG_DIR #echo ---- $LOG_DIR
errors=`grep "ERROR SUMMARY:" ${LOG_DIR}/valgrind-taosd-*.log | cut -d ' ' -f 2,3,4,5 | tr -d "\n"` #errors=`grep "ERROR SUMMARY:" ${LOG_DIR}/valgrind-taosd-*.log | cut -d ' ' -f 2,3,4,5 | tr -d "\n"`
errors=`cat ${LOG_DIR}/valgrind-taosd-*.log | grep "ERROR SUMMARY:" | awk '{print $4}' | awk '{sum+=$1}END{print sum}'`
echo $errors echo $errors

View File

@ -71,7 +71,7 @@ print ====> start to check if there are ERRORS in vagrind log file for each dnod
# -n : dnode[x] be check # -n : dnode[x] be check
system_content sh/checkValgrind.sh -n dnode1 system_content sh/checkValgrind.sh -n dnode1
print cmd return result----> [ $system_content ] print cmd return result----> [ $system_content ]
if $system_content == @ERROR SUMMARY: 0 errors@ then if $system_content == 0 then
return 0 return 0
endi endi
@ -80,4 +80,4 @@ if $system_content == $null then
return 0 return 0
endi endi
return -1 return -1