diff --git a/tests/script/test-all.bat b/tests/script/test-all.bat index 81c1f21c04..1c698449c6 100644 --- a/tests/script/test-all.bat +++ b/tests/script/test-all.bat @@ -19,7 +19,7 @@ for /F "usebackq tokens=*" %%i in (!caseFile!) do ( call :GetTimeSeconds !time! set time1=!_timeTemp! echo Start at !time! - call !line:./test.sh=wtest.bat! > result_!a!.txt 2>error_!a!.txt + call !line:./test.sh=wtest.bat! > result_!a!.txt 2>error_!a!.txt || set /a errorlevel=8 if errorlevel 1 ( call :colorEcho 0c "failed" &echo. && set /a exitNum=8 && echo %%i >>failed.txt ) else ( call :colorEcho 0a "Success" &echo. ) ) ) diff --git a/tests/script/wtest.bat b/tests/script/wtest.bat index 79daf01295..25c344577a 100644 --- a/tests/script/wtest.bat +++ b/tests/script/wtest.bat @@ -56,8 +56,14 @@ echo charset UTF-8 >> %TAOS_CFG% set "FILE_NAME=testSuite.sim" if "%1" == "-f" set "FILE_NAME=%2" +set FILE_NAME=%FILE_NAME:/=\% + +start cmd /k "timeout /t 600 && taskkill /f /im tsim.exe & exit /b" rem echo FILE_NAME: %FILE_NAME% echo ExcuteCmd: %tsim% -c %CFG_DIR% -f %FILE_NAME% +set result=false +%TSIM% -c %CFG_DIR% -f %FILE_NAME% && set result=true -%TSIM% -c %CFG_DIR% -f %FILE_NAME% \ No newline at end of file +tasklist | grep timeout && taskkill /f /im timeout.exe +if "%result%" == "true" ( exit /b ) else ( exit /b 8 ) \ No newline at end of file