mirror of
https://github.com/pocoproject/poco.git
synced 2025-04-27 02:16:16 +02:00
added runtests.cmd
This commit is contained in:
parent
2f33fe2d7d
commit
0dc6a9ca3c
68
build/script/runtests.cmd
Normal file
68
build/script/runtests.cmd
Normal file
@ -0,0 +1,68 @@
|
|||||||
|
@echo off
|
||||||
|
rem
|
||||||
|
rem $Id$
|
||||||
|
rem
|
||||||
|
rem A script for running the POCO testsuites.
|
||||||
|
rem
|
||||||
|
rem usage: runtests
|
||||||
|
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
|
||||||
|
set TESTRUNNERARGS=/B
|
||||||
|
|
||||||
|
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 (
|
||||||
|
if exist %%C\testsuite\bin\%TESTRUNNER% (
|
||||||
|
echo.
|
||||||
|
echo.
|
||||||
|
echo ****************************************
|
||||||
|
echo *** %%C
|
||||||
|
echo ****************************************
|
||||||
|
echo.
|
||||||
|
|
||||||
|
set /a runs=!runs! + 1
|
||||||
|
set dir=%CD%
|
||||||
|
cd %%C\testsuite\bin
|
||||||
|
%TESTRUNNER% %TESTRUNNERARGS%
|
||||||
|
if !ERRORLEVEL! neq 0 (
|
||||||
|
set /a failures=!failures! + 1
|
||||||
|
set failedTests=!failedTests! %%C
|
||||||
|
set status=1
|
||||||
|
)
|
||||||
|
cd !dir!
|
||||||
|
)
|
||||||
|
)
|
||||||
|
)
|
||||||
|
)
|
||||||
|
)
|
||||||
|
|
||||||
|
echo.
|
||||||
|
echo.
|
||||||
|
echo !runs! runs, !failures! failed.
|
||||||
|
echo.
|
||||||
|
for %%F in (!failedTests!) do (
|
||||||
|
echo Failed: %%F
|
||||||
|
)
|
||||||
|
echo.
|
||||||
|
|
||||||
|
exit /b !status!
|
Loading…
x
Reference in New Issue
Block a user