runtests.cmd 23 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592
  1. ::-------------------------------------------------------------------------------------------------------
  2. :: Copyright (C) Microsoft. All rights reserved.
  3. :: Licensed under the MIT license. See LICENSE.txt file in the project root for full license information.
  4. ::-------------------------------------------------------------------------------------------------------
  5. :: ============================================================================
  6. ::
  7. :: runtests.cmd
  8. ::
  9. :: Runs checkin tests using the ch.exe on the path, in 2 variants:
  10. ::
  11. :: -maxInterpretCount:1 -maxSimpleJitRunCount:1 -bgjit-
  12. :: <dynapogo>
  13. ::
  14. :: Logs are placed into:
  15. ::
  16. :: logs\interpreted
  17. :: logs\dynapogo
  18. ::
  19. :: User specified variants:
  20. :: logs\forcedeferparse
  21. :: logs\nodeferparse
  22. :: logs\forceundodefer
  23. :: logs\bytecodeserialized (serialized to byte codes)
  24. :: logs\forceserialized (force bytecode serialization internally)
  25. ::
  26. :: ============================================================================
  27. @echo off
  28. setlocal
  29. goto :main
  30. :: ============================================================================
  31. :: Print usage
  32. :: ============================================================================
  33. :printUsage
  34. echo runtests.cmd -x86^|-x64^|-arm -debug^|-test [options]
  35. echo.
  36. echo Required switches:
  37. echo.
  38. echo Specify architecture of ChakraCore:
  39. echo.
  40. echo -x86 Build arch of binaries is x86
  41. echo -x64 Build arch of binaries is x64
  42. echo -arm Build arch of binaries is ARM
  43. echo -arm64 Build arch of binaries is ARM64
  44. echo.
  45. echo Specify type of ChakraCore:
  46. echo.
  47. echo -debug Build type of binaries is debug
  48. echo -test Build type of binaries is test
  49. echo -codecoverage Build type of binaries is codecoverage
  50. echo.
  51. echo Shorthand combinations can be used, e.g. -x64debug
  52. echo.
  53. echo Note: release build type currently unsupported by ch.exe
  54. echo.
  55. echo Options:
  56. echo.
  57. echo -dirs dirname Run only the specified directory
  58. echo -rebase Create .rebase file on baseline comparision failure
  59. echo -stoponerror Stop testing after first failure (will finish current execution)
  60. :: TODO Add more usage help
  61. goto :eof
  62. :: ============================================================================
  63. :: Print how to get help
  64. :: ============================================================================
  65. :printGetHelp
  66. echo For help use runtests.cmd -?
  67. goto :eof
  68. :: ============================================================================
  69. :: Main script
  70. :: ============================================================================
  71. :main
  72. if not exist %cd%\rlexedirs.xml (
  73. echo Error: rlexedirs.xml not found in current directory.
  74. echo runtests.cmd must be run from a test root directory containing rlexedirs.xml.
  75. exit /b 1
  76. )
  77. call :initVars
  78. call :parseArgs %*
  79. if not "%fShowUsage%" == "" (
  80. call :printUsage
  81. goto :eof
  82. )
  83. call :validateArgs
  84. if not "%fShowGetHelp%" == "" (
  85. call :printGetHelp
  86. goto :eof
  87. )
  88. call :configureVars
  89. set _logsRoot=%cd%\logs
  90. call :doSilent del /s /q profile.dpl.*
  91. for %%i in (%_Variants%) do (
  92. set _TESTCONFIG=%%i
  93. call :RunOneVariant
  94. )
  95. call :cleanUp
  96. for %%i in (%_Variants%) do (
  97. echo.
  98. echo ######## Logs for %%i variant ########
  99. if exist %_logsRoot%\%_BuildArch%_%_BuildType%\%%i\rl.log (
  100. type %_logsRoot%\%_BuildArch%_%_BuildType%\%%i\rl.log
  101. ) else (
  102. echo ERROR: Log file '%_logsRoot%\%_BuildArch%_%_BuildType%\%%i\rl.log' does not exist
  103. )
  104. )
  105. if "%_HadFailures%" NEQ "0" (
  106. echo -- runtests.cmd ^>^> Tests failed. See logs for details.
  107. ) else (
  108. echo -- runtests.cmd ^>^> All tests passed!
  109. )
  110. echo -- runtests.cmd ^>^> exiting with exit code %_HadFailures%
  111. exit /b %_HadFailures%
  112. :: ============================================================================
  113. :: Parse the user arguments into environment variables
  114. :: ============================================================================
  115. :parseArgs
  116. :NextArgument
  117. if "%1" == "-?" set fShowUsage=1& goto :ArgOk
  118. if "%1" == "/?" set fShowUsage=1& goto :ArgOk
  119. if /i "%1" == "-x86" set _BuildArch=x86& goto :ArgOk
  120. if /i "%1" == "-x64" set _BuildArch=x64& goto :ArgOk
  121. if /i "%1" == "-arm" set _BuildArch=arm& goto :ArgOk
  122. if /i "%1" == "-arm64" set _BuildArch=arm64& goto :ArgOk
  123. if /i "%1" == "-debug" set _BuildType=debug& goto :ArgOk
  124. if /i "%1" == "-test" set _BuildType=test& goto :ArgOk
  125. if /i "%1" == "-codecoverage" set _BuildType=codecoverage& goto :ArgOk
  126. if /i "%1" == "-x86debug" set _BuildArch=x86&set _BuildType=debug& goto :ArgOk
  127. if /i "%1" == "-x64debug" set _BuildArch=x64&set _BuildType=debug& goto :ArgOk
  128. if /i "%1" == "-armdebug" set _BuildArch=arm&set _BuildType=debug& goto :ArgOk
  129. if /i "%1" == "-arm64debug" set _BuildArch=arm64&set _BuildType=debug& goto :ArgOk
  130. if /i "%1" == "-x86test" set _BuildArch=x86&set _BuildType=test& goto :ArgOk
  131. if /i "%1" == "-x64test" set _BuildArch=x64&set _BuildType=test& goto :ArgOk
  132. if /i "%1" == "-armtest" set _BuildArch=arm&set _BuildType=test& goto :ArgOk
  133. if /i "%1" == "-arm64test" set _BuildArch=arm64&set _BuildType=test& goto :ArgOk
  134. if /i "%1" == "-x86codecoverage" set _BuildArch=x86&set _BuildType=codecoverage& goto :ArgOk
  135. if /i "%1" == "-x64codecoverage" set _BuildArch=x64&set _BuildType=codecoverage& goto :ArgOk
  136. if /i "%1" == "-armcodecoverage" set _BuildArch=arm&set _BuildType=codecoverage& goto :ArgOk
  137. if /i "%1" == "-arm64codecoverage" set _BuildArch=arm64&set _BuildType=codecoverage& goto :ArgOk
  138. if /i "%1" == "-binary" set _Binary=-binary:%2& goto :ArgOkShift2
  139. if /i "%1" == "-bindir" set _BinDir=%~f2& goto :ArgOkShift2
  140. if /i "%1" == "-dirs" set _DIRS=-dirs:%~2& goto :ArgOkShift2
  141. if /i "%1" == "-win7" set TARGET_OS=win7& goto :ArgOk
  142. if /i "%1" == "-win8" set TARGET_OS=win8& goto :ArgOk
  143. if /i "%1" == "-winBlue" set TARGET_OS=winBlue& goto :ArgOk
  144. if /i "%1" == "-win10" set TARGET_OS=win10& goto :ArgOk
  145. if /i "%1" == "-nottags" set _NOTTAGS=%_NOTTAGS% -nottags:%~2& goto :ArgOkShift2
  146. if /i "%1" == "-tags" set _TAGS=%_TAGS% -tags:%~2& goto :ArgOkShift2
  147. if /i "%1" == "-dirtags" set _DIRTAGS=%_DIRTAGS% -dirtags:%~2& goto :ArgOkShift2
  148. if /i "%1" == "-dirnottags" set _DIRNOTTAGS=%_DIRNOTTAGS% -dirnottags:%~2& goto :ArgOkShift2
  149. if /i "%1" == "-includeSlow" set _includeSlow=1& goto :ArgOk
  150. if /i "%1" == "-onlySlow" set _onlySlow=1& goto :ArgOk
  151. if /i "%1" == "-quiet" set _quiet=-quiet& goto :ArgOk
  152. :: TODO Consider removing -drt and exclude_drt in some reasonable manner
  153. if /i "%1" == "-drt" set _drt=1& set _NOTTAGS=%_NOTTAGS% -nottags:exclude_drt& goto :ArgOk
  154. if /i "%1" == "-rebase" set _rebase=-rebase& goto :ArgOk
  155. if /i "%1" == "-stoponerror" set _stoponerror=-stoponerror& goto :ArgOk
  156. if /i "%1" == "-rundebug" set _RUNDEBUG=1& goto :ArgOk
  157. :: TODO Figure out best way to specify build arch for tests that are excluded to specific archs
  158. if /i "%1" == "-platform" set _buildArch=%2& goto :ArgOkShift2
  159. :: TODO Figure out best way to specify build type for tests that are excluded to specific type (chk, fre, etc)
  160. if /i "%1" == "-buildType" set _buildType=%2& goto :ArgOkShift2
  161. if /i "%1" == "-binaryRoot" set _binaryRoot=%~f2& goto :ArgOkShift2
  162. if /i "%1" == "-variants" set _Variants=%~2& goto :ArgOkShift2
  163. if /i "%1" == "-cleanupall" set _CleanUpAll=1& goto :ArgOk
  164. if /i "%1" == "-noprogramoutput" set _NoProgramOutput=-noprogramoutput& goto :ArgOk
  165. if /i "%1" == "-onlyassertoutput" set _OnlyAssertOutput=-onlyassertoutput& goto :ArgOk
  166. ::Extra ch.exe command line flags
  167. if /i "%1" == "-ExtraHostFlags" set _ExtraHostFlags=%~2& goto :ArgOkShift2
  168. if /i "%1" == "-DumpOnCrash" set _DumpOnCrash=1& goto :ArgOk
  169. if /i "%1" == "-CrashOnException" set _CrashOnException=1& goto :ArgOk
  170. ::Timeout flags
  171. if /i "%1" == "-timeout" set _TestTimeout=%~2& goto :ArgOkShift2
  172. if /i "%1" == "-timeoutRetries" set _TestTimeoutRetries=%~2& goto :ArgOkShift2
  173. if /i "%1" == "-extraVariants" (
  174. :: Extra variants are specified by the user but not run by default.
  175. if "%_ExtraVariants%" == "" (
  176. set _ExtraVariants=%~2
  177. ) else (
  178. set _ExtraVariants=%_ExtraVariants%,%~2
  179. )
  180. goto :ArgOkShift2
  181. )
  182. :: Defined here are shorthand versions for specifying
  183. :: extra variants when running.
  184. if /i "%1" == "-parser" (
  185. if "%_ExtraVariants%" == "" (
  186. set _ExtraVariants=forcedeferparse,nodeferparse,forceundodefer
  187. ) else (
  188. set _ExtraVariants=%_ExtraVariants%,forcedeferparse,nodeferparse,forceundodefer
  189. )
  190. goto :ArgOk
  191. )
  192. if /i "%1" == "-serialization" (
  193. if "%_ExtraVariants%" == "" (
  194. set _ExtraVariants=bytecodeserialized,forceserialized
  195. ) else (
  196. set _ExtraVariants=%_ExtraVariants%,bytecodeserialized,forceserialized
  197. )
  198. goto :ArgOk
  199. )
  200. if /i "%1" == "-disablejit" (
  201. set _Variants=disable_jit
  202. goto :ArgOk
  203. )
  204. if /i "%1" == "-lite" (
  205. set _Variants=lite
  206. goto :ArgOk
  207. )
  208. if /i "%1" == "-nightly" (
  209. set _nightly=1
  210. if "%_ExtraVariants%" == "" (
  211. set _ExtraVariants=mediumlayout,largelayout,forceserialized
  212. ) else (
  213. set _ExtraVariants=%_ExtraVariants%,mediumlayout,largelayout,forceserialized
  214. )
  215. goto :ArgOk
  216. )
  217. if not "%1" == "" echo Unknown argument: %1 & set fShowGetHelp=1
  218. goto :eof
  219. :ArgOkShift2
  220. shift
  221. :ArgOk
  222. shift
  223. goto :NextArgument
  224. :: ============================================================================
  225. :: Initialize batch script variables to defaults
  226. :: ============================================================================
  227. :initVars
  228. set _HadFailures=0
  229. set _RootDir=%~dp0..
  230. set _BinDir=%_RootDir%\Build\VcBuild\Bin
  231. set _BuildArch=
  232. set _BuildType=
  233. set _Binary=-binary:ch.exe
  234. set _Variants=
  235. set _TAGS=
  236. set _NOTTAGS=
  237. set _DIRNOTTAGS=
  238. set _DIRTAGS=
  239. set _drt=
  240. set _rebase=
  241. set _stoponerror=
  242. set _ExtraVariants=
  243. set _dynamicprofilecache=-dynamicprofilecache:profile.dpl
  244. set _dynamicprofileinput=-dynamicprofileinput:profile.dpl
  245. set _includeSlow=
  246. set _onlySlow=
  247. set _CleanUpAll=
  248. set _nightly=
  249. set TARGET_OS=win10
  250. set _quiet=
  251. set _ExtraHostFlags=
  252. set _DumpOnCrash=
  253. set _CrashOnException=
  254. set _NoProgramOutput=
  255. set _OnlyAssertOutput=
  256. goto :eof
  257. :: ============================================================================
  258. :: Validate that required arguments were specified
  259. :: ============================================================================
  260. :validateArgs
  261. if "%_BuildArch%" == "" (
  262. echo Error missing required build architecture or build type switch
  263. set fShowGetHelp=1
  264. goto :eof
  265. )
  266. if "%_BuildType%" == "" (
  267. echo Error missing required build architecture or build type switch
  268. set fShowGetHelp=1
  269. )
  270. if not exist %_binDir%\%_BuildArch%_%_BuildType%\%_Binary:~8% (
  271. echo Error missing binary %_binDir%\%_BuildArch%_%_BuildType%\%_Binary:~8%
  272. set fShowGetHelp=1
  273. )
  274. goto :eof
  275. :: ============================================================================
  276. :: Configure the script variables and environment based on parsed arguments
  277. :: ============================================================================
  278. :configureVars
  279. echo Adding to PATH: %_binDir%\%_BuildArch%_%_BuildType%
  280. set path=%_binDir%\%_BuildArch%_%_BuildType%;%path%
  281. :: If the user didn't specify explicit variants then do the defaults
  282. if "%_Variants%"=="" set _Variants=interpreted,dynapogo
  283. :: If the user specified extra variants to run (i.e. in addition to the defaults), include them.
  284. if not "%_ExtraVariants%" == "" set _Variants=%_Variants%,%_ExtraVariants%
  285. if not "%_nightly%" == "1" (
  286. set _NOTTAGS=%_NOTTAGS% -nottags:nightly
  287. ) else (
  288. set _NOTTAGS=%_NOTTAGS% -nottags:exclude_nightly
  289. )
  290. if "%_includeSlow%%_onlySlow%" == "" (
  291. set _NOTTAGS=%_NOTTAGS% -nottags:Slow
  292. )
  293. if "%_onlySlow%" == "1" (
  294. set _TAGS=%_TAGS% -tags:Slow
  295. )
  296. if not "%NUM_RL_THREADS%" == "" (
  297. set _RL_THREAD_FLAGS=-threads:%NUM_RL_THREADS%
  298. )
  299. if "%_DIRS%" == "" (
  300. set _DIRS=-all
  301. )
  302. set _NOTTAGS=%_NOTTAGS% -nottags:exclude_windows
  303. set _BuildArchMapped=%_BuildArch%
  304. set _BuildTypeMapped=%_BuildType%
  305. :: _NewBuildArchMapped and _NewBuildTypeMapped store new terms of the build and architecture
  306. :: _NewBuildArchMapped: x86/x64 _BuildArchMapped:x86/amd64
  307. :: _NewBuildTypeMapped: debug/test _BuildTypeMapped:chk/fre
  308. set _NewBuildArchMapped=%_BuildArch%
  309. set _NewBuildTypeMapped=%_BuildType%
  310. :: Map new build arch and type names to old names until rl test tags are
  311. :: updated to the new names
  312. if "%_BuildArchMapped%" == "x64" set _BuildArchMapped=amd64
  313. if "%_BuildTypeMapped%" == "debug" set _BuildTypeMapped=chk
  314. if "%_BuildTypeMapped%" == "test" set _BuildTypeMapped=fre
  315. if "%_BuildTypeMapped%" == "codecoverage" (
  316. set _BuildTypeMapped=fre
  317. set _NewBuildTypeMapped=test
  318. )
  319. if "%_BuildArch%" == "arm" set _NOTTAGS=%_NOTTAGS% -nottags:require_asmjs -nottags:require_wasm
  320. if "%_BuildArch%" == "arm64" set _NOTTAGS=%_NOTTAGS% -nottags:require_asmjs -nottags:require_wasm
  321. if "%Disable_JIT%" == "1" (
  322. set _dynamicprofilecache=
  323. set _dynamicprofileinput=
  324. )
  325. goto :eof
  326. :: ============================================================================
  327. :: Run one variant
  328. :: ============================================================================
  329. :RunOneVariant
  330. if exist %_logsRoot%\%_BuildArch%_%_BuildType%\%_TESTCONFIG% (
  331. rd /q /s %_logsRoot%\%_BuildArch%_%_BuildType%\%_TESTCONFIG%
  332. )
  333. if %_HadFailures% NEQ 0 (
  334. if "%_stoponerror%" NEQ "" (
  335. goto :eof
  336. )
  337. )
  338. if "%_BuildType%" == "test" (
  339. rem bytecode layout switches not available in test build
  340. if "%_TESTCONFIG%"=="largelayout" (
  341. if not exist %_logsRoot%\%_BuildArch%_%_BuildType%\%_TESTCONFIG% (
  342. mkdir %_logsRoot%\%_BuildArch%_%_BuildType%\%_TESTCONFIG%
  343. )
  344. echo. > %_logsRoot%\%_BuildArch%_%_BuildType%\%_TESTCONFIG%\rl.log
  345. goto :eof
  346. )
  347. if "%_TESTCONFIG%"=="mediumlayout" (
  348. if not exist %_logsRoot%\%_BuildArch%_%_BuildType%\%_TESTCONFIG% (
  349. mkdir %_logsRoot%\%_BuildArch%_%_BuildType%\%_TESTCONFIG%
  350. )
  351. echo. > %_logsRoot%\%_BuildArch%_%_BuildType%\%_TESTCONFIG%\rl.log
  352. goto :eof
  353. )
  354. )
  355. set _OLD_CC_FLAGS=%EXTRA_CC_FLAGS%
  356. set EXTRA_RL_FLAGS=-appendtestnametoextraccflags
  357. set _exclude_serialized=
  358. if "%_BuildType%" == "debug" (
  359. rem Enabling storing dumps on user directory.
  360. set _DumpOnCrash=1
  361. )
  362. set EXTRA_CC_FLAGS=%EXTRA_CC_FLAGS% %_ExtraHostFlags%
  363. if not "%_DumpOnCrash%" == "" (
  364. set EXTRA_CC_FLAGS=%EXTRA_CC_FLAGS% -DumpOnCrash
  365. )
  366. if not "%_CrashOnException%" == "" (
  367. set EXTRA_CC_FLAGS=%EXTRA_CC_FLAGS% -CrashOnException
  368. )
  369. if "%_Binary%" == "-binary:ch.exe" (
  370. set EXTRA_CC_FLAGS=%EXTRA_CC_FLAGS% -WERExceptionSupport -ExtendedErrorStackForTestHost -BaselineMode
  371. )
  372. if "%_TESTCONFIG%"=="interpreted" (
  373. set EXTRA_CC_FLAGS=%EXTRA_CC_FLAGS% -maxInterpretCount:1 -maxSimpleJitRunCount:1 -bgjit- %_dynamicprofilecache%
  374. )
  375. if "%_TESTCONFIG%"=="nonative" (
  376. set EXTRA_CC_FLAGS=%EXTRA_CC_FLAGS% -nonative
  377. set EXTRA_RL_FLAGS=-nottags:exclude_interpreted -nottags:fails_interpreted
  378. )
  379. :: DisableJit is different from NoNative in that NoNative can be used
  380. :: with builds which include backend code, whereas DisableJit doesn't have
  381. :: backend code linked in, and also disables other features that incidentally
  382. :: depends on the backend like dynamic profile, asmjs, simdjs, background parsing etc.
  383. :: TODO: Re-enable interpreter mode asmjs and simdjs
  384. if "%_TESTCONFIG%"=="disable_jit" (
  385. set EXTRA_CC_FLAGS=%EXTRA_CC_FLAGS% -nonative
  386. set EXTRA_RL_FLAGS=-nottags:exclude_interpreted -nottags:fails_interpreted -nottags:require_backend
  387. ) else (
  388. set EXTRA_RL_FLAGS=%EXTRA_RL_FLAGS% -nottags:require_disable_jit
  389. )
  390. if "%_TESTCONFIG%"=="lite" (
  391. set EXTRA_CC_FLAGS=%EXTRA_CC_FLAGS% -nonative
  392. set EXTRA_RL_FLAGS=-nottags:exclude_interpreted -nottags:fails_interpreted -nottags:require_backend -nottags:require_debugger -nottags:Intl
  393. )
  394. if "%_TESTCONFIG%"=="dynapogo" (
  395. set EXTRA_CC_FLAGS=%EXTRA_CC_FLAGS% -forceNative -off:simpleJit -bgJitDelay:0 %_dynamicprofileinput%
  396. )
  397. :: Variants after here are user supplied variants (not run by default).
  398. if "%_TESTCONFIG%"=="forcedeferparse" (
  399. set EXTRA_CC_FLAGS=%EXTRA_CC_FLAGS% -forceDeferParse %_dynamicprofilecache%
  400. set _exclude_forcedeferparse=-nottags:exclude_forcedeferparse
  401. )
  402. if "%_TESTCONFIG%"=="nodeferparse" (
  403. set EXTRA_CC_FLAGS=%EXTRA_CC_FLAGS% -noDeferParse %_dynamicprofilecache%
  404. set _exclude_nodeferparse=-nottags:exclude_nodeferparse
  405. )
  406. if "%_TESTCONFIG%"=="forceundodefer" (
  407. set EXTRA_CC_FLAGS=%EXTRA_CC_FLAGS% -forceUndoDefer %_dynamicprofilecache%
  408. set _exclude_forceundodefer=-nottags:exclude_forceundodefer
  409. )
  410. if "%_TESTCONFIG%"=="bytecodeserialized" (
  411. set EXTRA_CC_FLAGS=%EXTRA_CC_FLAGS% -recreatebytecodefile -serialized:%TEMP%\ByteCode
  412. set _exclude_serialized=-nottags:exclude_serialized
  413. )
  414. if "%_TESTCONFIG%"=="forceserialized" (
  415. set EXTRA_CC_FLAGS=%EXTRA_CC_FLAGS% -forceserialized
  416. set EXTRA_RL_FLAGS=-nottags:exclude_forceserialized
  417. set _exclude_serialized=-nottags:exclude_serialized
  418. )
  419. if "%_TESTCONFIG%"=="mediumlayout" (
  420. set EXTRA_CC_FLAGS=%EXTRA_CC_FLAGS% -MediumByteCodeLayout -forceserialized
  421. set EXTRA_RL_FLAGS=-nottags:exclude_bytecodelayout -nottags:exclude_forceserialized
  422. set _exclude_serialized=-nottags:exclude_serialized
  423. )
  424. if "%_TESTCONFIG%"=="largelayout" (
  425. set EXTRA_CC_FLAGS=%EXTRA_CC_FLAGS% -LargeByteCodeLayout -forceserialized
  426. set EXTRA_RL_FLAGS=-nottags:exclude_bytecodelayout -nottags:exclude_forceserialized
  427. set _exclude_serialized=-nottags:exclude_serialized
  428. )
  429. if not "%_TestTimeout%" == "" (
  430. set EXTRA_RL_FLAGS=%EXTRA_RL_FLAGS% -timeout:%_TestTimeout%
  431. )
  432. if not "%_TestTimeoutRetries%" == "" (
  433. set EXTRA_RL_FLAGS=%EXTRA_RL_FLAGS% -timeoutRetries:%_TestTimeoutRetries%
  434. )
  435. echo.
  436. echo ############# Starting %_TESTCONFIG% variant #############
  437. call :doSilent del /q %_logsRoot%\%_BuildArch%_%_BuildType%\%_TESTCONFIG%\rl*
  438. call :doSilent md %_logsRoot%\%_BuildArch%_%_BuildType%\%_TESTCONFIG%
  439. set _rlArgs=%_Binary%
  440. set _rlArgs=%_rlArgs% -target:%_BuildArchMapped%
  441. set _rlArgs=%_rlArgs% -nottags:fail
  442. set _rlArgs=%_rlArgs% %_RL_THREAD_FLAGS%
  443. set _rlArgs=%_rlArgs% %_DIRS%
  444. set _rlArgs=%_rlArgs% -verbose
  445. set _rlArgs=%_rlArgs% %_TAGS%
  446. set _rlArgs=%_rlArgs% %_NOTTAGS%
  447. set _rlArgs=%_rlArgs% %_DIRTAGS%
  448. set _rlArgs=%_rlArgs% %_DIRNOTTAGS%
  449. set _rlArgs=%_rlArgs% -nottags:fails_%_TESTCONFIG%
  450. set _rlArgs=%_rlArgs% -nottags:exclude_%_TESTCONFIG%
  451. set _rlArgs=%_rlArgs% -nottags:exclude_%TARGET_OS%
  452. set _rlArgs=%_rlArgs% -nottags:exclude_%_BuildArchMapped%
  453. set _rlArgs=%_rlArgs% -nottags:exclude_%_NewBuildArchMapped%
  454. set _rlArgs=%_rlArgs% -nottags:exclude_%_BuildTypeMapped%
  455. set _rlArgs=%_rlArgs% -nottags:exclude_%_NewBuildTypeMapped%
  456. if [%_JSHOST%] NEQ [1] (
  457. set _rlArgs=%_rlArgs% -nottags:exclude_ch
  458. )
  459. set _rlArgs=%_rlArgs% %_exclude_serialized%
  460. set _rlArgs=%_rlArgs% %_exclude_forcedeferparse%
  461. set _rlArgs=%_rlArgs% %_exclude_nodeferparse%
  462. set _rlArgs=%_rlArgs% %_exclude_forceundodefer%
  463. set _rlArgs=%_rlArgs% %_NoProgramOutput%
  464. set _rlArgs=%_rlArgs% %_OnlyAssertOutput%
  465. set _rlArgs=%_rlArgs% %_quiet%
  466. set _rlArgs=%_rlArgs% -exe
  467. set _rlArgs=%_rlArgs% %EXTRA_RL_FLAGS%
  468. set _rlArgs=%_rlArgs% %_rebase%
  469. set _rlArgs=%_rlArgs% %_stoponerror%
  470. set REGRESS=%CD%
  471. call :do rl %_rlArgs%
  472. if %ERRORLEVEL% NEQ 0 set _HadFailures=1
  473. call :do move /Y %_logsRoot%\*.log %_logsRoot%\%_BuildArch%_%_BuildType%\%_TESTCONFIG%
  474. if %ERRORLEVEL% NEQ 0 set _HadFailures=1
  475. set EXTRA_CC_FLAGS=%_OLD_CC_FLAGS%
  476. goto :eof
  477. :: ============================================================================
  478. :: Clean up left over files
  479. :: ============================================================================
  480. :cleanUp
  481. call :doSilent del /s *.bc
  482. call :doSilent del /s *.out
  483. call :doSilent del /s *.dpl
  484. call :doSilent del /s profile.dpl.*
  485. call :doSilent del /s testout*
  486. if "%_CleanUpAll%" == "1" (
  487. call :doSilent del /s *.rebase
  488. )
  489. goto :eof
  490. :: ============================================================================
  491. :: Echo a command line before executing it
  492. :: ============================================================================
  493. :do
  494. echo ^>^> %*
  495. cmd /s /c "%*"
  496. if %ERRORLEVEL% NEQ 0 exit /b %ERRORLEVEL%
  497. goto :eof
  498. :: ============================================================================
  499. :: Echo a command line before executing it and redirect the command's output
  500. :: to nul
  501. :: ============================================================================
  502. :doSilent
  503. echo ^>^> %* ^> nul 2^>^&1
  504. cmd /s /c "%* > nul 2>&1"
  505. goto :eof