diff --git a/tests/pytest/util/dnodes.py b/tests/pytest/util/dnodes.py index 0e8ec148b4..edb3d761cb 100644 --- a/tests/pytest/util/dnodes.py +++ b/tests/pytest/util/dnodes.py @@ -390,7 +390,7 @@ class TDDnode: binPath, self.cfgDir) else: if self.asan: - asanDir = "%s/sim/tsim/asan/dnode%d.asan" % ( + asanDir = "%s/sim/asan/dnode%d.asan" % ( self.path, self.index) cmd = "nohup %s -c %s > /dev/null 2> %s & " % ( binPath, self.cfgDir, asanDir) @@ -457,7 +457,7 @@ class TDDnode: if self.valgrind == 0: if self.asan: - asanDir = "%s/sim/tsim/asan/dnode%d.asan" % ( + asanDir = "%s/sim/asan/dnode%d.asan" % ( self.path, self.index) cmd = "nohup %s -c %s > /dev/null 2> %s & " % ( binPath, self.cfgDir, asanDir) diff --git a/tests/script/sh/checkAsan.sh b/tests/script/sh/checkAsan.sh index 184dc9a88f..0ce74a989e 100755 --- a/tests/script/sh/checkAsan.sh +++ b/tests/script/sh/checkAsan.sh @@ -15,7 +15,7 @@ else fi 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` memory_leak=`cat ${LOG_DIR}/*.asan | grep "Direct leak" | wc -l` diff --git a/tests/script/sh/exec.sh b/tests/script/sh/exec.sh index 3f2c5d268c..5ef4cca741 100755 --- a/tests/script/sh/exec.sh +++ b/tests/script/sh/exec.sh @@ -80,7 +80,7 @@ LOG_DIR=$NODE_DIR/log DATA_DIR=$NODE_DIR/data MGMT_DIR=$NODE_DIR/data/mgmt TSDB_DIR=$NODE_DIR/data/tsdb -ASAN_DIR=$SIM_DIR/tsim/asan +ASAN_DIR=$SIM_DIR/asan TAOS_CFG=$NODE_DIR/cfg/taos.cfg echo ------------ $EXEC_OPTON $NODE_NAME diff --git a/tests/script/test.sh b/tests/script/test.sh index f2eff825e6..f4979bfa5a 100755 --- a/tests/script/test.sh +++ b/tests/script/test.sh @@ -72,7 +72,7 @@ PRG_DIR=$SIM_DIR/tsim CFG_DIR=$PRG_DIR/cfg LOG_DIR=$PRG_DIR/log DATA_DIR=$PRG_DIR/data -ASAN_DIR=$PRG_DIR/asan +ASAN_DIR=$SIM_DIR/asan chmod -R 777 $PRG_DIR echo "------------------------------------------------------------------------" @@ -138,11 +138,14 @@ if [ -n "$FILE_NAME" ]; then echo "AsanDir:" $ASAN_DIR/tsim.asan eval $PROGRAM -c $CFG_DIR -f $FILE_NAME 2> $ASAN_DIR/tsim.asan result=$? - echo "Execute result: " $result + echo "Execute result:" $result if [ $result -eq 0 ]; then $CODE_DIR/sh/checkAsan.sh else + echo "TSIM has asan errors" + sleep 1 + $CODE_DIR/sh/checkAsan.sh exit 1 fi fi diff --git a/tests/system-test/test.sh b/tests/system-test/test.sh index 39eccc965b..2a3187e641 100755 --- a/tests/system-test/test.sh +++ b/tests/system-test/test.sh @@ -44,7 +44,7 @@ declare -x BUILD_DIR=$TOP_DIR/$BIN_DIR declare -x SIM_DIR=$TOP_DIR/sim PROGRAM=$BUILD_DIR/build/bin/tsim PRG_DIR=$SIM_DIR/tsim -ASAN_DIR=$PRG_DIR/asan +ASAN_DIR=$SIM_DIR/asan SYSTEM_TEST_DIR=$TOP_DIR/tests/system-test chmod -R 777 $PRG_DIR