提交 15c0bb94 编写于 作者: S Shengliang Guan

test: python asan

上级 4dc1b334
......@@ -162,7 +162,11 @@ class TDDnode:
def setAsan(self, value):
self.asan = value
if value:
self.execPath = os.path.abspath(self.path + "/tests/script/sh/exec.sh")
selfPath = os.path.dirname(os.path.realpath(__file__))
if ("community" in selfPath):
self.execPath = os.path.abspath(self.path + "/community/tests/script/sh/exec.sh")
else:
self.execPath = os.path.abspath(self.path + "/tests/script/sh/exec.sh")
def getDataSize(self):
totalSize = 0
......@@ -670,8 +674,13 @@ class TDDnodes:
def setAsan(self, value):
self.asan = value
if value:
self.stopDnodesPath = os.path.abspath(self.path + "/tests/script/sh/stop_dnodes.sh")
self.stopDnodesSigintPath = os.path.abspath(self.path + "/tests/script/sh/sigint_stop_dnodes.sh")
selfPath = os.path.dirname(os.path.realpath(__file__))
if ("community" in selfPath):
self.stopDnodesPath = os.path.abspath(self.path + "/community/tests/script/sh/stop_dnodes.sh")
self.stopDnodesSigintPath = os.path.abspath(self.path + "/community/tests/script/sh/sigint_stop_dnodes.sh")
else:
self.stopDnodesPath = os.path.abspath(self.path + "/tests/script/sh/stop_dnodes.sh")
self.stopDnodesSigintPath = os.path.abspath(self.path + "/tests/script/sh/sigint_stop_dnodes.sh")
tdLog.info("run in address sanitizer mode")
def setKillValgrind(self, value):
......
......@@ -3,7 +3,7 @@
set +e
#set -x
export LD_PRELOAD=
unset LD_PRELOAD
SCRIPT_DIR=`dirname $0`
cd $SCRIPT_DIR/../
SCRIPT_DIR=`pwd`
......
......@@ -11,7 +11,7 @@
set +e
#set -x
export LD_PRELOAD=
unset LD_PRELOAD
UNAME_BIN=`which uname`
OS_TYPE=`$UNAME_BIN`
......
......@@ -3,7 +3,7 @@
set +e
#set -x
export LD_PRELOAD=
unset LD_PRELOAD
UNAME_BIN=`which uname`
OS_TYPE=`$UNAME_BIN`
......
......@@ -3,7 +3,7 @@
set +e
#set -x
export LD_PRELOAD=
unset LD_PRELOAD
UNAME_BIN=`which uname`
OS_TYPE=`$UNAME_BIN`
......
......@@ -69,10 +69,11 @@ echo "ExcuteCmd:" $*
AsanFile=$ASAN_DIR/psim.asan
echo "AsanFile:" $AsanFile
unset LD_PRELOAD
export LD_PRELOAD=libasan.so.5
$* -a 2> $AsanFile
export LD_PRELOAD=
unset LD_PRELOAD
AsanFileLen=`cat $AsanFile | wc -l`
while [ $AsanFileLen -lt 10 ]
do
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册