From 7a0228dc1f11be629c69c7fa556abf875e6ababa Mon Sep 17 00:00:00 2001 From: liuyq-617 Date: Tue, 14 Sep 2021 16:40:08 +0800 Subject: [PATCH] update jenkins --- Jenkinsfile | 14 ++++++++++++-- tests/pytest/test-all.bat | 2 +- 2 files changed, 13 insertions(+), 3 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index dfe9970892..7d6fc45bf1 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -1,4 +1,5 @@ import hudson.model.Result +import hudson.model.*; import jenkins.model.CauseOfInterruption properties([pipelineTriggers([githubPush()])]) node { @@ -6,6 +7,7 @@ node { } def skipbuild=0 +def win_stop=0 def abortPreviousBuilds() { def currentJobName = env.JOB_NAME @@ -446,8 +448,12 @@ pipeline { agent{label " crashgen "} steps { pre_test() - sleep 600 - } + script{ + while(win_stop == 0){ + sleep(1) + } + } + } } stage('test'){ agent{label "win"} @@ -457,6 +463,10 @@ pipeline { cd C:\\workspace\\TDinternal\\community\\tests\\pytest test-all.bat CrashGen ''' + script{ + win_stop=1 + println win_stop + } } } diff --git a/tests/pytest/test-all.bat b/tests/pytest/test-all.bat index dd3ef92535..1b9b976c27 100644 --- a/tests/pytest/test-all.bat +++ b/tests/pytest/test-all.bat @@ -4,7 +4,7 @@ for /F "tokens=1,2 delims=#" %%a in ('"prompt #$H#$E# & echo on & for %%b in (1) for /F "usebackq tokens=*" %%i in (fulltest.bat) do ( echo Processing %%i call %%i ARG1 -w 1 -m %1 > result.txt 2>error.txt - if errorlevel 1 ( call :colorEcho 0c "failed" &echo. && exit /b ) else ( call :colorEcho 0a "Success" &echo. ) + if errorlevel 1 ( call :colorEcho 0c "failed" &echo. && exit 3 ) else ( call :colorEcho 0a "Success" &echo. ) ) exit -- GitLab