summaryrefslogtreecommitdiff
path: root/windows/run_tests.bat
diff options
context:
space:
mode:
authorChristoph M. Becker <cmbecker69@gmx.de>2017-01-25 13:37:39 +0100
committerChristoph M. Becker <cmbecker69@gmx.de>2017-01-25 13:37:39 +0100
commit1f136c5f169fafbbb017704724505370ae97c6ae (patch)
treeef8656dff91cd23e65c2ba69aa671a4482aae40d /windows/run_tests.bat
parentbe5a6457a8a4523b8b731244da34b2fadcd6fd8e (diff)
downloadlibgd-1f136c5f169fafbbb017704724505370ae97c6ae.tar.gz
Add test summary for Windows
Diffstat (limited to 'windows/run_tests.bat')
-rw-r--r--windows/run_tests.bat69
1 files changed, 42 insertions, 27 deletions
diff --git a/windows/run_tests.bat b/windows/run_tests.bat
index 9e9c5e4..bd73946 100644
--- a/windows/run_tests.bat
+++ b/windows/run_tests.bat
@@ -1,28 +1,43 @@
-@echo off
-setlocal EnableDelayedExpansion
-if [%PLATFORM%]==[] set PLATFORM=x86
-if [%PREFERREDTOOLARCHITECTURE%]==[x64] set PLATFORM=x64
-set PLATFORM=%PLATFORM:X=x%
-
-for /f %%T in (testlist.txt) do (
- set test=%%T
- set output=test: !test!....................................................................
- set target=%%~nT.exe
- if not exist !target! SET result=NotFound
- call !target! && (SET result=Passed) || (SET result=Failed)
-
- rem > last_test.out 2> last_test.err
- rem set /p testerr=<last_test.err
- rem set /p testout=<last_test.out
-
- echo !output:~0,70!!result!
-
- rem if defined testerr echo error: !testerr!
- rem if defined testout echo msg: !testout!
-
- if defined APPVEYOR (
- appveyor AddTest "!test! %PLATFORM%" -Outcome !result! -Framework Custom -Filename %%~nT.exe -Duration 0
- )
-)
-
+@echo off
+setlocal EnableDelayedExpansion
+if [%PLATFORM%]==[] set PLATFORM=x86
+if [%PREFERREDTOOLARCHITECTURE%]==[x64] set PLATFORM=x64
+set PLATFORM=%PLATFORM:X=x%
+
+set total=0
+set total_passed=0
+set total_failed=0
+set total_missing=0
+
+for /f %%T in (testlist.txt) do (
+ set test=%%T
+ set output=test: !test!....................................................................
+ set target=%%~nT.exe
+ if not exist !target! SET result=NotFound
+ call !target! && (SET result=Passed) || (SET result=Failed)
+
+ rem > last_test.out 2> last_test.err
+ rem set /p testerr=<last_test.err
+ rem set /p testout=<last_test.out
+
+ echo !output:~0,70!!result!
+
+ rem if defined testerr echo error: !testerr!
+ rem if defined testout echo msg: !testout!
+
+ set /a total=total+1
+ if "!result!"=="Passed" set /a total_passed=total_passed+1
+ if "!result!"=="Failed" set /a total_failed=total_failed+1
+ if "!result!"=="NotFound" set /a total_missing=total_missing+1
+
+ if defined APPVEYOR (
+ appveyor AddTest "!test! %PLATFORM%" -Outcome !result! -Framework Custom -Filename %%~nT.exe -Duration 0
+ )
+)
+echo.
+echo Tests: !total!
+echo Passed: !total_passed!
+echo Failed: !total_failed!
+echo Missing: !total_missing!
+
exit /b 0 \ No newline at end of file