tools: run-tests

This commit is contained in:
Bill Zissimopoulos 2016-05-20 21:14:11 -07:00
parent 3935372956
commit 0412fac588
2 changed files with 57 additions and 8 deletions

View File

@ -20,11 +20,4 @@ build_script:
test_script: test_script:
- for %%f in ("build\VStudio\build\%CONFIGURATION%\winfsp-*.msi") do start /wait msiexec /i %%f /qn INSTALLLEVEL=1000 - for %%f in ("build\VStudio\build\%CONFIGURATION%\winfsp-*.msi") do start /wait msiexec /i %%f /qn INSTALLLEVEL=1000
- - tools\run-tests.bat %CONFIGURATION%
- appveyor AddTest winfsp-tests-x64 -Outcome Running
- build\VStudio\build\%CONFIGURATION%\winfsp-tests-x64.exe
- appveyor UpdateTest winfsp-tests-x64 -Outcome Passed
-
- appveyor AddTest winfsp-tests-x86 -Outcome Running
- build\VStudio\build\%CONFIGURATION%\winfsp-tests-x86.exe
- appveyor UpdateTest winfsp-tests-x86 -Outcome Passed

56
tools/run-tests.bat Normal file
View File

@ -0,0 +1,56 @@
@echo off
setlocal
set Configuration=Release
if not X%1==X set Configuration=%1
cd %~dp0..\build\VStudio
if not exist build\%Configuration% (
echo === No tests found 1>&2
goto fail
)
cd build\%Configuration%
set testpass=0
set testfail=0
for %%f in (winfsp-tests-x64 winfsp-tests-x86 :winfstest) do (
echo === Running %%f
if defined APPVEYOR (
appveyor AddTest "%%f" -FileName None -Framework None -Outcome Running
)
call %%f
if errorlevel 1 (
set /a testfail=testfail+1
echo === Failed %%f
if defined APPVEYOR (
appveyor UpdateTest "%%f" -FileName None -Framework None -Outcome Passed -Duration 0
)
) else (
set /a testpass=testpass+1
echo === Passed %%f
if defined APPVEYOR (
appveyor UpdateTest "%%f" -FileName None -Framework None -Outcome Failed -Duration 0
)
)
echo:
)
set /a total=testpass+testfail
echo === Total: %testpass%/%total%
if not %testfail%==0 goto fail
exit /b 0
:fail
exit /b 1
:winfstest
exit /b 0