aboutsummaryrefslogtreecommitdiff
path: root/test.bat
blob: 9c72b2d5c52763e44ee88aa8d105f099d48d3f9f (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
@echo off
rem file      : test.bat
rem author    : Boris Kolpackov <boris@codesynthesis.com>
rem copyright : Copyright (c) 2009-2010 Code Synthesis Tools CC
rem license   : GNU GPL v2; see accompanying LICENSE file

setlocal

set "tests=__path__(dirs)"
set "confs=__path__(configurations)"
set "topdir=__path__(topdir)\.."

goto start

:run_test
  cd %1

  if exist %2\driver.exe (
    echo %1\%2
    call %topdir%\tester.bat tracer %2
    if errorlevel 1 (
      set "failed=%failed% %1\%2"
    )
  )

  cd ..
goto :eof

:start

for %%t in (%tests%) do (
  for %%c in (%confs%) do (
    call :run_test %%t %%c
  )
)

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

echo ALL TESTS PASSED
goto end

:error
for %%t in (%failed%) do echo FAILED: %%t
exit /b 1
goto end

:end
endlocal