diff --git a/Jenkinsfile b/Jenkinsfile index e7603b578b..68fe4879c1 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -42,15 +42,15 @@ def pre_test(){ cd ${WKC} git checkout develop git reset --hard HEAD~10 >/dev/null - git pull + git pull >/dev/null git fetch origin +refs/pull/${CHANGE_ID}/merge git checkout -qf FETCH_HEAD - git --no-pager diff --name-only FETCH_HEAD $(git merge-base FETCH_HEAD develop)|grep -v -E '.*md|//src//connector|Jenkinsfile' || exit 0 + git --no-pager diff --name-only FETCH_HEAD $(git merge-base FETCH_HEAD develop)|grep -v -E '.*md|//src//connector|Jenkinsfile' find ${WKC}/tests/pytest -name \'*\'.sql -exec rm -rf {} \\; cd ${WK} git reset --hard HEAD~10 - git checkout develop - git pull + git checkout develop + git pull >/dev/null cd ${WK} export TZ=Asia/Harbin date diff --git a/tests/test-all.sh b/tests/test-all.sh index db9d6523a0..bda03191d1 100755 --- a/tests/test-all.sh +++ b/tests/test-all.sh @@ -24,11 +24,16 @@ function stopTaosd { function dohavecore(){ corefile=`find $corepath -mmin 1` + core_file=`echo $corefile|cut -d " " -f2` + echo $core_file + proc=`echo $corefile|cut -d "_" -f3` 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' + tar -zcvPf $corepath'taos_'`date "+%Y_%m_%d_%H_%M_%S"`.tar.gz /usr/local/taos/ + if [[ $1 == 1 ]];then + echo '\n'|gdb /usr/local/taos/bin/$proc $core_file -ex "bt 10" -ex quit + exit 8 + fi fi } function runSimCaseOneByOne {