From ba11ec08a878dc45cb267176f58bed9772045405 Mon Sep 17 00:00:00 2001 From: Richard T Bonhomme Date: Tue, 22 Mar 2022 23:05:34 +0000 Subject: [PATCH] Windows unit test: On error then exit with error Signed-off-by: Richard T Bonhomme --- wop_test.bat | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/wop_test.bat b/wop_test.bat index 2869a5c..35574dc 100644 --- a/wop_test.bat +++ b/wop_test.bat @@ -19,16 +19,19 @@ copy "%WORK_DIR%\distro\windows\EasyRSA-Start.bat" "%WORK_DIR%\easyrsa3\EasyRSA PATH=%PATH%;%WORK_DIR%\easyrsa3\bin;C:\PROGRA~1\openssl cmd /C "easyrsa3\bin\sh.exe wop_test.sh" -IF ERRORLEVEL 0 ( +IF ERRORLEVEL 1 ( + echo Error occurred, Exit 1 + exit /B 1 ) + +REM Success .. IF %SAVE_LAYOUT% EQU 0 ( echo rmdir /S /Q "%WORK_DIR%\easyrsa3\bin" rmdir /S /Q "%WORK_DIR%\easyrsa3\bin" echo del /Q "%WORK_DIR%\easyrsa3\EasyRSA-Start.bat" del /Q "%WORK_DIR%\easyrsa3\EasyRSA-Start.bat" - echo rm "%WORK_DIR%\easyrsa3\.rnd" - rm "%WORK_DIR%\easyrsa3\.rnd" + REM echo del "%WORK_DIR%\easyrsa3\.rnd" + REM del /Q "%WORK_DIR%\easyrsa3\.rnd" ) ELSE echo NOTICE; Saved Layout -) ELSE echo Error occurred, no clean up set SAVE_LAYOUT= set SYS_ARCH=