blob: 2e93533eed985b4e2e53e0dba63585b206e3ffd3 (
plain)
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
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
|
<Project>
<Import Project="Sdk.props" Sdk="Microsoft.NET.Sdk" />
<PropertyGroup>
<Configurations>Debug;Release</Configurations>
<LangVersion>latest</LangVersion>
</PropertyGroup>
<PropertyGroup Condition="'$(MonoBuild)' == ''">
<TargetFramework>netcoreapp3.0</TargetFramework>
<DefineConstants>$(DefineConstants);ILLINK</DefineConstants>
<DefineConstants Condition="'$(Configuration)' == 'Debug'">$(DefineConstants);DEBUG</DefineConstants>
<!-- Simulate https://github.com/dotnet/sdk/pull/2073 until it ships. -->
<DefineConstants Condition="'$(TargetFramework)' == 'netcoreapp3.0'">$(DefineConstants);NETCOREAPP</DefineConstants>
</PropertyGroup>
<PropertyGroup Condition="'$(MonoBuild)' != ''">
<TargetFramework>net471</TargetFramework>
</PropertyGroup>
<ItemGroup>
<Folder Include="Properties\" />
<Folder Include="TestCasesRunner\" />
<Folder Include="Extensions\" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\..\external\cecil\Mono.Cecil.csproj" />
<ProjectReference Include="..\..\external\cecil\symbols\pdb\Mono.Cecil.Pdb.csproj" />
<ProjectReference Include="..\..\src\linker\Mono.Linker.csproj" />
<ProjectReference Include="..\Mono.Linker.Tests.Cases\Mono.Linker.Tests.Cases.csproj" />
<ProjectReference Include="..\Mono.Linker.Tests.Cases.Expectations\Mono.Linker.Tests.Cases.Expectations.csproj" />
</ItemGroup>
<ItemGroup Condition="'$(MonoBuild)' == ''">
<PackageReference Include="System.CodeDom" Version="4.5.0" />
<PackageReference Include="Microsoft.Win32.Registry" Version="4.5.0" />
<PackageReference Include="Microsoft.CodeAnalysis.CSharp" Version="2.10.0" />
<PackageReference Include="nunit" Version="3.10.0" />
<PackageReference Include="NUnit3TestAdapter" Version="3.10.0" />
<!-- This reference is purely so that the linker can resolve this
dependency of mscorlib. It is not actually required to build
the tests. -->
<PackageReference Include="System.Threading.AccessControl" Version="4.5.0" />
</ItemGroup>
<Target Name="PrepareTools" BeforeTargets="Build" Condition="'$(MonoBuild)' == ''">
<!-- Restore ilasm using ilasm.ilproj. Restore must be done
separately from copy with a different set of input
properties, to force MSBuild to re-evaluate using new props
and targets from the restored package. -->
<PropertyGroup>
<IlasmProject>$(MSBuildThisFileDirectory)../../eng/ilasm.ilproj</IlasmProject>
<IlasmDir>$(ArtifactsDir)tools</IlasmDir>
</PropertyGroup>
<MSBuild Projects="$(IlasmProject)" Targets="Restore" Properties="BaseIntermediateOutputPath=$(IlasmDir)" />
<MSBuild Projects="$(IlasmProject)" Targets="CopyILAsmTool" Properties="BaseIntermediateOutputPath=$(IlasmDir);__BuildPhase=Copy" />
</Target>
<ItemGroup Condition="'$(MonoBuild)' != ''">
<ProjectReference Include="..\..\external\cecil\symbols\mdb\Mono.Cecil.Mdb.csproj" />
<PackageReference Include="NUnit" Version="3.10.0" />
<PackageReference Include="NUnit.ConsoleRunner" Version="3.10.0" />
<PackageReference Include="NUnit3TestAdapter" Version="3.10.0" />
</ItemGroup>
<ItemGroup>
<None Update="TestCases\Dependencies\PInvokesExpectations.json">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
</ItemGroup>
<Target Name="RunTestsOnMono" Condition="'$(MonoBuild)' != ''">
<Exec Command="mono $(PkgNUnit_ConsoleRunner)/tools/nunit3-console.exe --result=TestResults.xml $(OutputPath)Mono.Linker.Tests.dll" />
</Target>
<Import Project="Sdk.targets" Sdk="Microsoft.NET.Sdk" />
<!-- Arcade's custom test imports assume that we are using xunit. -->
<!-- Map the Arcade "Test" target to the "VSTest" target used by "dotnet test" -->
<Target Name="Test" Condition="'$(MonoBuild)' == ''">
<MSBuild Projects="$(MSBuildProjectFile)" Targets="VSTest" />
</Target>
</Project>
|