From 19895e9b505b19a3fd56b9b8dfb809bdea118612 Mon Sep 17 00:00:00 2001 From: slguan Date: Sun, 3 May 2020 11:03:33 +0800 Subject: [PATCH] add valgrind for tests --- tests/script/sh/exec.sh | 26 ++++++-------------------- 1 file changed, 6 insertions(+), 20 deletions(-) diff --git a/tests/script/sh/exec.sh b/tests/script/sh/exec.sh index 86d78a4413..f3fcd0325f 100755 --- a/tests/script/sh/exec.sh +++ b/tests/script/sh/exec.sh @@ -70,28 +70,14 @@ if [ "$CLEAR_OPTION" = "clear" ]; then rm -rf $MGMT_DIR fi -if [ "$SHELL_OPTION" = "true" ]; then - if [ "$EXEC_OPTON" = "start" ]; then - echo "ExcuteCmd:" $EXE_DIR/taos -c $CFG_DIR -u $USERS -p - $EXE_DIR/taos -c $CFG_DIR -u $USERS -p - else - #relative path - RCFG_DIR=sim/$NODE_NAME/cfg - PID=`ps -ef|grep -v taosd | grep taos | grep $RCFG_DIR | grep -v grep | awk '{print $2}'` - if [ -n "$PID" ]; then - sudo kill -9 $PID - fi - fi - return -fi - if [ "$EXEC_OPTON" = "start" ]; then echo "ExcuteCmd:" $EXE_DIR/taosd -c $CFG_DIR - nohup $EXE_DIR/taosd -c $CFG_DIR > /dev/null 2>&1 & - #TT=`date +%s` - #mkdir ${LOG_DIR}/${TT} - #echo valgrind --log-file=${LOG_DIR}/${TT}/valgrind.log --tool=memcheck --leak-check=full --show-reachable=no --track-origins=yes --show-leak-kinds=all -v --workaround-gcc296-bugs=yes $EXE_DIR/taosd -c $CFG_DIR - #nohup valgrind --log-file=${LOG_DIR}/${TT}/valgrind.log --tool=memcheck --leak-check=full --show-reachable=no --track-origins=yes --show-leak-kinds=all -v --workaround-gcc296-bugs=yes $EXE_DIR/taosd -c $CFG_DIR > /dev/null 2>&1 & + + if [ "$SHELL_OPTION" = "true" ]; then + nohup valgrind --log-file=${LOG_DIR}/valgrind.log --tool=memcheck --leak-check=full --show-reachable=no --track-origins=yes --show-leak-kinds=all -v --workaround-gcc296-bugs=yes $EXE_DIR/taosd -c $CFG_DIR > /dev/null 2>&1 & + else + nohup $EXE_DIR/taosd -c $CFG_DIR > /dev/null 2>&1 & + fi else #relative path -- GitLab