未验证 提交 b5b5bf46 编写于 作者: H Hui Li 提交者: GitHub

Merge pull request #7053 from taosdata/test/jenkins_l

update local CI
def pre_test(){
sh '''
sudo rmtaos||echo 'no taosd installed'
'''
sh '''
cd ${WKC}
git reset --hard
git checkout $BRANCH_NAME
git pull
git submodule update
cd ${WK}
git reset --hard
git checkout $BRANCH_NAME
git pull
export TZ=Asia/Harbin
date
rm -rf ${WK}/debug
mkdir debug
cd debug
cmake -DMEMORY_SANITIZER=true .. > /dev/null
make > /dev/null
make install > /dev/null
pip3 install ${WKC}/src/connector/python
'''
return 1
}
def pre_test_p(){
sh '''
sudo rmtaos||echo 'no taosd installed'
'''
......@@ -39,7 +66,7 @@ pipeline {
stage('pytest') {
agent{label 'slad1'}
steps {
pre_test()
pre_test_p()
sh '''
cd ${WKC}/tests
find pytest -name '*'sql|xargs rm -rf
......@@ -48,7 +75,7 @@ pipeline {
}
}
stage('test_b1') {
agent{label 'master'}
agent{label 'slad2'}
steps {
pre_test()
......@@ -62,7 +89,7 @@ pipeline {
}
stage('test_crash_gen') {
agent{label "slad2"}
agent{label "slad3"}
steps {
pre_test()
sh '''
......@@ -92,7 +119,7 @@ pipeline {
}
sh'''
systemctl start taosd
nohup taosd >/dev/null &
sleep 10
'''
catchError(buildResult: 'SUCCESS', stageResult: 'FAILURE') {
......@@ -128,7 +155,7 @@ pipeline {
'''
}
sh '''
systemctl stop taosd
pkill -9 taosd
cd ${WKC}/tests
./test-all.sh b2
date
......@@ -141,7 +168,7 @@ pipeline {
}
stage('test_valgrind') {
agent{label "slad3"}
agent{label "slad4"}
steps {
pre_test()
......
def pre_test(){
sh '''
sudo rmtaos||echo 'no taosd installed'
'''
sh '''
cd ${WKC}
git reset --hard
git checkout $BRANCH_NAME
git pull
git submodule update
cd ${WK}
git reset --hard
git checkout $BRANCH_NAME
git pull
export TZ=Asia/Harbin
date
rm -rf ${WK}/debug
mkdir debug
cd debug
cmake -DMEMORY_SANITIZER=true .. > /dev/null
make > /dev/null
make install > /dev/null
pip3 install ${WKC}/src/connector/python/ || echo 0
'''
return 1
}
def pre_test_p(){
sh '''
sudo rmtaos||echo 'no taosd installed'
'''
......@@ -39,7 +66,7 @@ pipeline {
stage('pytest') {
agent{label 'slam1'}
steps {
pre_test()
pre_test_p()
sh '''
cd ${WKC}/tests
find pytest -name '*'sql|xargs rm -rf
......@@ -92,7 +119,7 @@ pipeline {
}
sh'''
systemctl start taosd
nohup taosd >/dev/null &
sleep 10
'''
catchError(buildResult: 'SUCCESS', stageResult: 'FAILURE') {
......@@ -136,7 +163,7 @@ pipeline {
'''
}
sh '''
systemctl stop taosd
pkill -9 taosd
cd ${WKC}/tests
./test-all.sh b2
date
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册