зеркало из https://github.com/dotnet/sdk.git
183 строки
12 KiB
XML
183 строки
12 KiB
XML
<Project Sdk="Microsoft.DotNet.Helix.Sdk">
|
|
|
|
<PropertyGroup>
|
|
<HelixType>test/product/</HelixType>
|
|
<Creator Condition="'$(BUILD_BUILDNUMBER)' != '' and '$(HelixAccessToken)' == ''">sdk-dev</Creator>
|
|
|
|
<IncludeDotNetCli>false</IncludeDotNetCli>
|
|
|
|
<EnableAzurePipelinesReporter Condition="'$(BUILD_BUILDNUMBER)' != ''">true</EnableAzurePipelinesReporter>
|
|
|
|
<XUnitWorkItemTimeout>00:45:00</XUnitWorkItemTimeout>
|
|
</PropertyGroup>
|
|
|
|
<ItemGroup>
|
|
<SDKCustomXUnitProject Condition="'$(RunAoTTests)' != 'true'" Include="**\*.Tests.csproj" Exclude="**\*.AoT.Tests.csproj;**\Microsoft.DotNet.Tools.Tests.Utilities.csproj;**\core-sdk-tasks.Tests.csproj;**\EndToEnd-Installer.Tests.csproj;TestAssets\**\*.Tests.csproj" />
|
|
<!--containers tests end with UnitTests and IntegrationTests, therefore included manually -->
|
|
<SDKCustomXUnitProject Condition="'$(RunAoTTests)' != 'true'" Include="containerize.UnitTests\containerize.UnitTests.csproj" />
|
|
<SDKCustomXUnitProject Condition="'$(RunAoTTests)' != 'true' And $(_AGENTOSNAME) != 'Windows_NT_FullFramework'" Include="Microsoft.NET.Build.Containers.IntegrationTests\Microsoft.NET.Build.Containers.IntegrationTests.csproj" />
|
|
<!-- on Windows_NT_FullFramework leg, net472 tests should be run -->
|
|
<SDKCustomXUnitProject Condition="'$(RunAoTTests)' != 'true' And $(_AGENTOSNAME) == 'Windows_NT_FullFramework'" Include="Microsoft.NET.Build.Containers.IntegrationTests\Microsoft.NET.Build.Containers.IntegrationTests.csproj">
|
|
<TargetFramework>net472</TargetFramework>
|
|
<RuntimeTargetFramework>net472</RuntimeTargetFramework>
|
|
</SDKCustomXUnitProject>
|
|
<SDKCustomXUnitProject Condition="'$(RunAoTTests)' != 'true'" Include="Microsoft.NET.Build.Containers.UnitTests\Microsoft.NET.Build.Containers.UnitTests.csproj" />
|
|
<SDKCustomXUnitProject Condition="'$(RunAoTTests)' != 'true'" Include="..\src\Tasks\Microsoft.NET.Build.Extensions.Tasks.UnitTests\Microsoft.NET.Build.Extensions.Tasks.UnitTests.csproj">
|
|
<ExcludeAdditionalParameters>true</ExcludeAdditionalParameters>
|
|
</SDKCustomXUnitProject>
|
|
<SDKCustomXUnitProject Condition="'$(RunAoTTests)' != 'true'" Include="..\src\Tasks\Microsoft.NET.Build.Tasks.UnitTests\Microsoft.NET.Build.Tasks.UnitTests.csproj">
|
|
<ExcludeAdditionalParameters>true</ExcludeAdditionalParameters>
|
|
</SDKCustomXUnitProject>
|
|
<SDKCustomXUnitProject Condition="'$(RunAoTTests)' == 'true'" Include="**\*.AoT.Tests.csproj" />
|
|
<SDKCustomXUnitProject Condition="'$(RunAoTTests)' != 'true' And $(_AGENTOSNAME) == 'Windows_NT_FullFramework'" Include="Microsoft.DotNet.MSBuildSdkResolver.Tests\Microsoft.DotNet.MSBuildSdkResolver.Tests.csproj">
|
|
<TargetFramework>net472</TargetFramework>
|
|
<RuntimeTargetFramework>net472</RuntimeTargetFramework>
|
|
</SDKCustomXUnitProject>
|
|
<SDKCustomXUnitProject Condition="'$(RunAoTTests)' != 'true' And $(_AGENTOSNAME) == 'Windows_NT_FullFramework'" Include="Microsoft.DotNet.ApiCompat.IntegrationTests\Microsoft.DotNet.ApiCompat.IntegrationTests.csproj">
|
|
<TargetFramework>net472</TargetFramework>
|
|
<RuntimeTargetFramework>net472</RuntimeTargetFramework>
|
|
</SDKCustomXUnitProject>
|
|
<SDKCustomXUnitProject Condition="'$(RunAoTTests)' != 'true' And $(_AGENTOSNAME) == 'Windows_NT_FullFramework'" Include="Microsoft.DotNet.PackageValidation.Tests\Microsoft.DotNet.PackageValidation.Tests.csproj">
|
|
<TargetFramework>net472</TargetFramework>
|
|
<RuntimeTargetFramework>net472</RuntimeTargetFramework>
|
|
</SDKCustomXUnitProject>
|
|
<SDKCustomXUnitProject Condition="'$(RunAoTTests)' != 'true' And $(_AGENTOSNAME) == 'Windows_NT_FullFramework'" Include="Microsoft.NET.Sdk.Publish.Tasks.Tests\Microsoft.NET.Sdk.Publish.Tasks.Tests.csproj">
|
|
<TargetFramework>net472</TargetFramework>
|
|
<RuntimeTargetFramework>net472</RuntimeTargetFramework>
|
|
</SDKCustomXUnitProject>
|
|
|
|
<!-- Don't run MSI installation tests in Helix / CI -->
|
|
<SdkCustomXUnitProject Remove="dotnet-MsiInstallation.Tests\**\*" />
|
|
</ItemGroup>
|
|
|
|
<ItemGroup Condition=" '$(CustomHelixTargetQueue)' != '' ">
|
|
<HelixTargetQueue Include="$(CustomHelixTargetQueue)" />
|
|
</ItemGroup>
|
|
|
|
<Import Project="xunit-runner\XUnitRunner.targets" />
|
|
|
|
<!-- need to be a target in order to have IsPosixShell available -->
|
|
<Target Name="CopyHelixFiles" AfterTargets="Publish">
|
|
|
|
<ItemGroup>
|
|
<BuiltSdks Include="$(RepoRoot)artifacts\bin\$(Configuration)\Sdks\**\*.*" />
|
|
|
|
<!-- All the following files are just to get full framework msbuild while avoid to duplicated arcade logic by copying
|
|
arcade and run it -->
|
|
<Engfolder Include="$(RepoRoot)eng\**\*.*" />
|
|
<DotToolsFolder Include="$(RepoRoot).tools\**\*.*" />
|
|
<GlobalJson Include="$(RepoRoot)global.json" />
|
|
<!-- Get full framework msbuild end -->
|
|
|
|
<!-- include .dotnet folder. So there is no extra first run experience run during the test -->
|
|
<DotnetCliHome Include="$(ArtifactsTmpDir).dotnet\**\*.*" />
|
|
|
|
<Testpackages Include="$(ArtifactsTmpDir)testpackages\**\*.*" />
|
|
|
|
<!-- include Container artifacts for running test in Helix -->
|
|
<ContainerFiles Include="$(ArtifactsTmpDir)Container\**\*.*" />
|
|
|
|
<LockFiles Include="..\src\Tasks\Microsoft.NET.Build.Tasks.UnitTests\LockFiles\**\*.*" />
|
|
|
|
<AssetFiles Include="TestAssets\**\*.*" />
|
|
|
|
<!-- Files in testExecutionDirectory to prevent environment interference -->
|
|
<TestExecutionDirectoryFiles Include="$(ArtifactsTmpDir)NuGet.config" />
|
|
<TestExecutionDirectoryFiles Include="$(ArtifactsTmpDir)Directory.Build.props" />
|
|
<TestExecutionDirectoryFiles Include="$(ArtifactsTmpDir)Directory.Build.targets" />
|
|
<TestExecutionDirectoryFiles Include="$(RepoRoot)testAsset.props" />
|
|
<TestExecutionDirectoryFiles Include="$(RepoRoot)eng\Versions.props">
|
|
<DestinationFolder>eng/</DestinationFolder>
|
|
</TestExecutionDirectoryFiles>
|
|
<TestExecutionDirectoryFiles Include="$(RepoRoot)eng\ManualVersions.props">
|
|
<DestinationFolder>eng/</DestinationFolder>
|
|
</TestExecutionDirectoryFiles>
|
|
|
|
<FilesInHelixRoot Include="$(RepoRoot)artifacts\tmp\$(Configuration)\NuGet.config" />
|
|
<FilesInHelixRoot Condition="$([MSBuild]::IsOSPlatform(`Windows`))" Include="$(RepoRoot)build\RunTestsOnHelix.cmd" />
|
|
<FilesInHelixRoot Condition=" '$([MSBuild]::IsOSPlatform(`Windows`))' == 'false' " Include="$(RepoRoot)build\RunTestsOnHelix.sh" />
|
|
</ItemGroup>
|
|
|
|
<PropertyGroup>
|
|
<HelixPayloadOnHost>$(RepoRoot)artifacts\tmp\Helixpayload</HelixPayloadOnHost>
|
|
</PropertyGroup>
|
|
|
|
<Copy SourceFiles="@(Engfolder)" DestinationFiles="@(Engfolder->'$(HelixPayloadOnHost)\eng\%(RecursiveDir)%(Filename)%(Extension)')" />
|
|
<Copy SourceFiles="@(GlobalJson)" DestinationFiles="@(GlobalJson->'$(HelixPayloadOnHost)\%(RecursiveDir)%(Filename)%(Extension)')" />
|
|
<Copy SourceFiles="@(DotToolsFolder)" DestinationFiles="@(DotToolsFolder->'$(HelixPayloadOnHost)\%(RecursiveDir)%(Filename)%(Extension)')" />
|
|
|
|
<Copy SourceFiles="@(FilesInHelixRoot)" DestinationFiles="@(FilesInHelixRoot->'$(HelixPayloadOnHost)\%(RecursiveDir)%(Filename)%(Extension)')" />
|
|
|
|
<Copy SourceFiles="@(TestExecutionDirectoryFiles)" DestinationFiles="@(TestExecutionDirectoryFiles->'$(HelixPayloadOnHost)\TestExecutionDirectoryFiles\%(RecursiveDir)%(DestinationFolder)%(Filename)%(Extension)')" />
|
|
<Copy SourceFiles="@(DotnetCliHome)" DestinationFiles="@(DotnetCliHome->'$(HelixPayloadOnHost)\TestExecutionDirectoryFiles\.dotnet\%(RecursiveDir)%(Filename)%(Extension)')" />
|
|
<Copy SourceFiles="@(Testpackages)" DestinationFiles="@(Testpackages->'$(HelixPayloadOnHost)\TestExecutionDirectoryFiles\Testpackages\%(RecursiveDir)%(Filename)%(Extension)')" />
|
|
<Copy SourceFiles="@(ContainerFiles)" DestinationFiles="@(ContainerFiles->'$(HelixPayloadOnHost)\TestExecutionDirectoryFiles\Container\%(RecursiveDir)%(Filename)%(Extension)')" />
|
|
<Copy SourceFiles="@(LockFiles)" DestinationFiles="@(LockFiles->'$(HelixPayloadOnHost)\TestExecutionDirectoryFiles\LockFiles\%(RecursiveDir)%(Filename)%(Extension)')" />
|
|
<Copy SourceFiles="@(AssetFiles)" DestinationFiles="@(AssetFiles->'$(HelixPayloadOnHost)\TestExecutionDirectoryFiles\TestAssets\%(RecursiveDir)%(Filename)%(Extension)')" />
|
|
</Target>
|
|
|
|
<Target Name="AppendHelixPreCommand" BeforeTargets="CoreTest" DependsOnTargets="CopyHelixFiles">
|
|
<PropertyGroup>
|
|
<HelixPreCommands Condition="!$(IsPosixShell)">call %HELIX_CORRELATION_PAYLOAD%\t\RunTestsOnHelix.cmd $(TestFullMSBuild);$(HelixPreCommands)</HelixPreCommands>
|
|
<HelixPreCommands Condition="$(IsPosixShell)">. $HELIX_CORRELATION_PAYLOAD/t/RunTestsOnHelix.sh;$(HelixPreCommands)</HelixPreCommands>
|
|
<HelixPostCommands Condition="!$(IsPosixShell)">PowerShell -ExecutionPolicy ByPass "dotnet nuget locals all -l | ForEach-Object { $_.Split(' ')[1]} | Where-Object{$_ -like '*cache'} | Get-ChildItem -Recurse -File -Filter '*.dat' | Measure";$(HelixPostCommands)</HelixPostCommands>
|
|
<TestDotnetRoot>$(RepoRoot)artifacts\bin\redist\$(Configuration)\dotnet</TestDotnetRoot>
|
|
<TestDotnetVersion>$(Version)</TestDotnetVersion>
|
|
<MSBuildSdkResolverDir>$(RepoRoot)artifacts\bin\Microsoft.DotNet.MSBuildSdkResolver</MSBuildSdkResolverDir>
|
|
<HelixStage0Targz>$(RepoRoot)artifacts\tmp\HelixStage0.tar.gz</HelixStage0Targz>
|
|
<MicrosoftNETBuildExtensions>$(RepoRoot)artifacts\bin\$(Configuration)\Sdks\Microsoft.NET.Build.Extensions</MicrosoftNETBuildExtensions>
|
|
</PropertyGroup>
|
|
|
|
<TarGzFileCreateFromDirectory
|
|
Condition=" '$([MSBuild]::IsOSPlatform(`Windows`))' == 'false' "
|
|
SourceDirectory="$(TestDotnetRoot)"
|
|
DestinationArchive="$(HelixStage0Targz)"
|
|
OverwriteDestination="true" />
|
|
|
|
<ItemGroup>
|
|
<HelixCorrelationPayload Include="$(HelixPayloadOnHost)">
|
|
<PayloadDirectory>$(HelixPayloadOnHost)</PayloadDirectory>
|
|
<Destination>t</Destination>
|
|
</HelixCorrelationPayload>
|
|
|
|
<HelixCorrelationPayload Condition=" '$([MSBuild]::IsOSPlatform(`Windows`))' == 'false' " Include="$(HelixStage0Targz)">
|
|
<Destination>d</Destination>
|
|
</HelixCorrelationPayload>
|
|
|
|
<HelixCorrelationPayload Condition="$([MSBuild]::IsOSPlatform(`Windows`))" Include="$(TestDotnetRoot)">
|
|
<PayloadDirectory>$(TestDotnetRoot)</PayloadDirectory>
|
|
<Destination>d</Destination>
|
|
</HelixCorrelationPayload>
|
|
|
|
<HelixCorrelationPayload Include="$(MicrosoftNETBuildExtensions)">
|
|
<PayloadDirectory>$(MicrosoftNETBuildExtensions)</PayloadDirectory>
|
|
<Destination>ex</Destination>
|
|
</HelixCorrelationPayload>
|
|
|
|
<HelixCorrelationPayload Include="$(MSBuildSdkResolverDir)">
|
|
<PayloadDirectory>$(MSBuildSdkResolverDir)</PayloadDirectory>
|
|
<Destination>r</Destination>
|
|
</HelixCorrelationPayload>
|
|
|
|
<HelixCorrelationPayload Include="SDKTestRunPackages.zip">
|
|
<PayloadDirectory>$(TestDotnetRoot)</PayloadDirectory>
|
|
<Destination>d/.nuget</Destination>
|
|
<Uri>https://netcorenativeassets.blob.core.windows.net/resource-packages/external/any/sdk-test-assets/SDKTestRunPackages.zip</Uri>
|
|
</HelixCorrelationPayload>
|
|
|
|
<HelixCorrelationPayload Include="SDKTestRunPackages2.zip">
|
|
<PayloadDirectory>$(TestDotnetRoot)</PayloadDirectory>
|
|
<Destination>d/.nuget</Destination>
|
|
<Uri>https://netcorenativeassets.blob.core.windows.net/resource-packages/external/any/sdk-test-assets/SDKTestRunPackages2.zip</Uri>
|
|
</HelixCorrelationPayload>
|
|
</ItemGroup>
|
|
</Target>
|
|
|
|
<Target Name="CreateLocalHelixTestLayout" DependsOnTargets="AppendHelixPreCommand">
|
|
<CreateLocalHelixTestLayout
|
|
HelixCorrelationPayload="@(HelixCorrelationPayload)"
|
|
TestOutputDirectory="$(RepoRoot)artifacts\bin\localHelixTestLayout" />
|
|
</Target>
|
|
|
|
</Project>
|