-
Notifications
You must be signed in to change notification settings - Fork 390
Expand file tree
/
Copy pathUnitTests.proj
More file actions
154 lines (133 loc) · 7.61 KB
/
Copy pathUnitTests.proj
File metadata and controls
154 lines (133 loc) · 7.61 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
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
154
<Project DefaultTargets="Test">
<!-- <Import Sdk="Microsoft.DotNet.Helix.Sdk" Project="Sdk.props"/> -->
<!-- Using locally built version of the helix sdk, normal projects replace the below Import and PropertyGroup with the SDK import above-->
<Import Project="$(MSBuildThisFileDirectory)\..\src\Microsoft.DotNet.Helix\Sdk\sdk\Sdk.props"/>
<PropertyGroup>
<TargetFramework>$(BundledNETCoreAppTargetFramework)</TargetFramework>
<MicrosoftDotNetHelixSdkTasksAssembly>$(MSBuildThisFileDirectory)../artifacts/bin/Microsoft.DotNet.Helix.Sdk/$(Configuration)/Microsoft.DotNet.Helix.Sdk.dll</MicrosoftDotNetHelixSdkTasksAssembly>
<MicrosoftDotNetHelixSdkTasksFactory>TaskHostFactory</MicrosoftDotNetHelixSdkTasksFactory>
</PropertyGroup>
<PropertyGroup>
<HelixType>test/product/</HelixType>
<HelixJobName>Arcade Job Name</HelixJobName>
<IncludeDotNetCli>true</IncludeDotNetCli>
<DotNetCliPackageType>sdk</DotNetCliPackageType>
<TestRunNamePrefix>$(AGENT_JOBNAME) run on </TestRunNamePrefix>
<XUnitWorkitemTimeout>300</XUnitWorkitemTimeout>
</PropertyGroup>
<ItemGroup>
<HelixWorkItem Include="JUnitTest">
<Command>echo 'done!'</Command>
<PayloadDirectory>$(MSBuildThisFileDirectory)Junit</PayloadDirectory>
</HelixWorkItem>
</ItemGroup>
<ItemGroup>
<AzurePipelinesExpectedTestFailure Include="HelixReporterTests.failure1"/>
<AzurePipelinesExpectedTestFailure Include="HelixReporterTests.failure2"/>
</ItemGroup>
<ItemGroup>
<HelixWorkItem Include="TrxTest">
<Command>echo 'done!'</Command>
<PayloadDirectory>$(MSBuildThisFileDirectory)Trx</PayloadDirectory>
</HelixWorkItem>
</ItemGroup>
<ItemGroup>
<AzurePipelinesExpectedTestFailure Include="HelixReporter.TRXTests.Fail1"/>
<AzurePipelinesExpectedTestFailure Include="HelixReporter.TRXTests.HelixReporter.TRX.Fail2"/>
<AzurePipelinesExpectedTestFailure Include="tests.UnitTest2.ExpectedFailureTheoryTest"/>
</ItemGroup>
<ItemGroup>
<XUnitProject Include="..\src\**\*.Tests.csproj"/>
<!-- XUnit v3 tests are self-hosting executables and use XUnitV3Project instead -->
<XUnitProject Remove="..\src\Microsoft.DotNet.XUnitV3Extensions\tests\Microsoft.DotNet.XUnitV3Extensions.Tests.csproj"/>
<XUnitProject Remove="..\src\Microsoft.DotNet.XUnitV3Extensions\tests\Microsoft.DotNet.XUnitV3Extensions.AlwaysFalseConditionalAssembly.Tests.csproj"/>
</ItemGroup>
<ItemGroup>
<XUnitV3Project Include="..\src\Microsoft.DotNet.XUnitV3Extensions\tests\Microsoft.DotNet.XUnitV3Extensions.Tests.csproj"/>
<!--
The assembly-level [ConditionalAssembly] in this project always evaluates to false,
tagging every test with the 'category=failing' trait. Filter that trait out so the
deliberately failing test is skipped on Helix; ignore the MTP "zero tests ran" exit
code (8) since no tests run after the filter. This validates that the attribute is
actually applied to all tests in the assembly.
-->
<XUnitV3Project Include="..\src\Microsoft.DotNet.XUnitV3Extensions\tests\Microsoft.DotNet.XUnitV3Extensions.AlwaysFalseConditionalAssembly.Tests.csproj">
<Arguments>--filter-not-trait "category=failing" --ignore-exit-code 8</Arguments>
</XUnitV3Project>
</ItemGroup>
<ItemGroup>
<HelixWorkItem Include="FailingXUnitTestsTest">
<Command>echo 'done!'</Command>
<PayloadDirectory>$(MSBuildThisFileDirectory)XUnit</PayloadDirectory>
</HelixWorkItem>
</ItemGroup>
<!-- Exercise Helix failure reporting path for Xunit -->
<ItemGroup>
<AzurePipelinesExpectedTestFailure Include="XunitReportingTests.ExerciseXunitCharacterFilteringFailurePath"/>
</ItemGroup>
<ItemGroup Condition=" '$(HelixAccessToken)' != '' ">
<HelixTargetQueue Include="(AlmaLinux.9.Amd64)Ubuntu.2204.Amd64@mcr.microsoft.com/dotnet-buildtools/prereqs:almalinux-9-helix-amd64">
<TestRunName>$(TestRunNamePrefix)AlmaLinux.9.Amd64</TestRunName>
</HelixTargetQueue>
<HelixTargetQueue Include="Windows.11.Amd64.Client"/>
<HelixTargetQueue Include="(Debian.13.Amd64)ubuntu.2204.amd64@mcr.microsoft.com/dotnet-buildtools/prereqs:debian-13-helix-amd64">
<TestRunName>$(TestRunNamePrefix)Debian.13.Amd64</TestRunName>
</HelixTargetQueue>
<HelixTargetQueue Include="OSX.15.Amd64"/>
</ItemGroup>
<PropertyGroup Condition=" '$(HelixAccessToken)' == '' ">
<IsExternal>true</IsExternal>
<Creator>$(BUILD_SOURCEVERSIONAUTHOR)</Creator>
<Creator Condition=" '$(Creator)' == ''">anon</Creator>
</PropertyGroup>
<ItemGroup Condition=" '$(HelixAccessToken)' == '' ">
<HelixTargetQueue Include="(AlmaLinux.9.Amd64.Open)Ubuntu.2204.Amd64.Open@mcr.microsoft.com/dotnet-buildtools/prereqs:almalinux-9-helix-amd64">
<TestRunName>$(TestRunNamePrefix)AlmaLinux.9.Amd64.Open</TestRunName>
</HelixTargetQueue>
<HelixTargetQueue Include="Windows.11.Amd64.Client.Open"/>
<HelixTargetQueue Include="(Debian.13.Amd64.Open)ubuntu.2204.amd64.open@mcr.microsoft.com/dotnet-buildtools/prereqs:debian-13-helix-amd64">
<TestRunName>$(TestRunNamePrefix)Debian.13.Amd64.Open</TestRunName>
</HelixTargetQueue>
<HelixTargetQueue Include="OSX.15.Amd64.Open"/>
</ItemGroup>
<PropertyGroup Condition="!$(HelixTargetQueue.StartsWith('Windows'))">
<HelixPreCommands>$(HelixPreCommands);find $HELIX_CORRELATION_PAYLOAD -type f</HelixPreCommands>
<HelixPreCommands>$(HelixPreCommands);find . -type f</HelixPreCommands>
<!-- Remote Executor tests tend to make too many dumps for some OSes, and we're not testing dump functionality in Arcade's tests -->
<HelixPreCommands>$(HelixPreCommands);ulimit -c 0</HelixPreCommands>
</PropertyGroup>
<PropertyGroup Condition="$(HelixTargetQueue.StartsWith('Windows'))">
<HelixPreCommands>$(HelixPreCommands);dir /s %HELIX_CORRELATION_PAYLOAD%</HelixPreCommands>
<HelixPreCommands>$(HelixPreCommands);dir /s</HelixPreCommands>
</PropertyGroup>
<!-- Useless stuff to make Arcade SDK happy -->
<PropertyGroup>
<Language>msbuild</Language>
</PropertyGroup>
<Target Name="Pack"/>
<!-- Yields an existing archive that will fail if ArchivePayload doesn't work -->
<Target Name="ZipPrexistingArchive" BeforeTargets="Build">
<MakeDir Directories="$(IntermediateOutputPath)\correlationarchivepayload" />
<WriteLinesToFile
File="$(IntermediateOutputPath)\correlationarchivepayload\testArchivePayload.txt"
Lines="I am a test Archive Payload"
Overwrite="true" />
<ZipDirectory Overwrite="True"
SourceDirectory="$(IntermediateOutputPath)\correlationarchivepayload"
DestinationFile="$(MSBuildProjectDirectory)\archivepayload.zip" />
<RemoveDir Directories="$(IntermediateOutputPath)\correlationarchivepayload" />
</Target>
<!-- Attach the ArchivePayload to all Helix work items to validate uploading them (and via logs whether caching occurs) -->
<ItemGroup>
<HelixCorrelationPayload Include="$(MSBuildProjectDirectory)\archivepayload.zip" />
</ItemGroup>
<!-- <Import Sdk="Microsoft.DotNet.Helix.Sdk" Project="Sdk.targets"/> -->
<!-- Using locally built version of the helix sdk, normal projects replace the below Import with the SDK import above-->
<Import Project="$(MSBuildThisFileDirectory)\..\src\Microsoft.DotNet.Helix\Sdk\sdk\Sdk.targets"/>
<ItemGroup>
<HelixWorkItem Condition="$(HelixTargetQueue.StartsWith('Windows'))" Include="AspNetCoreTest">
<Command>powershell %HELIX_WORKITEM_PAYLOAD%\aspnet-versioncheck.ps1 -aspNetCoreVersion $(AspNetCoreRuntimeVersion)</Command>
<PayloadDirectory>$(MSBuildThisFileDirectory)\AspNetVersionCheck</PayloadDirectory>
</HelixWorkItem>
</ItemGroup>
</Project>