File: runtests.bat

package info (click to toggle)
monotone 1.1-4%2Bdeb8u2
  • links: PTS, VCS
  • area: main
  • in suites: jessie
  • size: 20,664 kB
  • ctags: 8,113
  • sloc: cpp: 86,443; sh: 6,906; perl: 924; makefile: 838; python: 517; lisp: 379; sql: 118; exp: 91; ansic: 52
file content (48 lines) | stat: -rw-r--r-- 1,120 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
SETLOCAL

if "%1x"=="debugx" goto do_debug
set EXE_PATH=visualc\Release
goto setpath

:do_debug
set EXE_PATH=visualc\Debug
goto setpath

:setpath
set PATH=%CD%\%EXE_PATH%;%PATH%

set fail_count=0

%EXE_PATH%\tester.exe tester-testsuite.lua
if %ERRORLEVEL%==0 goto unit-testsuite.lua
@echo tester-testsuite.lua failed.
set fail_count=1

:unit-testsuite.lua
%EXE_PATH%\tester.exe unit-testsuite.lua
if %ERRORLEVEL%==0 goto lua-testsuite.lua
@echo unit-testsuite.lua failed.
if %fail_count%==1 set fail_count=2
if %fail_count%==0 set fail_count=1

:lua-testsuite.lua
%EXE_PATH%\tester.exe lua-testsuite.lua
if %ERRORLEVEL%==0 goto nomore
@echo lua-testsuite.lua failed.
if %fail_count%==2 set fail_count=3
if %fail_count%==1 set fail_count=2
if %fail_count%==0 set fail_count=1

:nomore
if %fail_count%==0 goto end

@rem return an error code
@echo ===============================
@echo %fail_count% of 3 tests failed.
@echo ===============================
exit /B 1

:end
@echo ===============================
@echo All tests succeeded!
@echo ===============================