From 3f8e90670f3699905331336824dfc64ab63e1205 Mon Sep 17 00:00:00 2001 From: liuyq-617 Date: Tue, 16 Mar 2021 16:10:54 +0800 Subject: [PATCH] [TD-3326]backup taos after taos coredump --- tests/test-all.sh | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/tests/test-all.sh b/tests/test-all.sh index db9d6523a0..b91440c7c6 100755 --- a/tests/test-all.sh +++ b/tests/test-all.sh @@ -24,11 +24,14 @@ function stopTaosd { function dohavecore(){ corefile=`find $corepath -mmin 1` + proc=`echo $corefile|cut -d "_" -f2` if [ -n "$corefile" ];then - echo 'taosd or taos has generated core' - if [[ $1 == 1 ]];then - exit 8 - fi + echo 'taosd or taos has generated core' + echo '\n'|gdb /usr/local/taos/bin/$proc $corepath/$corefile -ex "bt 10" -ex quit + tar zcvf $corepath/taos_`date "+%Y_%m_%d_%H:%M:%S"`.tar.gz /usr/local/taos + if [[ $1 == 1 ]];then + exit 8 + fi fi } function runSimCaseOneByOne { -- GitLab