From 40b2d3673b29081bdbffb036d1069058804edf28 Mon Sep 17 00:00:00 2001 From: Shengliang Guan Date: Sun, 20 Nov 2022 15:04:44 +0800 Subject: [PATCH] test: python asan --- tests/parallel_test/cases.task | 6 +++--- tests/pytest/util/log.py | 2 +- tests/system-test/test.sh | 7 ++++--- 3 files changed, 8 insertions(+), 7 deletions(-) diff --git a/tests/parallel_test/cases.task b/tests/parallel_test/cases.task index a43859ebfa..e1b7f9cb32 100644 --- a/tests/parallel_test/cases.task +++ b/tests/parallel_test/cases.task @@ -278,7 +278,7 @@ ,,y,script,./test.sh -f tsim/stable/values.sim ,,y,script,./test.sh -f tsim/stable/vnode3.sim ,,y,script,./test.sh -f tsim/stable/metrics_idx.sim -,,n,script,./test.sh -f tsim/sma/drop_sma.sim +,,y,script,./test.sh -f tsim/sma/drop_sma.sim ,,y,script,./test.sh -f tsim/sma/tsmaCreateInsertQuery.sim ,,y,script,./test.sh -f tsim/sma/rsmaCreateInsertQuery.sim ,,y,script,./test.sh -f tsim/sma/rsmaPersistenceRecovery.sim @@ -438,11 +438,11 @@ ,,,system-test,python3 ./test.py -f 1-insert/database_pre_suf.py ,,,system-test,python3 ./test.py -f 1-insert/InsertFuturets.py ,,,system-test,python3 ./test.py -f 0-others/show.py -,,,system-test,python3 ./test.py -f 2-query/abs.py +,,,system-test,./test.sh python3 ./test.py -f 2-query/abs.py ,,,system-test,python3 ./test.py -f 2-query/abs.py -R ,,,system-test,python3 ./test.py -f 2-query/and_or_for_byte.py ,,,system-test,python3 ./test.py -f 2-query/and_or_for_byte.py -R -,,,system-test,python3 ./test.py -f 2-query/apercentile.py +,,,system-test,./test.sh python3 ./test.py -f 2-query/apercentile.py ,,,system-test,python3 ./test.py -f 2-query/apercentile.py -R ,,,system-test,python3 ./test.py -f 2-query/arccos.py ,,,system-test,python3 ./test.py -f 2-query/arccos.py -R diff --git a/tests/pytest/util/log.py b/tests/pytest/util/log.py index a132178308..000c907ea4 100644 --- a/tests/pytest/util/log.py +++ b/tests/pytest/util/log.py @@ -33,7 +33,7 @@ class TDLog: print("\033[1;36m%s %s\033[0m" % (datetime.datetime.now(), err)) def success(self, info): - print("\033[1;32m%s %s\033[0m" % (datetime.datetime.now(), info)) + printf("\033[1;32m%s %s\033[0m" % (datetime.datetime.now(), info)) def notice(self, err): print("\033[1;33m%s %s\033[0m" % (datetime.datetime.now(), err)) diff --git a/tests/system-test/test.sh b/tests/system-test/test.sh index 2a3187e641..bba6552fab 100755 --- a/tests/system-test/test.sh +++ b/tests/system-test/test.sh @@ -68,15 +68,16 @@ ulimit -c unlimited #sudo sysctl -w kernel.core_pattern=$TOP_DIR/core.%p.%e echo "ExcuteCmd:" $* -echo "AsanDir:" $ASAN_DIR/psim.asan +echo "AsanDir:" $ASAN_DIR/psim.info export LD_PRELOAD=libasan.so.5 -$* -a 2> $ASAN_DIR/psim.asan +$* -a 2> $ASAN_DIR/psim.info + result=$? echo "Execute result:" $result if [ $result -eq 0 ]; then - $CODE_DIR/sh/checkAsan.sh + $TOP_DIR/tests/script/sh/checkAsan.sh else exit 1 fi -- GitLab