blob: 56c70481ae7f908e4a7d4a46fd180d697fe88884 (
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
|
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<LangVersion>latest</LangVersion>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
<RunAnalyzers>false</RunAnalyzers>
</PropertyGroup>
<PropertyGroup Condition="'$(MonoBuild)' == ''">
<TargetFramework>net5.0</TargetFramework>
<DefineConstants>$(DefineConstants);ILLINK</DefineConstants>
<DefineConstants Condition="'$(Configuration)' == 'Debug'">$(DefineConstants);DEBUG</DefineConstants>
</PropertyGroup>
<PropertyGroup Condition="'$(MonoBuild)' != ''">
<TargetFramework>net471</TargetFramework>
</PropertyGroup>
<ItemGroup>
<Folder Include="Properties\" />
<Folder Include="TestCasesRunner\" />
<Folder Include="Extensions\" />
</ItemGroup>
<ItemGroup>
<PackageReference Condition="'$(UseCecilPackage)' == 'true'" Include="Mono.Cecil" Version="$(MonoCecilVersion)" />
<ProjectReference Condition="'$(UseCecilPackage)' != 'true'" Include="..\..\external\cecil\Mono.Cecil.csproj" />
<ProjectReference Condition="'$(UseCecilPackage)' != 'true'" 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="Microsoft.CodeAnalysis.CSharp" Version="3.7.0" />
<PackageReference Include="nunit" Version="3.12.0" />
<PackageReference Include="NUnit3TestAdapter" Version="3.17.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>
</PropertyGroup>
<MSBuild Projects="$(IlasmProject)" Targets="Restore" />
<MSBuild Projects="$(IlasmProject)" Targets="CopyILAsmTool" />
</Target>
<ItemGroup Condition="'$(MonoBuild)' != ''">
<ProjectReference Condition="'$(UseCecilPackage)' != 'true'" Include="..\..\external\cecil\symbols\mdb\Mono.Cecil.Mdb.csproj" />
<PackageReference Include="NUnit" Version="3.12.0" />
<PackageReference Include="NUnit.ConsoleRunner" Version="3.10.0" />
<PackageReference Include="NUnit3TestAdapter" Version="3.17.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>
</Project>
|