blob: 1d8ed80cbe89f7aa1e83a1403416d035c7fc543f (
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
|
<Project DefaultTargets="Build">
<Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), Directory.Build.props))\Directory.Build.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>
<EnableBenchviewTarget Condition="'$(PerformanceTest)' == 'true'">true</EnableBenchviewTarget>
<EnableFullCoverageReportTarget>true</EnableFullCoverageReportTarget>
<GenerateFullCoverageReport>true</GenerateFullCoverageReport>
<CoverageReportInputPath>$(TestWorkingDir)**/coverage.xml</CoverageReportInputPath>
<CoverageReportDir>$(ArtifactsDir)coverage</CoverageReportDir>
<!-- For UAP we are using an APPX that is registered with a unique ID. Because of that we need to run tests sequentially -->
<SerializeProjects Condition="'$(BuildTests)' != 'true' AND ('$(BuildingUAPVertical)' == 'true' or '$(Coverage)' == 'true' or '$(PerformanceTest)' == 'true')">true</SerializeProjects>
<TraversalBuildDependsOn Condition="'$(BuildingUAPVertical)' == 'true'">MakeCommonResourcesPriFile;$(TraversalBuildDependsOn)</TraversalBuildDependsOn>
</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>
<PropertyGroup>
<TestProjectFilter Condition="'$(Test)' == 'true'">Tests</TestProjectFilter>
<TestProjectFilter Condition="'$(IntegrationTest)' == 'true'">IntegrationTests</TestProjectFilter>
<TestProjectFilter Condition="'$(PerformanceTest)' == 'true'">PerformanceTests</TestProjectFilter>
<_TestProjectFilter Condition="'$(TestProjectFilter)' != ''">.$(TestProjectFilter)</_TestProjectFilter>
<!-- By default build all test project types to capture build errors in CI. -->
<_TestProjectFilter Condition="'$(TestProjectFilter)' == '' or '$(BuildAllTests)' == 'true'">Tests</_TestProjectFilter>
</PropertyGroup>
<ItemGroup Condition="'$(BuildAllConfigurations)' != 'true'">
<!-- Keep in sync with pattern for test projects in build.proj -->
<Project Include="$(SourceDir)*\tests\**\*$(_TestProjectFilter).csproj" Exclude="@(TestProjectExclusions)" />
<Project Include="$(SourceDir)*\tests\**\*$(_TestProjectFilter).vbproj" Exclude="@(TestProjectExclusions)" />
</ItemGroup>
<ItemGroup Condition="'$(BuildAllConfigurations)' == 'true'">
<Project Include="$(RepoRoot)pkg\test\testPackages.proj" />
</ItemGroup>
<Target Name="BinPlaceXUnitRuntimeForNetstandardSuite"
Condition="'$(TargetGroup)' == 'netstandard'"
BeforeTargets="BuildAllProjects">
<!-- Ensure that we binplace all of the xunit assemblies on the netstandard runtime path in order to be able to build netstandard test suite -->
<MSBuild Projects="$(MSBuildThisFileDirectory)../external/test-runtime/XUnit.Runtime.depproj"
Properties="TargetGroup=$(TargetGroup)"
RemoveProperties="Configuration"
ContinueOnError="ErrorAndStop" />
</Target>
<Import Project="$(RepositoryEngineeringDir)dir.traversal.targets" />
</Project>
|