ci: allow to run specified cases in windows full test

This commit is contained in:
tangfangzhi 2022-06-16 15:28:52 +08:00
parent 0ac7df1969
commit 855f1842c2
1 changed files with 8 additions and 3 deletions

View File

@ -5,7 +5,12 @@ set /a a=0
if %1 == full ( if %1 == full (
echo Windows Taosd Full Test echo Windows Taosd Full Test
set /a exitNum=0 set /a exitNum=0
for /F "usebackq tokens=*" %%i in (fulltest.bat) do ( del /Q /F failed.txt
set caseFile="fulltest.bat"
if not "%2" == "" (
set caseFile="%2"
)
for /F "usebackq tokens=*" %%i in (!caseFile!) do (
for /f "tokens=1* delims= " %%a in ("%%i") do if not "%%a" == "@REM" ( for /f "tokens=1* delims= " %%a in ("%%i") do if not "%%a" == "@REM" (
set /a a+=1 set /a a+=1
echo !a! Processing %%i echo !a! Processing %%i
@ -13,7 +18,7 @@ if %1 == full (
set time1=!_timeTemp! set time1=!_timeTemp!
echo Start at !time! echo Start at !time!
call %%i ARG1 > result_!a!.txt 2>error_!a!.txt call %%i ARG1 > result_!a!.txt 2>error_!a!.txt
if errorlevel 1 ( call :colorEcho 0c "failed" &echo. && set /a exitNum=8 ) else ( call :colorEcho 0a "Success" &echo. ) if errorlevel 1 ( call :colorEcho 0c "failed" &echo. && set /a exitNum=8 && echo %%i >>failed.txt ) else ( call :colorEcho 0a "Success" &echo. )
) )
) )
exit !exitNum! exit !exitNum!
@ -77,4 +82,4 @@ for %%a in (%tt%) do (
set /a index=index+1 set /a index=index+1
) )
set /a _timeTemp=(%hh%*60+%mm%)*60+%ss% set /a _timeTemp=(%hh%*60+%mm%)*60+%ss%
goto :eof goto :eof