未验证 提交 78f42c1c 编写于 作者: S Shengliang Guan 提交者: GitHub

Merge pull request #18284 from taosdata/fix/TD-20530

test: adjust asan directory
...@@ -390,7 +390,7 @@ class TDDnode: ...@@ -390,7 +390,7 @@ class TDDnode:
binPath, self.cfgDir) binPath, self.cfgDir)
else: else:
if self.asan: if self.asan:
asanDir = "%s/sim/tsim/asan/dnode%d.asan" % ( asanDir = "%s/sim/asan/dnode%d.asan" % (
self.path, self.index) self.path, self.index)
cmd = "nohup %s -c %s > /dev/null 2> %s & " % ( cmd = "nohup %s -c %s > /dev/null 2> %s & " % (
binPath, self.cfgDir, asanDir) binPath, self.cfgDir, asanDir)
...@@ -457,7 +457,7 @@ class TDDnode: ...@@ -457,7 +457,7 @@ class TDDnode:
if self.valgrind == 0: if self.valgrind == 0:
if self.asan: if self.asan:
asanDir = "%s/sim/tsim/asan/dnode%d.asan" % ( asanDir = "%s/sim/asan/dnode%d.asan" % (
self.path, self.index) self.path, self.index)
cmd = "nohup %s -c %s > /dev/null 2> %s & " % ( cmd = "nohup %s -c %s > /dev/null 2> %s & " % (
binPath, self.cfgDir, asanDir) binPath, self.cfgDir, asanDir)
......
...@@ -15,7 +15,7 @@ else ...@@ -15,7 +15,7 @@ else
fi fi
TAOS_DIR=`pwd` TAOS_DIR=`pwd`
LOG_DIR=$TAOS_DIR/sim/tsim/asan LOG_DIR=$TAOS_DIR/sim/asan
error_num=`cat ${LOG_DIR}/*.asan | grep "ERROR" | wc -l` error_num=`cat ${LOG_DIR}/*.asan | grep "ERROR" | wc -l`
memory_leak=`cat ${LOG_DIR}/*.asan | grep "Direct leak" | wc -l` memory_leak=`cat ${LOG_DIR}/*.asan | grep "Direct leak" | wc -l`
......
...@@ -80,7 +80,7 @@ LOG_DIR=$NODE_DIR/log ...@@ -80,7 +80,7 @@ LOG_DIR=$NODE_DIR/log
DATA_DIR=$NODE_DIR/data DATA_DIR=$NODE_DIR/data
MGMT_DIR=$NODE_DIR/data/mgmt MGMT_DIR=$NODE_DIR/data/mgmt
TSDB_DIR=$NODE_DIR/data/tsdb TSDB_DIR=$NODE_DIR/data/tsdb
ASAN_DIR=$SIM_DIR/tsim/asan ASAN_DIR=$SIM_DIR/asan
TAOS_CFG=$NODE_DIR/cfg/taos.cfg TAOS_CFG=$NODE_DIR/cfg/taos.cfg
echo ------------ $EXEC_OPTON $NODE_NAME echo ------------ $EXEC_OPTON $NODE_NAME
......
...@@ -72,7 +72,7 @@ PRG_DIR=$SIM_DIR/tsim ...@@ -72,7 +72,7 @@ PRG_DIR=$SIM_DIR/tsim
CFG_DIR=$PRG_DIR/cfg CFG_DIR=$PRG_DIR/cfg
LOG_DIR=$PRG_DIR/log LOG_DIR=$PRG_DIR/log
DATA_DIR=$PRG_DIR/data DATA_DIR=$PRG_DIR/data
ASAN_DIR=$PRG_DIR/asan ASAN_DIR=$SIM_DIR/asan
chmod -R 777 $PRG_DIR chmod -R 777 $PRG_DIR
echo "------------------------------------------------------------------------" echo "------------------------------------------------------------------------"
...@@ -138,11 +138,14 @@ if [ -n "$FILE_NAME" ]; then ...@@ -138,11 +138,14 @@ if [ -n "$FILE_NAME" ]; then
echo "AsanDir:" $ASAN_DIR/tsim.asan echo "AsanDir:" $ASAN_DIR/tsim.asan
eval $PROGRAM -c $CFG_DIR -f $FILE_NAME 2> $ASAN_DIR/tsim.asan eval $PROGRAM -c $CFG_DIR -f $FILE_NAME 2> $ASAN_DIR/tsim.asan
result=$? result=$?
echo "Execute result: " $result echo "Execute result:" $result
if [ $result -eq 0 ]; then if [ $result -eq 0 ]; then
$CODE_DIR/sh/checkAsan.sh $CODE_DIR/sh/checkAsan.sh
else else
echo "TSIM has asan errors"
sleep 1
$CODE_DIR/sh/checkAsan.sh
exit 1 exit 1
fi fi
fi fi
......
...@@ -44,7 +44,7 @@ declare -x BUILD_DIR=$TOP_DIR/$BIN_DIR ...@@ -44,7 +44,7 @@ declare -x BUILD_DIR=$TOP_DIR/$BIN_DIR
declare -x SIM_DIR=$TOP_DIR/sim declare -x SIM_DIR=$TOP_DIR/sim
PROGRAM=$BUILD_DIR/build/bin/tsim PROGRAM=$BUILD_DIR/build/bin/tsim
PRG_DIR=$SIM_DIR/tsim PRG_DIR=$SIM_DIR/tsim
ASAN_DIR=$PRG_DIR/asan ASAN_DIR=$SIM_DIR/asan
SYSTEM_TEST_DIR=$TOP_DIR/tests/system-test SYSTEM_TEST_DIR=$TOP_DIR/tests/system-test
chmod -R 777 $PRG_DIR chmod -R 777 $PRG_DIR
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册