test: python asan
This commit is contained in:
parent
4dc1b33414
commit
15c0bb9446
|
@ -162,7 +162,11 @@ class TDDnode:
|
||||||
def setAsan(self, value):
|
def setAsan(self, value):
|
||||||
self.asan = value
|
self.asan = value
|
||||||
if 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):
|
def getDataSize(self):
|
||||||
totalSize = 0
|
totalSize = 0
|
||||||
|
@ -670,8 +674,13 @@ class TDDnodes:
|
||||||
def setAsan(self, value):
|
def setAsan(self, value):
|
||||||
self.asan = value
|
self.asan = value
|
||||||
if value:
|
if value:
|
||||||
self.stopDnodesPath = os.path.abspath(self.path + "/tests/script/sh/stop_dnodes.sh")
|
selfPath = os.path.dirname(os.path.realpath(__file__))
|
||||||
self.stopDnodesSigintPath = os.path.abspath(self.path + "/tests/script/sh/sigint_stop_dnodes.sh")
|
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")
|
tdLog.info("run in address sanitizer mode")
|
||||||
|
|
||||||
def setKillValgrind(self, value):
|
def setKillValgrind(self, value):
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
set +e
|
set +e
|
||||||
#set -x
|
#set -x
|
||||||
|
|
||||||
export LD_PRELOAD=
|
unset LD_PRELOAD
|
||||||
SCRIPT_DIR=`dirname $0`
|
SCRIPT_DIR=`dirname $0`
|
||||||
cd $SCRIPT_DIR/../
|
cd $SCRIPT_DIR/../
|
||||||
SCRIPT_DIR=`pwd`
|
SCRIPT_DIR=`pwd`
|
||||||
|
|
|
@ -11,7 +11,7 @@
|
||||||
set +e
|
set +e
|
||||||
#set -x
|
#set -x
|
||||||
|
|
||||||
export LD_PRELOAD=
|
unset LD_PRELOAD
|
||||||
UNAME_BIN=`which uname`
|
UNAME_BIN=`which uname`
|
||||||
OS_TYPE=`$UNAME_BIN`
|
OS_TYPE=`$UNAME_BIN`
|
||||||
|
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
set +e
|
set +e
|
||||||
#set -x
|
#set -x
|
||||||
|
|
||||||
export LD_PRELOAD=
|
unset LD_PRELOAD
|
||||||
UNAME_BIN=`which uname`
|
UNAME_BIN=`which uname`
|
||||||
OS_TYPE=`$UNAME_BIN`
|
OS_TYPE=`$UNAME_BIN`
|
||||||
|
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
set +e
|
set +e
|
||||||
#set -x
|
#set -x
|
||||||
|
|
||||||
export LD_PRELOAD=
|
unset LD_PRELOAD
|
||||||
UNAME_BIN=`which uname`
|
UNAME_BIN=`which uname`
|
||||||
OS_TYPE=`$UNAME_BIN`
|
OS_TYPE=`$UNAME_BIN`
|
||||||
|
|
||||||
|
|
|
@ -69,10 +69,11 @@ echo "ExcuteCmd:" $*
|
||||||
AsanFile=$ASAN_DIR/psim.asan
|
AsanFile=$ASAN_DIR/psim.asan
|
||||||
echo "AsanFile:" $AsanFile
|
echo "AsanFile:" $AsanFile
|
||||||
|
|
||||||
|
unset LD_PRELOAD
|
||||||
export LD_PRELOAD=libasan.so.5
|
export LD_PRELOAD=libasan.so.5
|
||||||
$* -a 2> $AsanFile
|
$* -a 2> $AsanFile
|
||||||
|
|
||||||
export LD_PRELOAD=
|
unset LD_PRELOAD
|
||||||
AsanFileLen=`cat $AsanFile | wc -l`
|
AsanFileLen=`cat $AsanFile | wc -l`
|
||||||
while [ $AsanFileLen -lt 10 ]
|
while [ $AsanFileLen -lt 10 ]
|
||||||
do
|
do
|
Loading…
Reference in New Issue