forked from PlusToolkit/PlusApp
-
Notifications
You must be signed in to change notification settings - Fork 0
/
BuildAndTest.bat.in
58 lines (45 loc) · 1.47 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
@ECHO off
SET ORIGPATH=%PATH%
SET BUILD_TYPE=Release
REM Skip build step if continuous or individual mode
REM Skip clean build step if not nightly mode
if "%1" == "-C" goto cleansuccess
if "%1" == "-I" goto cleansuccess
if "%1" == "" goto cleansuccess
if "%1" == "-E" goto cleansuccess
ECHO Clean...
"${CMAKE_MAKE_PROGRAM}" ALL_BUILD.vcxproj /p:Configuration=Release /target:clean
IF ERRORLEVEL 1 GOTO buildfail
:cleansuccess
rem ---------------------------------------
if "%1" == "" goto experimental
if "%1" == "-E" goto experimental
if "%1" == "-N" goto nightly
if "%1" == "-C" goto continuous
if "%1" == "-I" goto individual
:experimental
"${CMAKE_CTEST_COMMAND}" -C %BUILD_TYPE% -D Experimental --output-on-failure
goto success
:nightly
@REM Clean before the nightly build to enforce all build warnings appear on all nightly dashboard submissions
"${CMAKE_CTEST_COMMAND}" -C %BUILD_TYPE% -D Nightly
goto success
:continuous
"${CMAKE_CTEST_COMMAND}" -C %BUILD_TYPE% -D Continuous
@REM Wait for some time before continue to allow checking the results of the executions
timeout /t 15
goto success
:individual
@REM Run individual tests with regexp search
@REM Display the list of tests
"${CMAKE_CTEST_COMMAND}" -C %BUILD_TYPE% -R "%2" -N
@REM Run selected tests
"${CMAKE_CTEST_COMMAND}" -C %BUILD_TYPE% -R "%2" -V
goto success
:success
SET PATH=%ORIGPATH%
exit /b 0
:buildfail
ECHO Failed to build PlusLib
SET PATH=%ORIGPATH%
exit /b 1