-
Notifications
You must be signed in to change notification settings - Fork 4.9k
/
Copy pathRunBasicTestWithMcj.cmd
59 lines (50 loc) · 2.32 KB
/
RunBasicTestWithMcj.cmd
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
@echo off
setlocal EnableDelayedExpansion
rem *.cmd and *.sh files may be considered test entry points. If launched directly, consider it a pass.
if "%~1" neq "--runCustomTest" exit /b 0
set CLRTestExpectedExitCode=100
echo Collect profile without R2R, use profile without R2R
del /f /q profile.mcj 2>nul
call "%CORE_ROOT%\corerun" BasicTestWithMcj.dll
set CLRTestExitCode=!ErrorLevel!
if %CLRTestExitCode% neq %CLRTestExpectedExitCode% exit /b %CLRTestExitCode%
call "%CORE_ROOT%\corerun" BasicTestWithMcj.dll
set CLRTestExitCode=!ErrorLevel!
if %CLRTestExitCode% neq %CLRTestExpectedExitCode% exit /b %CLRTestExitCode%
echo Collect profile with R2R, use profile with R2R
del /f /q profile.mcj 2>nul
call "%CORE_ROOT%\corerun" r2r\BasicTestWithMcj.dll
set CLRTestExitCode=!ErrorLevel!
if %CLRTestExitCode% neq %CLRTestExpectedExitCode% exit /b %CLRTestExitCode%
call "%CORE_ROOT%\corerun" r2r\BasicTestWithMcj.dll
set CLRTestExitCode=!ErrorLevel!
if %CLRTestExitCode% neq %CLRTestExpectedExitCode% exit /b %CLRTestExitCode%
echo Collect profile without R2R, use profile with R2R
del /f /q profile.mcj 2>nul
call "%CORE_ROOT%\corerun" BasicTestWithMcj.dll
set CLRTestExitCode=!ErrorLevel!
if %CLRTestExitCode% neq %CLRTestExpectedExitCode% exit /b %CLRTestExitCode%
call "%CORE_ROOT%\corerun" r2r\BasicTestWithMcj.dll
set CLRTestExitCode=!ErrorLevel!
if %CLRTestExitCode% neq %CLRTestExpectedExitCode% exit /b %CLRTestExitCode%
echo Collect profile with R2R, use profile without R2R
del /f /q profile.mcj 2>nul
call "%CORE_ROOT%\corerun" r2r\BasicTestWithMcj.dll
set CLRTestExitCode=!ErrorLevel!
if %CLRTestExitCode% neq %CLRTestExpectedExitCode% exit /b %CLRTestExitCode%
call "%CORE_ROOT%\corerun" BasicTestWithMcj.dll
set CLRTestExitCode=!ErrorLevel!
if %CLRTestExitCode% neq %CLRTestExpectedExitCode% exit /b %CLRTestExitCode%
echo Collect profile with R2R disabled, use profile with R2R enabled
del /f /q profile.mcj 2>nul
set DOTNET_ReadyToRun=0
call "%CORE_ROOT%\corerun" r2r\BasicTestWithMcj.dll
set CLRTestExitCode=!ErrorLevel!
set DOTNET_ReadyToRun=
if %CLRTestExitCode% neq %CLRTestExpectedExitCode% exit /b %CLRTestExitCode%
call "%CORE_ROOT%\corerun" r2r\BasicTestWithMcj.dll
set CLRTestExitCode=!ErrorLevel!
if %CLRTestExitCode% neq %CLRTestExpectedExitCode% exit /b %CLRTestExitCode%
del /f /q profile.mcj 2>nul
exit /b %CLRTestExpectedExitCode%
endlocal