forked from dotnet/runtime
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMergedTestRunner.targets
More file actions
35 lines (29 loc) · 1.67 KB
/
Copy pathMergedTestRunner.targets
File metadata and controls
35 lines (29 loc) · 1.67 KB
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
<!--
This file is intended to be included from all of the merged test runner projects.
Sets IsMergedTestRunnerAssembly.
Expects MergedWrapperProjectReference. Will set Aliases metadata and add into
ProjectReference.
-->
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<IsMergedTestRunnerAssembly>true</IsMergedTestRunnerAssembly>
<EmitCompilerGeneratedFiles Condition="'$(EmitCompilerGeneratedFiles)' == ''">true</EmitCompilerGeneratedFiles>
</PropertyGroup>
<ItemGroup>
<!--
Derive a unique identifier from the project's relative directory + filename.
This ensures that projects with the same filename in different directories
(e.g., COOL/finally.csproj vs simple/finally.csproj) get unique aliases,
preventing alias collisions in the merged runner.
Regex.Replace("%(RelativeDir)%(Filename)", "[^a-zA-Z0-9]", "_")
-->
<MergedWrapperProjectReference Update="**"
Aliases="$([System.String]::Concat("_",$([System.Text.RegularExpressions.Regex]::Replace("%(RelativeDir)%(Filename)", "[^a-zA-Z0-9]", "_"))))" />
<!--
If the merged test runner was specified to be built as Standalone, don't force the referenced projects to be built that way as well.
If we're building all tests as standalone, then don't reference the other test projects from the merged wrapper. We'll only build the tests in the wrapper itself
into it.
-->
<ProjectReference Include="@(MergedWrapperProjectReference)" UndefineProperties="BuildAsStandalone" Condition="'$(BuildAllTestsAsStandalone)' != 'true'" />
</ItemGroup>
</Project>