diff --git a/Jenkinsfile b/Jenkinsfile index 7d6fc45bf10ae59ed84a9af8494c6d9cb4dadf16..25251338b5658db7ac5f4f406c01bedc11994fa3 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -459,10 +459,12 @@ pipeline { agent{label "win"} steps{ pre_test_win() - bat''' - cd C:\\workspace\\TDinternal\\community\\tests\\pytest - test-all.bat CrashGen - ''' + catchError(buildResult: 'FAILURE', stageResult: 'FAILURE') { + bat''' + 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 1b9b976c2752d6961f2d816e82f4828a4d17f25e..1f1e2c1727527e91f7632213992607d6221eac85 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 3 ) else ( call :colorEcho 0a "Success" &echo. ) + if errorlevel 1 ( call :colorEcho 0c "failed" &echo. && exit 8 ) else ( call :colorEcho 0a "Success" &echo. ) ) exit