File: runtests.cmd

package info (click to toggle)
poco 1.14.2-3
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 56,460 kB
  • sloc: cpp: 340,542; ansic: 245,601; makefile: 1,742; yacc: 1,005; sh: 698; sql: 312; lex: 282; xml: 128; perl: 29; python: 24
file content (74 lines) | stat: -rw-r--r-- 1,437 bytes parent folder | download | duplicates (5)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
@echo off
rem
rem A script for running the POCO testsuites.
rem
rem usage: runtests [64]
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:TestSuite.out
set BINDIR=bin

if "%1"=="64" (
  set BINDIR=bin64
)

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\%BINDIR%\%TESTRUNNER% (
          echo.
          echo.
          echo ****************************************
          echo *** %%C
          echo ****************************************
          echo.

		  set /a runs=!runs! + 1
		  set dir=%CD%
		  cd %%C\testsuite
		  %BINDIR%\%TESTRUNNER% %TESTRUNNERARGS%
		  if !ERRORLEVEL! neq 0 (
		    set /a failures=!failures! + 1
		    set failedTests=!failedTests! %%C
		    set status=1
		  )
		  if exist TestSuite.out (
		    type TestSuite.out
		  )
		  cd !dir!
        )
      )
    )
  )
)

echo.
echo.
echo !runs! runs, !failures! failed.
echo.
for %%F in (!failedTests!) do (
	echo Failed: %%F
)
echo.

exit /b !status!