Invoke dotnet vstest directly instead of using the VSTest target
Attempt to workaround Microsoft/vstest#1503 which causes test failure output to be swallowed
This commit is contained in:
parent
55e0fd5677
commit
d2d9a47686
|
|
@ -540,9 +540,24 @@
|
|||
RepositoryCommit=$(RepositoryCommit);
|
||||
SharedFxRuntimeIdentifier=$(SharedFXRid)
|
||||
</UnitTestFxTestProps>
|
||||
<TrxFile>$(LogOutputDir)SharedFx.UnitTests-$(BuildNumber).trx</TrxFile>
|
||||
</PropertyGroup>
|
||||
<MSBuild Projects="$(UnitTestFxProject)" Targets="Restore" Properties="_Dummy=restore;$(UnitTestFxTestProps)" />
|
||||
<MSBuild Projects="$(UnitTestFxProject)" Targets="VSTest" Properties="$(UnitTestFxTestProps)" />
|
||||
<MSBuild Projects="$(UnitTestFxProject)" Targets="Build" Properties="$(UnitTestFxTestProps)">
|
||||
<Output TaskParameter="TargetOutputs" ItemName="SharedFxTestAssembly" />
|
||||
</MSBuild>
|
||||
<RunDotNet Arguments="vstest;
|
||||
--Framework:%(TargetFrameworkIdentifier),Version=v%(TargetFrameworkVersion);
|
||||
--Logger:$([MSBuild]::Escape('trx;LogFileName=$(TrxFile)'));
|
||||
%(SharedFxTestAssembly.Identity);
|
||||
--;RunConfiguration.NoAutoReporters=true" IgnoreExitCode="true">
|
||||
<Output TaskParameter="ExitCode" PropertyName="VsTestExitCode" />
|
||||
</RunDotNet>
|
||||
|
||||
<Message Text="##teamcity[importData type='vstest' path='$(TrxFile)']"
|
||||
Importance="High"
|
||||
Condition="'$(TEAMCITY_VERSION)' != '' AND Exists($(TrxFile))" />
|
||||
<Error Text="SharedFx.UnitTests failed with exit code '$(VsTestExitCode)'." Condition=" $(VsTestExitCode) != 0 " />
|
||||
</Target>
|
||||
|
||||
</Project>
|
||||
|
|
|
|||
Loading…
Reference in New Issue