testfx/test/Directory.Build.targets

56 строки
3.3 KiB
XML

<?xml version="1.0" encoding="utf-8"?>
<Project>
<Import Project="../Directory.Build.targets" />
<PropertyGroup Condition=" '$(UseVSTestRunner)' == 'false' ">
<Nullable>enable</Nullable>
<OutputType>Exe</OutputType>
<!-- Disable main generated by VSTest -->
<GenerateProgramFile>false</GenerateProgramFile>
<Architecture Condition=" '$(Architecture)' == '' ">$(PlatformTarget)</Architecture>
<Architecture Condition=" '$(PlatformTarget)' == '' or '$(PlatformTarget)' == 'AnyCpu' ">x64</Architecture>
<ModuleName>$(MSBuildProjectName)_$(TargetFramework)_$(Configuration)_$(Architecture)</ModuleName>
<!-- Arcade runner settings -->
<TestRunnerAdditionalArguments>$(TestRunnerAdditionalArguments) --diagnostic --diagnostic-output-directory $(RepoRoot)artifacts/log/$(Configuration) --diagnostic-output-fileprefix $(ModuleName) --diagnostic-verbosity trace</TestRunnerAdditionalArguments>
<TestRunnerAdditionalArguments Condition=" $([MSBuild]::GetTargetFrameworkIdentifier('$(TargetFramework)')) == '.NETCoreApp' ">$(TestRunnerAdditionalArguments) --crashdump</TestRunnerAdditionalArguments>
<TestRunnerAdditionalArguments>$(TestRunnerAdditionalArguments) --hangdump --hangdump-timeout 15m</TestRunnerAdditionalArguments>
<TestRunnerAdditionalArguments Condition=" '$(EnableCodeCoverage)' == 'True' ">$(TestRunnerAdditionalArguments) --coverage --coverage-settings $(RepoRoot)test/coverage.config --coverage-output $(ModuleName).coverage</TestRunnerAdditionalArguments>
<!-- /Arcade runner settings -->
</PropertyGroup>
<ItemGroup Condition=" '$(UseVSTestRunner)' == 'false' ">
<ProjectReference Include="$(RepoRoot)test\Utilities\Microsoft.Testing.TestInfrastructure\Microsoft.Testing.TestInfrastructure.csproj" />
</ItemGroup>
<ItemGroup Condition=" '$(UseVSTestRunner)' == 'false' ">
<PackageReference Include="Microsoft.Testing.Extensions.CodeCoverage" GeneratePathProperty="True" />
<ProjectReference Include="$(RepoRoot)src\Platform\Microsoft.Testing.Extensions.CrashDump\Microsoft.Testing.Extensions.CrashDump.csproj" />
<ProjectReference Include="$(RepoRoot)src\Platform\Microsoft.Testing.Extensions.HangDump\Microsoft.Testing.Extensions.HangDump.csproj" />
<ProjectReference Include="$(RepoRoot)src\Platform\Microsoft.Testing.Extensions.TrxReport\Microsoft.Testing.Extensions.TrxReport.csproj" />
<PackageReference Include="Microsoft.Testing.Internal.Framework" GeneratePathProperty="True" />
<PackageReference Include="Microsoft.Testing.Internal.Framework.SourceGeneration" GeneratePathProperty="True" />
</ItemGroup>
<ItemGroup Condition=" '$(UseVSTestRunner)' == 'false' ">
<Using Include="Microsoft.Testing.Internal.Framework" />
<Using Include="Microsoft.Testing.Platform.Builder" />
<Using Include="Microsoft.Testing.Platform.Extensions" />
<Using Include="Microsoft.Testing.TestInfrastructure" />
</ItemGroup>
<ItemGroup Condition=" '$(UseVSTestRunner)' == 'false' ">
<None Update="*.testconfig.json">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
<None Update="*.launcher.config.json">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
<None Update="testsbaseline*.txt">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
</ItemGroup>
</Project>