[Tizen] Add support for gbs build for i586, x86_64, armv7l, armv7hl, aarch64 (includi...
[platform/upstream/dotnet/runtime.git] / src / tests / readytorun / tests / mainv2.csproj
1 <Project Sdk="Microsoft.NET.Sdk">
2   <PropertyGroup>
3     <OutputType>exe</OutputType>
4     <CLRTestKind>BuildAndRun</CLRTestKind>
5     <CrossGenTest>false</CrossGenTest>
6   </PropertyGroup>
7   <ItemGroup>
8     <ProjectReference Include="fieldgetter.ilproj" />
9     <ProjectReference Include="testv1\test.csproj" />
10     <ProjectReference Include="CMakeLists.txt" />
11   </ItemGroup>
12   <ItemGroup>
13     <Compile Include="main.cs" />
14   </ItemGroup>
15   <PropertyGroup>
16     <CLRTestBatchPreCommands><![CDATA[
17 $(CLRTestBatchPreCommands)
18
19 REM Suppress some COMPlus variables for the duration of Crossgen2 execution
20 setlocal
21 set "COMPlus_GCName="
22 set "COMPlus_GCStress="
23 set "COMPlus_HeapVerify="
24 set "COMPlus_ReadyToRun="
25
26 DEL test.dll
27 if exist test.dll (
28     echo FAILED to delete test.dll
29     exit /b 1
30 )
31 COPY /Y ..\testv1\test\test.dll test.dll
32 if not exist test.dll (
33     echo FAILED to copy test.dll
34     exit /b 1
35 )
36
37 %Core_Root%\CoreRun.exe %Core_Root%\crossgen2\crossgen2.dll -r:%Core_Root%\*.dll -r:%25CD% -o:mainv2.ni.dll mainv2.dll
38
39 set CrossGenStatus=!ERRORLEVEL!
40 IF NOT !CrossGenStatus!==0 (
41     ECHO Crossgen failed with exitcode - !CrossGenStatus!
42     Exit /b 1
43 )
44 if not exist mainv2.ni.dll (
45     echo FAILED to build mainv2.ni.dll
46     exit /b 1
47 )
48
49 %Core_Root%\CoreRun.exe %Core_Root%\crossgen2\crossgen2.dll -r:%Core_Root%\*.dll -r:%25CD% -o:fieldgetter.ni.dll fieldgetter.dll 
50
51 set CrossGenStatus=!ERRORLEVEL!
52 IF NOT !CrossGenStatus!==0 (
53     ECHO Crossgen failed with exitcode - !CrossGenStatus!
54     Exit /b 1
55 )
56 if not exist fieldgetter.ni.dll (
57     echo FAILED to build fieldgetter.ni.dll
58     exit /b 1
59 )
60 DEL test.dll
61 if exist test.dll (
62     echo FAILED to delete test.dll
63     exit /b 1
64 )
65 COPY /Y ..\testv2\test\test.dll test.dll
66 if not exist test.dll (
67     echo FAILED to copy test.dll
68     exit /b 1
69 )
70
71 %Core_Root%\CoreRun.exe %Core_Root%\crossgen2\crossgen2.dll -r:%Core_Root%\*.dll -r:%25CD% -o:test.ni.dll test.dll 
72
73 set CrossGenStatus=!ERRORLEVEL!
74 IF NOT !CrossGenStatus!==0 (
75     ECHO Crossgen failed with exitcode - !CrossGenStatus!
76     Exit /b 1
77 )
78 if not exist test.ni.dll (
79     echo FAILED to build test.ni.dll
80     exit /b 1
81 )
82
83 endlocal
84 ]]></CLRTestBatchPreCommands>
85     <BashCLRTestPreCommands><![CDATA[
86 $(BashCLRTestPreCommands)
87
88 # Suppress some COMPlus variables for the duration of Crossgen2 execution
89 export -n COMPlus_GCName COMPlus_GCStress COMPlus_HeapVerify COMPlus_ReadyToRun
90
91 rm -f test.dll
92 if [ -f test.dll ]
93 then
94   echo Failed to delete test.dll
95   exit 1
96 fi
97 cp ../testv1/test/test.dll test.dll
98 if [ ! -f test.dll ]
99 then
100   echo Failed to copy test.dll
101   exit 1
102 fi
103
104 $CORE_ROOT/corerun $CORE_ROOT/crossgen2/crossgen2.dll $CrossGen2Options -r:$CORE_ROOT/*.dll -r:`pwd` -o:mainv2.ni.dll mainv2.dll
105
106 __cgExitCode=$?
107 if [ $__cgExitCode -ne 0 ]
108 then
109   echo Crossgen failed with exitcode: $__cgExitCode
110   exit 1
111 fi
112 if [ ! -f mainv2.ni.dll ]
113 then
114   echo Failed to build mainv2.ni.dll
115   exit 1
116 fi
117
118 $CORE_ROOT/corerun $CORE_ROOT/crossgen2/crossgen2.dll $CrossGen2Options -r:$CORE_ROOT/*.dll -r:`pwd` -o:fieldgetter.ni.dll fieldgetter.dll
119
120 __cgExitCode=$?
121 if [ $__cgExitCode -ne 0 ]
122 then
123   echo Crossgen failed with exitcode: $__cgExitCode
124   exit 1
125 fi
126 if [ ! -f fieldgetter.ni.dll ]
127 then
128   echo Failed to build fieldgetter.ni.dll
129   exit 1
130 fi
131 rm -f test.dll
132 if [ -f test.dll ]
133 then
134   echo Failed to delete test.dll
135   exit 1
136 fi
137 cp ../testv2/test/test.dll test.dll
138 if [ ! -f test.dll ]
139 then
140   echo Failed to copy test.dll
141   exit 1
142 fi
143
144 $CORE_ROOT/corerun $CORE_ROOT/crossgen2/crossgen2.dll $CrossGen2Options -r:$CORE_ROOT/*.dll -r:`pwd` -o:test.ni.dll test.dll
145
146 __cgExitCode=$?
147 if [ $__cgExitCode -ne 0 ]
148 then
149   echo Crossgen failed with exitcode: $__cgExitCode
150   exit 1
151 fi
152 if [ ! -f test.ni.dll ]
153 then
154   echo Failed to build test.ni.dll
155   exit 1
156 fi
157
158 export COMPlus_GCName COMPlus_GCStress COMPlus_HeapVerify COMPlus_ReadyToRun
159 ]]></BashCLRTestPreCommands>
160   </PropertyGroup>
161 </Project>