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