2014-01-16 22:06:40 +01:00
|
|
|
@echo off
|
|
|
|
rem
|
|
|
|
rem A script for running the POCO testsuites.
|
|
|
|
rem
|
2014-01-17 00:02:45 +01:00
|
|
|
rem usage: runtests [64]
|
2014-01-16 22:06:40 +01:00
|
|
|
rem
|
|
|
|
rem If the environment variable EXCLUDE_TESTS is set, containing
|
|
|
|
rem a space-separated list of project names (as found in the
|
|
|
|
rem components file), these tests will be skipped.
|
|
|
|
rem
|
|
|
|
|
|
|
|
setlocal EnableDelayedExpansion
|
|
|
|
|
|
|
|
set TESTRUNNER=TestSuite.exe
|
2014-01-16 22:34:46 +01:00
|
|
|
set TESTRUNNERARGS=/B:TestSuite.out
|
2014-01-17 00:02:45 +01:00
|
|
|
set BINDIR=bin
|
|
|
|
|
2014-01-17 00:08:37 +01:00
|
|
|
if "%1"=="64" (
|
2014-01-17 00:02:45 +01:00
|
|
|
set BINDIR=bin64
|
|
|
|
)
|
2014-01-16 22:06:40 +01:00
|
|
|
|
|
|
|
set runs=0
|
|
|
|
set failures=0
|
|
|
|
set failedTests=
|
|
|
|
set status=0
|
|
|
|
set excluded=0
|
|
|
|
|
|
|
|
for /f %%C in ('findstr /R "." components') do (
|
|
|
|
set excluded=0
|
|
|
|
for %%X in (%EXCLUDE_TESTS%) do (
|
|
|
|
if "%%X"=="%%C" (
|
|
|
|
set excluded=1
|
|
|
|
)
|
|
|
|
)
|
|
|
|
if !excluded!==0 (
|
|
|
|
if exist %%C (
|
|
|
|
if exist %%C\testsuite (
|
2014-01-17 00:02:45 +01:00
|
|
|
if exist %%C\testsuite\%BINDIR%\%TESTRUNNER% (
|
2014-01-16 22:06:40 +01:00
|
|
|
echo.
|
|
|
|
echo.
|
|
|
|
echo ****************************************
|
2017-11-10 09:26:24 +01:00
|
|
|
echo *** %%C
|
|
|
|
echo ****************************************
|
2014-01-16 22:06:40 +01:00
|
|
|
echo.
|
|
|
|
|
|
|
|
set /a runs=!runs! + 1
|
|
|
|
set dir=%CD%
|
2014-01-17 00:28:07 +01:00
|
|
|
cd %%C\testsuite
|
|
|
|
%BINDIR%\%TESTRUNNER% %TESTRUNNERARGS%
|
2014-01-16 22:06:40 +01:00
|
|
|
if !ERRORLEVEL! neq 0 (
|
|
|
|
set /a failures=!failures! + 1
|
|
|
|
set failedTests=!failedTests! %%C
|
|
|
|
set status=1
|
|
|
|
)
|
2014-01-17 00:02:45 +01:00
|
|
|
if exist TestSuite.out (
|
2014-01-16 22:34:46 +01:00
|
|
|
type TestSuite.out
|
|
|
|
)
|
2014-01-16 22:06:40 +01:00
|
|
|
cd !dir!
|
|
|
|
)
|
|
|
|
)
|
|
|
|
)
|
|
|
|
)
|
|
|
|
)
|
|
|
|
|
|
|
|
echo.
|
|
|
|
echo.
|
|
|
|
echo !runs! runs, !failures! failed.
|
|
|
|
echo.
|
|
|
|
for %%F in (!failedTests!) do (
|
|
|
|
echo Failed: %%F
|
|
|
|
)
|
|
|
|
echo.
|
|
|
|
|
|
|
|
exit /b !status!
|