From e2a564c46dee8485516cae479e887bf01a366d1c Mon Sep 17 00:00:00 2001 From: Shengliang Guan Date: Thu, 27 Oct 2022 16:21:34 +0800 Subject: [PATCH] test: improve coverall --- tests/script/jenkins/basic.txt | 2 +- tests/script/test.sh | 8 +++++++- tests/script/tsim/insert/basic.sim | 1 + 3 files changed, 9 insertions(+), 2 deletions(-) diff --git a/tests/script/jenkins/basic.txt b/tests/script/jenkins/basic.txt index 83ecc69b74..cb1b2646b1 100644 --- a/tests/script/jenkins/basic.txt +++ b/tests/script/jenkins/basic.txt @@ -228,7 +228,7 @@ ./test.sh -f tsim/table/vgroup.sim # ---- stream -./test.sh -f tsim/stream/basic0.sim -v +./test.sh -f tsim/stream/basic0.sim -g ./test.sh -f tsim/stream/basic1.sim ./test.sh -f tsim/stream/basic2.sim ./test.sh -f tsim/stream/drop_stream.sim diff --git a/tests/script/test.sh b/tests/script/test.sh index 1530567987..b38d331715 100755 --- a/tests/script/test.sh +++ b/tests/script/test.sh @@ -15,7 +15,7 @@ VALGRIND=0 UNIQUE=0 UNAME_BIN=`which uname` OS_TYPE=`$UNAME_BIN` -while getopts "f:avum" arg +while getopts "f:agvum" arg do case $arg in f) @@ -27,6 +27,9 @@ do u) UNIQUE=1 ;; + g) + VALGRIND=2 + ;; ?) echo "unknow argument" ;; @@ -125,6 +128,9 @@ if [ -n "$FILE_NAME" ]; then FLAG="-v" echo valgrind --tool=memcheck --leak-check=full --show-reachable=no --track-origins=yes --child-silent-after-fork=yes --show-leak-kinds=all --num-callers=20 -v --workaround-gcc296-bugs=yes --log-file=${LOG_DIR}/valgrind-tsim.log $PROGRAM -c $CFG_DIR -f $FILE_NAME $FLAG valgrind --tool=memcheck --leak-check=full --show-reachable=no --track-origins=yes --child-silent-after-fork=yes --show-leak-kinds=all --num-callers=20 -v --workaround-gcc296-bugs=yes --log-file=${LOG_DIR}/valgrind-tsim.log $PROGRAM -c $CFG_DIR -f $FILE_NAME $FLAG + elif [ $VALGRIND -eq 2 ]; then + echo "ExcuteCmd:" $PROGRAM -c $CFG_DIR -f $FILE_NAME -v + $PROGRAM -c $CFG_DIR -f $FILE_NAME -v else echo "ExcuteCmd:" $PROGRAM -c $CFG_DIR -f $FILE_NAME $PROGRAM -c $CFG_DIR -f $FILE_NAME diff --git a/tests/script/tsim/insert/basic.sim b/tests/script/tsim/insert/basic.sim index ec8a61bb04..f910fa9c23 100644 --- a/tests/script/tsim/insert/basic.sim +++ b/tests/script/tsim/insert/basic.sim @@ -50,6 +50,7 @@ print $data[1000][1000] $a1 = 0 $a2 = 0 $a3 = $a1 % $a2 +$a4 = $a1 / $a2 print $a3 $val = \\\1