diff --git a/tests/pytest/util/dnodes.py b/tests/pytest/util/dnodes.py index 0e8ec148b474e81dfa65744bd5af7e8f9b11aa7b..edb3d761cb9f1af2266f5210997ae20fe3cad265 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 184dc9a88f4d88a7e0c043dd4de46152f0a7daca..0ce74a989e632fc69d4c4fae4a76a1b6bb18959a 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 3f2c5d268cc9cdb49ae0e06e8ac7cbf366c520a3..5ef4cca741c8432db57ba35571c2de8fd545f1bf 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 f2eff825e6036dbc910880aeb56cbc7ef2b28329..f4979bfa5ac6c8080587b75c39428e462d49f714 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 39eccc965b02bc4922f7b46deaa3441feeae7cf2..2a3187e64117b337c27b6dee794a20a66989ca17 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