forked from mcallegari/qlcplus
-
Notifications
You must be signed in to change notification settings - Fork 0
/
unittest.bat
80 lines (69 loc) · 1.39 KB
/
unittest.bat
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
75
76
77
78
79
80
@ECHO OFF
SETLOCAL EnableDelayedExpansion
REM ArtNet test
pushd .
cd plugins\artnet\src
..\test\artnet_test.exe
IF NOT %ERRORLEVEL%==0 exit /B %ERRORLEVEL%
popd
REM Enttec wing test
pushd .
cd plugins\enttecwing\src
..\test\ewing_test.exe
IF NOT %ERRORLEVEL%==0 exit /B %ERRORLEVEL%
popd
REM Velleman test
pushd .
cd plugins\velleman\src
SET OLDPATH=%PATH%
PATH=%PATH%;C:\k8062d
REM Surprise, surprise, windows doesn't know how to handle mock objects *sigh*
REM ..\test\vellemanout_test.exe
IF NOT %ERRORLEVEL%==0 exit /B %ERRORLEVEL%
SET PATH=%OLDPATH%
popd
REM Engine tests
pushd .
cd engine\test
SET OLDPATH=%PATH%
PATH=%PATH%;..\..\src
FOR /D %%G IN ("*") DO (
cd "%%G"
REM Do something
IF EXIST "test.bat" CALL "test.bat"
REM Execute test
IF EXIST "%%G_test.exe" (
%%G_test.exe
)
REM Check test result and act accordingly
IF !ERRORLEVEL! EQU 0 (
ECHO %%G test OK
) else (
exit /B %ERRORLEVEL%
)
cd ..
)
SET PATH=%OLDPATH%
popd
REM UI tests
pushd .
cd ui\test
SET OLDPATH=%PATH%
PATH=%PATH%;..\..\src;..\..\..\engine\src
FOR /D %%G IN ("*") DO (
cd "%%G"
REM Execute test
IF EXIST "%%G_test.exe" (
%%G_test.exe
)
REM Check test result and act accordingly
IF !ERRORLEVEL! EQU 0 (
ECHO %%G test OK
) else (
exit /B %ERRORLEVEL%
)
cd ..
)
SET PATH=%OLDPATH%
popd
ECHO All tests passed