forked from PlusToolkit/PlusBuild
-
Notifications
You must be signed in to change notification settings - Fork 0
/
BuildAndTest.bat.in
61 lines (50 loc) · 1.29 KB
/
BuildAndTest.bat.in
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
@ECHO off
REM Hide all your directories from users
SET ORIGPATH=%PATH%
REM Parse arguments
SET COMMAND=%0
SET TEST_MODE=%1
SHIFT
:loop
IF NOT "%1"=="" (
IF "%1"=="--test" (
SET INDIVIDUAL_TEST=%2
SHIFT
)
IF "%1"=="--track" (
SET TEST_TRACK=--track %2
SHIFT
)
SHIFT
GOTO :loop
)
SET DIRCMD=0
if "%TEST_MODE%" == "" goto experimental
if "%TEST_MODE%" == "-E" goto experimental
if "%TEST_MODE%" == "-N" goto nightly
if "%TEST_MODE%" == "-C" goto continuous
if "%TEST_MODE%" == "-I" goto individual
:experimental
"${CMAKE_CTEST_COMMAND}" -D Experimental --output-on-failure --build-and-test %TEST_TRACK%
goto END
:nightly
"${CMAKE_CTEST_COMMAND}" -D Nightly --build-and-test %TEST_TRACK%
goto END
:continuous
"${CMAKE_CTEST_COMMAND}" -D Continuous --build-and-test %TEST_TRACK%
@REM Wait for some time before continue to allow checking the results of the executions
timeout /t 15
goto END
:individual
@REM Run individual tests with regexp search
@REM Display the list of tests
"${CMAKE_CTEST_COMMAND}" -R "%INDIVIDUAL_TEST%" -N
@REM Run selected tests
"${CMAKE_CTEST_COMMAND}" -R "%INDIVIDUAL_TEST%" -V
goto END
:BUILDFAILED
ECHO ERROR: Build failed...
GOTO END
:END
SET PATH=%ORIGPATH%
ECHO DONE