enh: windows python test init

This commit is contained in:
tangfangzhi 2022-06-01 14:54:31 +08:00
parent cc1582e6ef
commit 64879c45e2
1 changed files with 67 additions and 22 deletions

View File

@ -4,8 +4,8 @@ import jenkins.model.CauseOfInterruption
node { node {
} }
def skipbuild=0 win_test_stage = 0
def win_stop=0 linux_ready = 0
def abortPreviousBuilds() { def abortPreviousBuilds() {
def currentJobName = env.JOB_NAME def currentJobName = env.JOB_NAME
@ -248,7 +248,7 @@ def pre_test_build_win() {
''' '''
return 1 return 1
} }
def run_win_test() { def run_win_ctest() {
bat ''' bat '''
echo "windows ctest ..." echo "windows ctest ..."
time /t time /t
@ -257,6 +257,15 @@ def run_win_test() {
time /t time /t
''' '''
} }
def run_win_test() {
bat '''
echo "windows test ..."
time /t
cd C:\\workspace\\%EXECUTOR_NUMBER%\\TDinternal\\community\\tests\\system-test
echo "testing ..."
time /t
'''
}
pipeline { pipeline {
agent none agent none
@ -273,11 +282,22 @@ pipeline {
stage('windows test') { stage('windows test') {
agent{label " windows10_01 || windows10_02 || windows10_03 || windows10_04 "} agent{label " windows10_01 || windows10_02 || windows10_03 || windows10_04 "}
steps { steps {
catchError(buildResult: 'FAILURE', stageResult: 'FAILURE') {
timeout(time: 40, unit: 'MINUTES'){
pre_test_win() pre_test_win()
pre_test_build_win() pre_test_build_win()
run_win_ctest()
while(linux_ready == 0) {
sleep(8)
}
run_win_test() run_win_test()
} }
} }
script {
win_test_stage = 1
}
}
}
stage('linux test') { stage('linux test') {
agent{label " worker03 || slave215 || slave217 || slave219 "} agent{label " worker03 || slave215 || slave217 || slave219 "}
options { skipDefaultCheckout() } options { skipDefaultCheckout() }
@ -285,6 +305,7 @@ pipeline {
changeRequest() changeRequest()
} }
steps { steps {
catchError(buildResult: 'FAILURE', stageResult: 'FAILURE') {
timeout(time: 40, unit: 'MINUTES'){ timeout(time: 40, unit: 'MINUTES'){
pre_test() pre_test()
script { script {
@ -295,12 +316,36 @@ pipeline {
rm -f /tmp/cases.task rm -f /tmp/cases.task
./collect_cases.sh -e ./collect_cases.sh -e
''' '''
sh '''
echo "packaging ..."
date
cd ${WKC}/packaging
./release.sh -v cluster -n 3.0.0.100 -s static
cd ${WKC}/release
tar xzf TDengine-enterprise-server-3.0.0.100-Linux-x64.tar.gz
cd TDengine-enterprise-server
service taosd stop || :
rm -rf /var/lib/taos
./install.sh -e no
service taosd start
sleep 20
service taosd status
'''
script {
linux_ready = 1
}
sh ''' sh '''
cd ${WKC}/tests/parallel_test cd ${WKC}/tests/parallel_test
export DEFAULT_RETRY_TIME=2 export DEFAULT_RETRY_TIME=2
date date
timeout 2100 time ./run.sh -e -m /home/m.json -t /tmp/cases.task -b ${BRANCH_NAME}_${BUILD_ID} -l ${WKDIR}/log -o 480 timeout 2100 time ./run.sh -e -m /home/m.json -t /tmp/cases.task -b ${BRANCH_NAME}_${BUILD_ID} -l ${WKDIR}/log -o 480
''' '''
script {
while(win_test_stage == 0){
sleep(12)
}
}
}
} }
} }
} }