[Tizen] Add support for gbs build for i586, x86_64, armv7l, armv7hl, aarch64 (includi...
[platform/upstream/dotnet/runtime.git] / src / tests / readytorun / multifolder / multifolder.csproj
1 <Project Sdk="Microsoft.NET.Sdk">
2   <PropertyGroup>
3     <OutputType>exe</OutputType>
4     <CLRTestKind>BuildAndRun</CLRTestKind>
5     <!-- Running Crossgen2 under GCStress takes too long -->
6     <GCStressIncompatible>true</GCStressIncompatible>
7     <AllowUnsafeBlocks>false</AllowUnsafeBlocks>
8     <CLRTestPriority>0</CLRTestPriority>
9
10     <!-- Crossgen2 currently targets x64 and ARM64 only -->
11     <DisableProjectBuild Condition="'$(TargetArchitecture)' != 'x64' and '$(TargetArchitecture)' != 'arm64'">true</DisableProjectBuild>
12
13     <!-- This is an explicit crossgen test -->
14     <CrossGenTest>false</CrossGenTest>
15   </PropertyGroup>
16
17   <ItemGroup>
18     <Compile Include="Root.cs" />
19   </ItemGroup>
20
21   <ItemGroup>
22     <ProjectReference Include="FolderA/FolderA.csproj" />
23     <ProjectReference Include="FolderB/FolderB.csproj" />
24   </ItemGroup>
25
26   <PropertyGroup>
27     <CLRTestBatchPreCommands><![CDATA[
28 $(CLRTestBatchPreCommands)
29
30     set __ResponseFile=%scriptPath%\multifolder.rsp
31     del %__ResponseFile%
32     echo --composite>>%__ResponseFile%
33     echo -r:%21CORE_ROOT%21\System.*.dll>>%__ResponseFile%
34     echo -r:%21CORE_ROOT%21\Microsoft.*.dll>>%__ResponseFile%
35     echo -r:%21CORE_ROOT%21\mscorlib.dll>>%__ResponseFile%
36     echo -r:%21CORE_ROOT%21\netstandard.dll>>%__ResponseFile%
37     echo -o:%scriptPath%\multifolder-composite.dll>>%__ResponseFile%
38     echo --crp:%scriptPath%\..>>%__ResponseFile%
39     echo --targetarch:$(TargetArchitecture)>>%__ResponseFile%
40     echo %scriptPath%\multifolder.dll>>%__ResponseFile%
41     echo %scriptPath%\..\FolderA\FolderA\FolderA.dll>>%__ResponseFile%
42     echo %scriptPath%\..\FolderB\FolderB\FolderB.dll>>%__ResponseFile%
43
44     REM Suppress GC stand alone mode for the duration of Crossgen2 execution
45     set __gcStandaloneModeToRestore=!COMPlus_GCName!
46     set COMPlus_GCName=
47
48     set __Command=%_DebuggerFullPath%
49     REM Tests run locally need __TestDotNetCmd (set by runtest.py) or a compatible 5.0 dotnet runtime in the path
50     if defined __TestDotNetCmd (
51         set __Command=!__Command! "!__TestDotNetCmd!"
52     ) else (
53         set __Command=!__Command! "dotnet"
54     )
55     set __Command=%__Command% "%CORE_ROOT%\crossgen2\crossgen2.dll"
56     set __Command=%__Command% @"%__ResponseFile%"
57
58     echo Response file: %__ResponseFile%
59     type %__ResponseFile%
60     echo ------------------
61     echo Running crossgen2: %__Command%
62     %__Command%
63
64     dir %scriptPath%
65     dir %scriptPath%\multifolder
66
67     set ExePath=multifolder\multifolder.dll
68     set COMPlus_NativeImageSearchPaths=%scriptPath%
69     set COMPlus_GCName=!__gcStandaloneModeToRestore!
70
71 ]]></CLRTestBatchPreCommands>
72     <BashCLRTestPreCommands><![CDATA[
73 $(BashCLRTestPreCommands)
74
75     __OutputDir=$PWD
76     __ResponseFile=$__OutputDir/multifolder.rsp
77     rm $__ResponseFile
78     echo --composite>>$__ResponseFile
79     echo -r:$CORE_ROOT/System.*.dll>>$__ResponseFile
80     echo -r:$CORE_ROOT/Microsoft.*.dll>>$__ResponseFile
81     echo -r:$CORE_ROOT/mscorlib.dll>>$__ResponseFile
82     echo -r:$CORE_ROOT/netstandard.dll>>$__ResponseFile
83     echo -o:$__OutputDir/multifolder-composite.dll>>$__ResponseFile
84     echo --crp:$__OutputDir/..>>$__ResponseFile
85     echo --targetarch:$(TargetArchitecture)>>$__ResponseFile
86     echo $__OutputDir/multifolder.dll>>$__ResponseFile
87     echo $__OutputDir/../FolderA/FolderA/FolderA.dll>>$__ResponseFile
88     echo $__OutputDir/../FolderB/FolderB/FolderB.dll>>$__ResponseFile
89
90     # Suppress GC standalone mode for the duration of Crossgen2 execution
91     local gcstandaloneModeToRestore=$COMPlus_GCName;
92     unset COMPlus_GCName
93
94     __Command=$_DebuggerFullPath
95     # Tests run locally need __TestDotNetCmd (set by runtest.py) or a compatible 5.0 dotnet runtime in the path
96     if [ ! -z ${__TestDotNetCmd+x} ] %3B then
97         __Command+=" $__TestDotNetCmd"
98     else
99         __Command+=" $CORE_ROOT/corerun"
100     fi
101     __Command+=" $CORE_ROOT/crossgen2/crossgen2.dll $CrossGen2Options"
102     __Command+=" @$__ResponseFile"
103
104     echo Response file: $__ResponseFile
105     cat $__ResponseFile
106     echo ------------------
107     echo Running crossgen2: $__Command
108     $__Command
109
110     ExePath=multifolder/multifolder.dll
111     export COMPlus_NativeImageSearchPaths=$__OutputDir
112     export COMPlus_GCName=$gcstandaloneModeToRestore
113
114 ]]></BashCLRTestPreCommands>
115   </PropertyGroup>
116 </Project>