-
Notifications
You must be signed in to change notification settings - Fork 5
/
BuildAndTest.bat.in
63 lines (51 loc) · 1.73 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
62
63
@ECHO off
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...
rem IS_MAKE_PROGRAM_MSBUILD?
if ${IS_MAKE_PROGRAM_MSBUILD}==TRUE goto CleanUsingMsBuild
rem ---------------- msdev clean -----------------------
"${CMAKE_MAKE_PROGRAM}" PlusModelCatalog.sln /clean %BUILD_TYPE% /project ALL_BUILD
IF ERRORLEVEL 1 GOTO buildfail
goto cleansuccess
rem ---------------- msbuild build -----------------------
:CleanUsingMsBuild
"${CMAKE_MAKE_PROGRAM}" ALL_BUILD.vcxproj /p:Configuration=Release /target:clean
IF ERRORLEVEL 1 GOTO buildfail
goto cleansuccess
: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
exit /b 0
:buildfail
ECHO Failed to build PlusModelCatalog
exit /b 1