forked from aspnet/AspNetWebStack
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathWebStack.testing.targets
More file actions
26 lines (24 loc) · 1.05 KB
/
WebStack.testing.targets
File metadata and controls
26 lines (24 loc) · 1.05 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
<Project ToolsVersion="4.0" DefaultTargets="Xunit" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<!--
This is a separate MSBuild file so that we can survive upgrades of the xunit NuGet package
and also still work with NuGet Package Restore.
-->
<Import Project="..\packages\xunit.runner.msbuild.2.4.2\**\xunit.runner.msbuild.props"/>
<Target Name="TestAssembly" Returns="@(_ExitCodes)">
<xunit Assemblies="$(TestAssembly)"
Condition=" '$(UseVSTest)' != 'true' "
IgnoreFailures="true"
Xml="$(XmlPath)">
<Output TaskParameter="ExitCode" PropertyName="_ExitCode" />
</xunit>
<Exec Command="dotnet vstest $(TestAssembly) --logger:"xunit;LogFilePath=$(XmlPath)""
Condition=" '$(UseVSTest)' == 'true' "
IgnoreExitCode="true"
IgnoreStandardErrorWarningFormat="true">
<Output TaskParameter="ExitCode" PropertyName="_ExitCode" />
</Exec>
<ItemGroup>
<_ExitCodes Include="$(TestAssembly)" Code="$(_ExitCode)" />
</ItemGroup>
</Target>
</Project>