aboutsummaryrefslogtreecommitdiff
path: root/test.bat
blob: a244867501d8bd590c1eda5a487240bfce658768 (plain)
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
@echo off
rem file      : test.bat
rem copyright : Copyright (c) 2009-2011 Code Synthesis Tools CC
rem license   : GNU GPL v2; see accompanying LICENSE file

rem
rem test.bat database
rem
rem Run tests built with VC++.
rem

setlocal

set "failed="
set "curdir=%CD%"

if "_%1_" == "__" (
  echo no database specified
  goto usage
)


goto start

rem
rem %1 - directory
rem %2 - database
rem
:run_test
  echo.
  echo testing %1
  echo.
  cd %1
  call test.bat %2
  if errorlevel 1 set "failed=%failed% %1"
  cd %curdir%
goto :eof

:start

for %%d in (common %1 boost\common boost\%1 qt\common qt\%1) do (
  call :run_test %%d %1
)

if not "_%failed%_" == "__" goto error

echo.
echo ALL TESTS PASSED
echo.
goto end

:usage
echo.
echo usage: test.bat database
echo.

:error
if not "_%failed%_" == "__" (
  echo.
  for %%t in (%failed%) do echo FAILED: %%t
  echo.
)
endlocal
exit /b 1

:end
endlocal