未验证 提交 730d7c65 编写于 作者: H huili 提交者: GitHub

Merge pull request #5694 from taosdata/test/jenkins

[TD-3671]<test>change target branch
...@@ -50,7 +50,16 @@ def pre_test(){ ...@@ -50,7 +50,16 @@ def pre_test(){
git clean -dfx git clean -dfx
cd ${WK} cd ${WK}
git reset --hard HEAD~10 git reset --hard HEAD~10
git checkout develop '''
script {
if (env.CHANGE_TARGET == 'master') {
sh 'git checkout master'
}
else {
sh 'git checkout develop'
}
}
sh '''
git pull >/dev/null git pull >/dev/null
cd ${WK} cd ${WK}
export TZ=Asia/Harbin export TZ=Asia/Harbin
...@@ -92,7 +101,8 @@ pipeline { ...@@ -92,7 +101,8 @@ pipeline {
git pull git pull
git fetch origin +refs/pull/${CHANGE_ID}/merge git fetch origin +refs/pull/${CHANGE_ID}/merge
git checkout -qf FETCH_HEAD git checkout -qf FETCH_HEAD
''' '''
script{ script{
env.skipstage=sh(script:"cd ${WORKSPACE}.tes && git --no-pager diff --name-only FETCH_HEAD develop|grep -v -E '.*md|//src//connector|Jenkinsfile|test-all.sh' || echo 0 ",returnStdout:true) env.skipstage=sh(script:"cd ${WORKSPACE}.tes && git --no-pager diff --name-only FETCH_HEAD develop|grep -v -E '.*md|//src//connector|Jenkinsfile|test-all.sh' || echo 0 ",returnStdout:true)
} }
...@@ -185,14 +195,12 @@ pipeline { ...@@ -185,14 +195,12 @@ pipeline {
rm -rf /var/log/taos/* rm -rf /var/log/taos/*
./handle_crash_gen_val_log.sh ./handle_crash_gen_val_log.sh
''' '''
catchError(buildResult: 'SUCCESS', stageResult: 'FAILURE') { sh '''
sh ''' cd ${WKC}/tests/pytest
cd ${WKC}/tests/pytest rm -rf /var/lib/taos/*
rm -rf /var/lib/taos/* rm -rf /var/log/taos/*
rm -rf /var/log/taos/* ./handle_taosd_val_log.sh
./handle_taosd_val_log.sh '''
'''
}
timeout(time: 45, unit: 'MINUTES'){ timeout(time: 45, unit: 'MINUTES'){
sh ''' sh '''
date date
......
#!/bin/bash #!/bin/bash
# This is the script for us to try to cause the TDengine server or client to crash # This is the script for us to try to cause the TDengine server or client to crash
# #
......
...@@ -21,7 +21,7 @@ rm -rf /var/lib/taos/* ...@@ -21,7 +21,7 @@ rm -rf /var/lib/taos/*
nohup valgrind --leak-check=yes $TAOSD_DIR > $TDIR/$VALGRIND_OUT 2> $TDIR/$VALGRIND_ERR & nohup valgrind --leak-check=yes $TAOSD_DIR > $TDIR/$VALGRIND_OUT 2> $TDIR/$VALGRIND_ERR &
sleep 20 sleep 20
cd - cd -
./crash_gen.sh -p -t 10 -s 200 ./crash_gen.sh -p -t 10 -s 1000
ps -ef |grep valgrind|grep -v grep|awk '{print $2}'|xargs kill -term ps -ef |grep valgrind|grep -v grep|awk '{print $2}'|xargs kill -term
while true while true
do do
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册