-
Notifications
You must be signed in to change notification settings - Fork 4.8k
/
dirs.proj
153 lines (121 loc) · 8.05 KB
/
dirs.proj
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
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="Directory.Build.props" />
<Target Name="ResolveDisabledProjects" BeforeTargets="BuildAllProjects;CopyAllNativeTestProjectBinaries" >
<PropertyGroup>
<TestRoot>$(RepoRoot)src\tests\</TestRoot>
</PropertyGroup>
<ItemGroup>
<DisabledProjects Include="$(TestRoot)*\**\cs_template.csproj" />
<DisabledProjects Include="$(TestRoot)Common\**\*.*proj" />
<DisabledProjects Include="$(TestRoot)FunctionalTests\**\*.csproj" /> <!-- They need to be isolated from the existing setup -->
<DisabledProjects Include="$(TestRoot)GC\Performance\Framework\GCPerfTestFramework.csproj" />
<DisabledProjects Include="$(TestRoot)Loader\classloader\StaticVirtualMethods\**\generatetest.csproj" /> <!-- test generators -->
<DisabledProjects Include="$(TestRoot)Performance\Scenario\JitBench\unofficial_dotnet\JitBench.csproj" /> <!-- no official build support for SDK-style netcoreapp2.0 projects -->
<DisabledProjects Include="$(TestRoot)TestWrappers*\**\*.csproj" />
<DisabledProjects Include="$(TestRoot)nativeaot\**\*.csproj" Condition="'$(TestBuildMode)' != 'nativeaot'" />
</ItemGroup>
<ItemGroup>
<BuildTestProjects Include="$(__BuildTestProject.Split(';'))" />
<BuildTestDirs Include="$(__BuildTestDir.Split(';'))" />
<BuildTestTrees Include="$(__BuildTestTree.Split(';'))" />
</ItemGroup>
<ItemGroup Condition="'@(BuildTestProjects)' != ''">
<AllProjects Include="$([MSBuild]::NormalizePath('$(TestRoot)', '%(BuildTestProjects.Identity)'))" Exclude="@(DisabledProjects)" />
</ItemGroup>
<ItemGroup Condition="'@(BuildTestDirs)' != ''">
<AllProjects Include="$([MSBuild]::NormalizeDirectory('$(TestRoot)', '%(BuildTestDirs.Identity)'))\*.csproj" Exclude="@(DisabledProjects)" />
<AllProjects Include="$([MSBuild]::NormalizeDirectory('$(TestRoot)', '%(BuildTestDirs.Identity)'))\*.fsproj" Exclude="@(DisabledProjects)" />
<AllProjects Include="$([MSBuild]::NormalizeDirectory('$(TestRoot)', '%(BuildTestDirs.Identity)'))\*.ilproj" Exclude="@(DisabledProjects)" />
</ItemGroup>
<ItemGroup Condition="'@(BuildTestTrees)' != ''">
<AllProjects Include="$([MSBuild]::NormalizeDirectory('$(TestRoot)', '%(BuildTestTrees.Identity)'))\**\*.csproj" Exclude="@(DisabledProjects)" />
<AllProjects Include="$([MSBuild]::NormalizeDirectory('$(TestRoot)', '%(BuildTestTrees.Identity)'))\**\*.fsproj" Exclude="@(DisabledProjects)" />
<AllProjects Include="$([MSBuild]::NormalizeDirectory('$(TestRoot)', '%(BuildTestTrees.Identity)'))\**\*.ilproj" Exclude="@(DisabledProjects)" />
</ItemGroup>
<ItemGroup Condition="'@(BuildTestProjects)' == '' and '@(BuildTestDirs)' == '' and '@(BuildTestTrees)' == ''">
<AllProjects Include="$(TestRoot)**\*.csproj" Exclude="@(DisabledProjects)" />
<AllProjects Include="$(TestRoot)**\*.fsproj" Exclude="@(DisabledProjects)" />
<AllProjects Include="$(TestRoot)**\*.ilproj" Exclude="@(DisabledProjects)" />
</ItemGroup>
<!-- All the test projects are partitioned into the test groups as defined below.
Each of the test groups is meant to be built by a separate MSBuild invocation with specified $(__TestGroupToBuild) property. -->
<ItemGroup Condition=" '$(CLRTestPriorityToBuild)' == '0' ">
<!-- Fast filter to avoid files with Pri1 projects, this isn't completely accurate, but its close. Any Pri1 tests not caught by this will be skipped,
and any tests intended as Pri0 will end up running as Pri1, which isn't terrible. This trick allows us to avoid loading each project into msbuild
and evaluating it, which is a substantial improvement to the performance of the "Copy native test components to test output folder" task in our test runs -->
<Pri1Projects Include="@(AllProjects)" Condition="$([System.Text.RegularExpressions.Regex]::IsMatch($([System.IO.File]::ReadAllText('%(AllProjects.FullPath)')), '<CLRTestPriority>1</CLRTestPriority>'))" />
<AllProjects Remove="@(Pri1Projects)" />
<!-- Group number k consists of all the test projects P such that _GroupStartsWith(k) <= P.Identity < _GroupStartsWith(k+1).
In other words, ItemGroup _GroupStartsWith defines boundaries between the test groups. -->
<!-- MSBuild does not allow specifying an item with empty identity but if it was possible Group number 1 would be defined as follows:
<_GroupStartsWith Include="">
<GroupNumber>1</GroupNumber>
</_GroupStartsWith> -->
<_GroupStartsWith Include="$(TestRoot)JIT\Methodical\Boxing\callconv\_relinstance_il.ilproj">
<GroupNumber>2</GroupNumber>
</_GroupStartsWith>
<_GroupStartsWith Include="$(TestRoot)JIT\Regression\CLR-x86-JIT\V1-M12-Beta2\b35351\b35351.ilproj">
<GroupNumber>3</GroupNumber>
</_GroupStartsWith>
</ItemGroup>
<ItemGroup Condition=" '$(CLRTestPriorityToBuild)' == '1' ">
<!-- See above for explanation.
<_GroupStartsWith Include="">
<GroupNumber>1</GroupNumber>
</_GroupStartsWith> -->
<_GroupStartsWith Include="$(TestRoot)JIT\CodeGenBringUpTests\DblNeg_ro.csproj">
<GroupNumber>2</GroupNumber>
</_GroupStartsWith>
<_GroupStartsWith Include="$(TestRoot)JIT\Directed\shift\uint32_d.csproj">
<GroupNumber>3</GroupNumber>
</_GroupStartsWith>
<_GroupStartsWith Include="$(TestRoot)JIT\Methodical\AsgOp\r8\r8flat_cs_r.csproj">
<GroupNumber>4</GroupNumber>
</_GroupStartsWith>
<_GroupStartsWith Include="$(TestRoot)JIT\Methodical\eh\finallyexec\tryCatchFinallyThrow_nonlocalexit4_ro.csproj">
<GroupNumber>5</GroupNumber>
</_GroupStartsWith>
<_GroupStartsWith Include="$(TestRoot)JIT\Regression\CLR-x86-JIT\V1-M09.5-PDC\b25701\b25701.ilproj">
<GroupNumber>6</GroupNumber>
</_GroupStartsWith>
<_GroupStartsWith Include="$(TestRoot)JIT\Regression\JitBlue\GitHub_19171\GitHub_19171.csproj">
<GroupNumber>7</GroupNumber>
</_GroupStartsWith>
<_GroupStartsWith Include="$(TestRoot)JIT\jit64\valuetypes\nullable\box-unbox\value\box-unbox-value030.csproj">
<GroupNumber>8</GroupNumber>
</_GroupStartsWith>
<_GroupStartsWith Include="$(TestRoot)Loader\classloader\TypeGeneratorTests\TypeGeneratorTest225\Generated225.ilproj">
<GroupNumber>9</GroupNumber>
</_GroupStartsWith>
<_GroupStartsWith Include="$(TestRoot)Loader\classloader\generics\VSD\Class2_ImplicitOverrideVirtualNewslot.csproj">
<GroupNumber>10</GroupNumber>
</_GroupStartsWith>
</ItemGroup>
<PropertyGroup Condition="'$(__TestGroupToBuild)' != ''">
<!-- This computes lower inclusive and upper exclusive boundaries for Group number $(__TestGroupToBuild). -->
<_GroupStartsWith>@(_GroupStartsWith->WithMetadataValue("GroupNumber", $(__TestGroupToBuild)))</_GroupStartsWith>
<_GroupEndsWithExcl>@(_GroupStartsWith->WithMetadataValue("GroupNumber", $([MSBuild]::Add($(__TestGroupToBuild), 1))))</_GroupEndsWithExcl>
</PropertyGroup>
<ItemGroup>
<AllProjects>
<InGroup>True</InGroup>
</AllProjects>
<AllProjects Condition=" '$(_GroupStartsWith)' != '' And $([System.StringComparer]::Ordinal.Compare($(_GroupStartsWith), %(Identity))) > 0 ">
<InGroup>False</InGroup>
</AllProjects>
<AllProjects Condition=" '$(_GroupEndsWithExcl)' != '' And $([System.StringComparer]::Ordinal.Compare(%(Identity), $(_GroupEndsWithExcl))) >= 0 ">
<InGroup>False</InGroup>
</AllProjects>
</ItemGroup>
<ItemGroup>
<Project Include="@(AllProjects->WithMetadataValue('InGroup', 'True'))">
<AdditionalProperties>TargetOS=$(TargetOS)</AdditionalProperties>
</Project>
</ItemGroup>
</Target>
<Import Project="$(MSBuildThisFileDirectory)dir.traversal.targets" />
<!-- Override clean from dir.traversal.targets and just remove the full TestBinDir -->
<Target Name="Clean">
<RemoveDir Directories="$(TestBinDir)" />
</Target>
</Project>