2020-04-11 01:15:57 +02:00
|
|
|
@REM $Id: test_tests.bat,v 1.7 2019/11/25 12:44:43 gilles Exp gilles $
|
2015-05-28 19:04:57 +02:00
|
|
|
|
2016-09-19 17:17:24 +02:00
|
|
|
@SETLOCAL
|
|
|
|
@ECHO OFF
|
2015-05-28 19:04:57 +02:00
|
|
|
|
2016-09-19 17:17:24 +02:00
|
|
|
ECHO Currently running through %0 %*
|
|
|
|
|
|
|
|
CD /D %~dp0
|
|
|
|
|
|
|
|
REM Remove the error file because its existence means an error occured during this script execution
|
|
|
|
IF EXIST LOG_bat\%~nx0.txt DEL LOG_bat\%~nx0.txt
|
|
|
|
|
|
|
|
CALL :handle_error perl .\imapsync --justbanner
|
|
|
|
CALL :handle_error perl .\imapsync --testsdebug
|
|
|
|
CALL :handle_error perl .\imapsync --tests
|
2015-05-28 19:04:57 +02:00
|
|
|
|
2015-08-04 03:44:40 +02:00
|
|
|
@REM @PAUSE
|
2016-09-19 17:17:24 +02:00
|
|
|
@ENDLOCAL
|
2019-07-03 01:25:47 +02:00
|
|
|
@REM Do a PAUSE if run by double-click, aka, explorer (then ). No PAUSE in a DOS window or via ssh.
|
|
|
|
IF %0 EQU "%~dpnx0" IF "%SSH_CLIENT%"=="" PAUSE
|
2016-09-19 17:17:24 +02:00
|
|
|
@EXIT /B
|
|
|
|
|
|
|
|
|
|
|
|
:handle_error
|
|
|
|
SETLOCAL
|
|
|
|
ECHO IN %0 with parameters %*
|
|
|
|
%*
|
|
|
|
SET CMD_RETURN=%ERRORLEVEL%
|
|
|
|
|
|
|
|
IF %CMD_RETURN% EQU 0 (
|
|
|
|
ECHO GOOD END
|
|
|
|
) ELSE (
|
|
|
|
ECHO BAD END
|
|
|
|
IF NOT EXIST LOG_bat MKDIR LOG_bat
|
|
|
|
ECHO Failure running %* >> LOG_bat\%~nx0.txt
|
|
|
|
)
|
|
|
|
ENDLOCAL
|
|
|
|
EXIT /B
|
|
|
|
|