tetst:add memory leak detection for TD in psiminfo to the CI

This commit is contained in:
chenhaoran 2024-08-23 10:50:57 +08:00
parent cf839189aa
commit 505ba64029
1 changed files with 4 additions and 2 deletions

View File

@ -49,6 +49,7 @@ fi
indirect_leak=$(cat ${LOG_DIR}/*.asan | grep "Indirect leak" | wc -l) indirect_leak=$(cat ${LOG_DIR}/*.asan | grep "Indirect leak" | wc -l)
python_error=$(cat ${LOG_DIR}/*.info | grep -w "stack" | wc -l) python_error=$(cat ${LOG_DIR}/*.info | grep -w "stack" | wc -l)
python_taos_error=$(cat ${LOG_DIR}/*.info | grep -w "TDinternal" | wc -l)
# ignore # ignore
@ -84,15 +85,16 @@ echo -e "\033[44;32;1m"asan memory_leak: $memory_leak"\033[0m"
echo -e "\033[44;32;1m"asan indirect_leak: $indirect_leak"\033[0m" echo -e "\033[44;32;1m"asan indirect_leak: $indirect_leak"\033[0m"
echo -e "\033[44;32;1m"asan runtime error: $runtime_error"\033[0m" echo -e "\033[44;32;1m"asan runtime error: $runtime_error"\033[0m"
echo -e "\033[44;32;1m"asan python error: $python_error"\033[0m" echo -e "\033[44;32;1m"asan python error: $python_error"\033[0m"
echo -e "\033[44;32;1m"asan python taos error: $python_taos_error"\033[0m"
let "errors=$error_num+$memory_leak+$indirect_leak+$runtime_error+$python_error" let "errors=$error_num+$memory_leak+$indirect_leak+$runtime_error+$python_error+$python_taos_error"
if [ $errors -eq 0 ]; then if [ $errors -eq 0 ]; then
echo -e "\033[44;32;1m"no asan errors"\033[0m" echo -e "\033[44;32;1m"no asan errors"\033[0m"
exit 0 exit 0
else else
echo -e "\033[44;31;1m"asan total errors: $errors"\033[0m" echo -e "\033[44;31;1m"asan total errors: $errors"\033[0m"
if [ $python_error -ne 0 ]; then if [ $python_error -ne 0 ] || [ $python_taos_error -ne 0 ] ; then
cat ${LOG_DIR}/*.info cat ${LOG_DIR}/*.info
fi fi
cat ${LOG_DIR}/*.asan cat ${LOG_DIR}/*.asan