blob: b84f74928ece692ec6f29ea77331fb191740b9b8 (
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
|
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="14.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
<PropertyGroup>
<!-- When building through build-tests.cmd tests.builds is the main project that is being built. We set IsTestProject to true when the project path has /tests/.
Since IsTestProject is set to false in this case, when TargetGroup = netfx it will add net462 and net47 build configurations if they exist on the test project.
We only want to build tests against current TargetGroup -->
<AdditionalBuildConfigurations Condition="'$(TargetGroup)' == 'netfx'"></AdditionalBuildConfigurations>
<GenerateCodeCoverageReportForAll>true</GenerateCodeCoverageReportForAll>
</PropertyGroup>
<ItemGroup Condition="'$(RunningSharedFrameworkValidation)'=='true'">
<TestProjectExclusions Include="$(MSBuildThisFileDirectory)*\tests\**\System.Data.Odbc.Tests.csproj" />
<TestProjectExclusions Include="$(MSBuildThisFileDirectory)*\tests\**\System.IO.Pipes.Tests.csproj" />
<TestProjectExclusions Include="$(MSBuildThisFileDirectory)*\tests\**\Microsoft.XmlSerializer.Generator.Tests.csproj" />
<TestProjectExclusions Include="$(MSBuildThisFileDirectory)*\tests\**\System.Reflection.Context.Tests.csproj" />
</ItemGroup>
<!-- For UAP we are using an APPX that is registered with a unique ID. Because of that we need to run tests sequentially -->
<PropertyGroup Condition="'$(BuildingUAPVertical)'=='true' and '$(SkipTests)' != 'true' " >
<SerializeProjects>true</SerializeProjects>
</PropertyGroup>
<Import Project="$(ToolsDir)tests.targets" Condition="Exists('$(ToolsDir)tests.targets')" />
<Import Project="$(ToolsDir)VersionTools.targets" Condition="Exists('$(ToolsDir)VersionTools.targets')" />
<PropertyGroup>
<_ProjectPattern Condition="'$(Performance)'!='true'">.Tests</_ProjectPattern>
<_ProjectPattern Condition="'$(Performance)'=='true'">.Performance.Tests</_ProjectPattern>
</PropertyGroup>
<ItemGroup>
<Project Include="$(MSBuildThisFileDirectory)*\tests\**\*$(_ProjectPattern).csproj" Exclude="@(TestProjectExclusions)" />
</ItemGroup>
<Import Project="$(ToolsDir)Build.Post.targets" Condition="Exists('$(ToolsDir)Build.Post.targets')" />
<Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
<Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.traversal.targets))\dir.traversal.targets" />
<PropertyGroup>
<TraversalBuildDependsOn>
MakeCommonResourcesPriFile;
$(TraversalBuildDependsOn)
</TraversalBuildDependsOn>
</PropertyGroup>
<!-- TODO: Can we move this archive test build to BuildTools -->
<UsingTask TaskName="ZipFileCreateFromDependencyLists" Condition="'$(Platform)' == 'ARM64' and '$(ArchiveTests)' == 'true'" AssemblyFile="$(BuildToolsTaskDir)Microsoft.DotNet.Build.Tasks.dll"/>
<Target Name="ArchiveTestBuild" Condition="'$(Platform)' == 'ARM64' and '$(ArchiveTests)' == 'true'" AfterTargets="Build" >
<ItemGroup>
<ExcludeFromArchive Include="nupkg$" />
<ExcludeFromArchive Include="Microsoft.DotNet.BuildTools" />
<ExcludeFromArchive Include="TestData" />
<TestDependencyListFile Include="$(BinDir)/TestDependencies/*.dependencylist.txt" />
</ItemGroup>
<ZipFileCreateFromDependencyLists
DependencyListFiles="@(TestDependencyListFile)"
DestinationArchive="$(TestWorkingDir)$(OSPlatformConfig)/archive/Packages.zip"
RelativePathBaseDirectory="$(PackagesDir)"
OverwriteDestination="true" />
</Target>
</Project>
|