From ca777655bcd7853ff72a072d24b017fb3d62b837 Mon Sep 17 00:00:00 2001 From: Gareth Rees Date: Mon, 15 Jul 2013 16:39:22 +0100 Subject: [PATCH] Improve reporting of test failures on windows, so that the continuous integration is helpful. Copied from Perforce Change: 183043 ServerID: perforce.ravenbrook.com --- mps/tool/testrun.bat | 26 +++++++++++++++++++++++--- 1 file changed, 23 insertions(+), 3 deletions(-) diff --git a/mps/tool/testrun.bat b/mps/tool/testrun.bat index 49a12660783..097fc2b7cdd 100755 --- a/mps/tool/testrun.bat +++ b/mps/tool/testrun.bat @@ -8,17 +8,37 @@ shift set VARIETY=%1 shift -set LOG=%TMP%\mps.%VARIETY%.log -echo Logging test output to %LOG% +set TEST_COUNT=0 +set PASS_COUNT=0 +set SEPARATOR=---------------------------------------- +set LOGDIR=%TMP%\mps-%VARIETY%-log +echo Logging test output to %LOGDIR% +rmdir /q /s %LOGDIR% +mkdir %LOGDIR% :loop if "%1"=="" goto continue + set /a TEST_COUNT=%TEST_COUNT%+1 echo Running %1 - %PFM%\%VARIETY%\%1 >> %LOG% + %PFM%\%VARIETY%\%1 > %LOGDIR%\%1 + if "%errorlevel%"=="0" goto success + echo %SEPARATOR%%SEPARATOR% + type %LOGDIR%\%1 + echo %SEPARATOR%%SEPARATOR% + set /a FAIL_COUNT=%FAIL_COUNT%+1 + :success shift goto loop :continue +if "%FAIL_COUNT%"=="0" goto allpass + echo Tests: %TEST_COUNT% Failures: %FAIL_COUNT% + exit 1 + +:allpass +echo Tests: %TEST_COUNT% All tests pass. + + @rem C. COPYRIGHT AND LICENSE @rem @rem Copyright (C) 2013 Ravenbrook Limited .