未验证 提交 89197888 编写于 作者: Y Yiqing Liu 提交者: GitHub

[TD-5783]<CI>add test for 2.0 branch (#7153)

* [TD-5783]<CI>add test for 2.0 branch

* fix

* fix
上级 f5a9b37c
...@@ -23,6 +23,7 @@ steps: ...@@ -23,6 +23,7 @@ steps:
branch: branch:
- develop - develop
- master - master
- 2.0
--- ---
kind: pipeline kind: pipeline
name: test_arm64 name: test_arm64
...@@ -48,6 +49,7 @@ steps: ...@@ -48,6 +49,7 @@ steps:
branch: branch:
- develop - develop
- master - master
- 2.0
--- ---
kind: pipeline kind: pipeline
name: test_arm name: test_arm
...@@ -73,6 +75,7 @@ steps: ...@@ -73,6 +75,7 @@ steps:
branch: branch:
- develop - develop
- master - master
- 2.0
--- ---
kind: pipeline kind: pipeline
...@@ -100,6 +103,7 @@ steps: ...@@ -100,6 +103,7 @@ steps:
branch: branch:
- develop - develop
- master - master
- 2.0
--- ---
kind: pipeline kind: pipeline
name: build_xenial name: build_xenial
...@@ -125,6 +129,7 @@ steps: ...@@ -125,6 +129,7 @@ steps:
branch: branch:
- develop - develop
- master - master
- 2.0
--- ---
kind: pipeline kind: pipeline
...@@ -150,6 +155,7 @@ steps: ...@@ -150,6 +155,7 @@ steps:
branch: branch:
- develop - develop
- master - master
- 2.0
--- ---
kind: pipeline kind: pipeline
name: build_centos7 name: build_centos7
...@@ -173,6 +179,7 @@ steps: ...@@ -173,6 +179,7 @@ steps:
branch: branch:
- develop - develop
- master - master
- 2.0
--- ---
kind: pipeline kind: pipeline
...@@ -191,6 +198,7 @@ steps: ...@@ -191,6 +198,7 @@ steps:
branch: branch:
- develop - develop
- master - master
- 2.0
depends_on: depends_on:
......
...@@ -41,6 +41,7 @@ def pre_test(){ ...@@ -41,6 +41,7 @@ def pre_test(){
sh ''' sh '''
killall -9 taosd ||echo "no taosd running" killall -9 taosd ||echo "no taosd running"
killall -9 gdb || echo "no gdb running" killall -9 gdb || echo "no gdb running"
killall -9 python3.8 || echo "no python program running"
cd ${WKC} cd ${WKC}
git reset --hard HEAD~10 >/dev/null git reset --hard HEAD~10 >/dev/null
''' '''
...@@ -51,12 +52,18 @@ def pre_test(){ ...@@ -51,12 +52,18 @@ def pre_test(){
git checkout master git checkout master
''' '''
} }
else { else if(env.CHANGE_TARGET == '2.0'){
sh ''' sh '''
cd ${WKC} cd ${WKC}
git checkout develop git checkout 2.0
''' '''
} }
else{
sh '''
cd ${WKC}
git checkout develop
'''
}
} }
sh''' sh'''
cd ${WKC} cd ${WKC}
...@@ -74,7 +81,13 @@ def pre_test(){ ...@@ -74,7 +81,13 @@ def pre_test(){
git checkout master git checkout master
''' '''
} }
else { else if(env.CHANGE_TARGET == '2.0'){
sh '''
cd ${WK}
git checkout 2.0
'''
}
else{
sh ''' sh '''
cd ${WK} cd ${WK}
git checkout develop git checkout develop
...@@ -223,24 +236,27 @@ pipeline { ...@@ -223,24 +236,27 @@ pipeline {
steps { steps {
pre_test() pre_test()
catchError(buildResult: 'SUCCESS', stageResult: 'FAILURE') { catchError(buildResult: 'SUCCESS', stageResult: 'FAILURE') {
sh ''' timeout(time: 60, unit: 'MINUTES'){
cd ${WKC}/tests/pytest sh '''
./crash_gen.sh -a -p -t 4 -s 2000 cd ${WKC}/tests/pytest
''' ./crash_gen.sh -a -p -t 4 -s 2000
'''
}
}
timeout(time: 60, unit: 'MINUTES'){
sh '''
cd ${WKC}/tests/pytest
rm -rf /var/lib/taos/*
rm -rf /var/log/taos/*
./handle_crash_gen_val_log.sh
'''
sh '''
cd ${WKC}/tests/pytest
rm -rf /var/lib/taos/*
rm -rf /var/log/taos/*
./handle_taosd_val_log.sh
'''
} }
sh '''
cd ${WKC}/tests/pytest
rm -rf /var/lib/taos/*
rm -rf /var/log/taos/*
./handle_crash_gen_val_log.sh
'''
sh '''
cd ${WKC}/tests/pytest
rm -rf /var/lib/taos/*
rm -rf /var/log/taos/*
./handle_taosd_val_log.sh
'''
timeout(time: 45, unit: 'MINUTES'){ timeout(time: 45, unit: 'MINUTES'){
sh ''' sh '''
date date
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册