Added autotest log file support for Windows

This commit is contained in:
Rob Falgout 2019-06-21 07:27:57 -07:00
parent 4b94dac55d
commit 66f2c931e0
2 changed files with 8 additions and 1 deletions

View File

@ -60,7 +60,7 @@ type NUL > cmake.err
for %%f in (%outdir%\*.out) do (
set sum=0
for /f "tokens=1" %%i in ('findstr "Error(s)" %%f') do set /a sum+=%%i
if %sum% gtr 0 @echo %%f > cmake.err
if %sum% gtr 0 @echo %%f >> cmake.err
)
cd %rundir%

View File

@ -19,6 +19,9 @@ set srcdir=%cd%
rem output directory is a subdirectory of rundir
set outdir=%rundir%\machine-vs-pro.dir
rem autotest log file
set logfile=%rundir%\autotest-machine-vs-pro.log
rem create clean output directory
if exist %outdir% rmdir /s /q %outdir%
mkdir %outdir%
@ -27,6 +30,8 @@ rem run the cmake.bat script from rundir in a subshell to avoid overwriting vari
rem (i.e., use 'cmd /c')
cd %rundir%
@echo Test started at %time% on %date% > %logfile%
cmd /c %scriptdir%\cmake.bat %srcdir% " "
move %rundir%\cmake.dir %outdir%\cmake-default.dir
move %rundir%\cmake.err %outdir%\cmake-default.err
@ -50,6 +55,8 @@ for %%f in (%outdir%\*.err) do (
if %%~zf gtr 0 @echo %%f >> machine-vs-pro.err
)
@echo Test finished at %time% on %date% >> %logfile%
cd %rundir%
endlocal