diff --git a/tests/pytest/crash_gen.sh b/tests/pytest/crash_gen.sh index bbd5d231085df3f7d47761c16b49e47958ceaa9d..23fb3f155af9706e580065a5dcb368a1aed23ebc 100755 --- a/tests/pytest/crash_gen.sh +++ b/tests/pytest/crash_gen.sh @@ -42,6 +42,10 @@ TAOSD_DIR=`find $TAOS_DIR -name "taosd"|grep bin|head -n1` LIB_DIR=`echo $TAOSD_DIR|rev|cut -d '/' -f 3,4,5,6|rev`/lib +# Now getting ready to execute Python +# The following is the default of our standard dev env (Ubuntu 20.04), modify/adjust at your own risk +PYTHON_EXEC=python3.8 + # First we need to set up a path for Python to find our own TAOS modules, so that "import" can work. export PYTHONPATH=$(pwd)/../../src/connector/python/linux/python3:$(pwd) @@ -57,9 +61,15 @@ if [[ $1 == '--valgrind' ]]; then valgrind \ --leak-check=yes \ --suppressions=crash_gen/valgrind_taos.supp \ - python3.8 \ + $PYTHON_EXEC \ + ./crash_gen/crash_gen.py $@ +elif [[ $1 == '--helgrind' ]]; then + shift + valgrind \ + --tool=helgrind \ + $PYTHON_EXEC \ ./crash_gen/crash_gen.py $@ else - python3.8 ./crash_gen/crash_gen.py $@ + $PYTHON_EXEC ./crash_gen/crash_gen.py $@ fi diff --git a/tests/pytest/crash_gen/crash_gen.py b/tests/pytest/crash_gen/crash_gen.py index e024eb7494bb8a45e443691947d9dee04e1ab288..d15f264fb63ae7c7fbf208d9cab2d3a0dc2273dd 100755 --- a/tests/pytest/crash_gen/crash_gen.py +++ b/tests/pytest/crash_gen/crash_gen.py @@ -421,6 +421,7 @@ class ThreadCoordinator: errno2 = Helper.convertErrno(err.errno) # correct error scheme errMsg = "Transition failed: errno=0x{:X}, msg: {}".format(errno2, err) logger.info(errMsg) + traceback.print_exc() self._execStats.registerFailure(errMsg) # Then we move on to the next step