PageRenderTime 42ms CodeModel.GetById 31ms app.highlight 10ms RepoModel.GetById 0ms app.codeStats 0ms

/jboss-as-7.1.1.Final/integration-tests.bat

#
Batch | 176 lines | 81 code | 37 blank | 58 comment | 23 complexity | 41f2d2b585ac59c85ee8fb2ca5787a01 MD5 | raw file
Possible License(s): LGPL-2.1, Apache-2.0
  1@echo off
  2REM  ======================================================================
  3REM
  4REM  This is the main entry point for the build system.
  5REM
  6REM  Users should be sure to execute this file rather than 'mvn' to ensure
  7REM  the correct version is being used with the correct configuration.
  8REM
  9REM  ======================================================================
 10REM
 11REM $Id: build.bat 105735 2010-06-04 19:45:13Z pgier $
 12REM
 13REM Authors:
 14REM     Jason Dillon <jason@planet57.com>
 15REM     Sacha Labourey <sacha.labourey@cogito-info.ch>
 16REM
 17
 18REM ******************************************************
 19REM Ignore the MAVEN_HOME variable: we want to use *our*
 20REM Maven version and associated JARs.
 21REM ******************************************************
 22REM Ignore the users classpath, cause it might mess
 23REM things up
 24REM ******************************************************
 25
 26SETLOCAL
 27
 28set PROGNAME=%0
 29set DIRNAME=%~p0
 30
 31set CLASSPATH=
 32set M2_HOME=
 33set MAVEN_HOME=
 34
 35REM ******************************************************
 36REM - "for" loops have been unrolled for compatibility
 37REM   with some WIN32 systems.
 38REM ******************************************************
 39
 40set NAMES=tools;tools\maven;tools\apache\maven
 41set SUBFOLDERS=.;..;..\..;..\..\..;..\..\..\..
 42
 43REM ******************************************************
 44REM ******************************************************
 45
 46SET EXECUTED=FALSE
 47for %%i in (%NAMES%) do call :subLoop %%i %1 %2 %3 %4 %5 %6
 48
 49goto :EOF
 50
 51
 52REM ******************************************************
 53REM ********* Search for names in the subfolders *********
 54REM ******************************************************
 55
 56:subLoop
 57for %%j in (%SUBFOLDERS%) do call :testIfExists %%j\%1\bin\mvn.bat %2 %3 %4 %5 %6 %7
 58
 59goto :EOF
 60
 61
 62REM ******************************************************
 63REM ***  Test if Maven batch file exists.             ***
 64REM ******************************************************
 65
 66:testIfExists
 67if exist %1 call :BatchFound %1 %2 %3 %4 %5 %6 %7 %8
 68
 69goto :EOF
 70
 71
 72REM ******************************************************
 73REM ***  Batch file has been found.                    ***
 74REM ******************************************************
 75
 76:BatchFound
 77if (%EXECUTED%)==(FALSE) call :ExecuteBatch %1 %2 %3 %4 %5 %6 %7 %8
 78set EXECUTED=TRUE
 79
 80goto :EOF
 81
 82REM ******************************************************
 83REM ***  Execute batch file only once.                 ***
 84REM ******************************************************
 85
 86:ExecuteBatch
 87
 88REM  Support for testsuite profile processing
 89set CMD_LINE_PARAMS=
 90set TESTS_SPECIFIED=N
 91
 92REM  Each test module executes a different type of test
 93set BENCHMARK_TESTS=-Dbenchmark.module
 94set INTEGRATION_TESTS=-Dintegration.module -Dbasic.integration.tests -Dcompat.integration.tests -Dclustering.integration.tests -Dtimerservice.integration.tests
 95set SMOKE_TESTS=-Dintegration.module -Dsmoke.integration.tests
 96set STRESS_TESTS=-Dstress.module
 97set DOMAIN_TESTS=-Ddomain.module
 98set COMPAT_TESTS=-Dcompat.module
 99
100
101set MVN=%1%
102set GOAL=%2
103if "%GOAL%"=="" set GOAL=install
104
105REM  Process test directives before calling maven
106call :processTestDirectives %GOAL% %3 %4 %5 %6 %7 %8
107
108REM  Change to testsuite directory before executing mvn.
109cd %DIRNAME%\testsuite
110
111echo Calling ..\%MVN% %CMD_LINE_PARAMS%
112call ..\%MVN% %CMD_LINE_PARAMS%
113
114cd %DIRNAME%
115
116REM  Pause the batch script when maven terminates.
117if "%NOPAUSE%" == "" pause
118
119goto :EOF
120
121REM ******************************************************
122REM ***  Function to process testsuite directives.     ***
123REM ******************************************************
124:processTestDirectives
125
126REM echo "Calling processTestDirectives %*"
127:loop
128
129REM  Check if we have no more parameters to process.
130if "%1" == "" (
131  if "%TESTS_SPECIFIED%" == "N" set "CMD_LINE_PARAMS=%CMD_LINE_PARAMS% %SMOKE_TESTS%"
132  goto :eof
133)
134REM  Replace occurrences of directives with corresponding maven profiles
135REM  -DallTests
136if "%1" == "-DallTests" (
137  set "CMD_LINE_PARAMS=%CMD_LINE_PARAMS% %INTEGRATION_TESTS% %DOMAIN_TESTS% %COMPAT_TESTS% %SMOKE_TESTS%"
138  set "TESTS_SPECIFIED=Y"
139  goto processed
140)
141REM  -Dbenchmark-tests
142if "%1" == "-Dbenchmark-tests" (
143  set "CMD_LINE_PARAMS=%CMD_LINE_PARAMS% %BENCHMARK_TESTS%"
144  set "TESTS_SPECIFIED=Y"
145  goto processed
146)
147REM  -Ddomain-tests
148if "%1" == "-Ddomain-tests" (
149  set "CMD_LINE_PARAMS=%CMD_LINE_PARAMS% %DOMAIN_TESTS%"
150  set "TESTS_SPECIFIED=Y"
151  goto processed
152)
153REM  -Dcompat-tests
154if "%1" == "-Dcompat-tests" (
155  set "CMD_LINE_PARAMS=%CMD_LINE_PARAMS% %COMPAT_TESTS%"
156  set "TESTS_SPECIFIED=Y"
157  goto processed
158)
159REM  -Dsmoke-tests
160if "%1" == "-Dsmoke-tests" (
161  set "CMD_LINE_PARAMS=%CMD_LINE_PARAMS% %SMOKE_TESTS%"
162  set "TESTS_SPECIFIED=Y"
163  goto processed
164)
165REM  -Dstress-tests
166if "%1" == "-Dstress-tests" (
167  set "CMD_LINE_PARAMS=%CMD_LINE_PARAMS% %STRESS_TESTS%"
168  set "TESTS_SPECIFIED=Y"
169  goto processed
170)
171REM  Pass through other params.
172set "CMD_LINE_PARAMS=%CMD_LINE_PARAMS% %1"
173
174:processed
175shift
176goto loop