Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[IMPORTANT] dotnet-test should return 1 if test execution fails for any tfm #283

Closed
natemcmaster opened this issue Dec 14, 2016 · 2 comments
Assignees

Comments

@natemcmaster
Copy link
Contributor

natemcmaster commented Dec 14, 2016

Description

dotnet-test returns exit code 0 if the last TFM succeeded, even if one of the TFMs fails to execute.

Steps to reproduce

dotnet-restore and dotnet-test this

<Project Sdk="Microsoft.NET.Sdk" ToolsVersion="15.0">

  <PropertyGroup>
    <TargetFrameworks>netcoreapp1.0;net451</TargetFrameworks>
  </PropertyGroup>

  <ItemGroup>
    <Compile Include="**\*.cs" />
    <EmbeddedResource Include="**\*.resx" />
  </ItemGroup>

  <ItemGroup>
    <PackageReference Include="Microsoft.NETCore.App" Version="1.0.1" Condition="'$(TargetFramework)'=='netcoreapp1.0'" />
    <PackageReference Include="Microsoft.NET.Test.Sdk" Version="15.0.0-preview-20161123-03" />
    <PackageReference Include="xunit" Version="2.2.0-beta4-build3444" />
    <PackageReference Include="xunit.runner.visualstudio" Version="2.2.0-beta4-build1194" />
  </ItemGroup>

</Project>

Expected behavior

If any TFM fails, return exit code != 0.

Actual behavior

netcoreapp1.0 ❌ fails because of #191
net451 ✅
Return code 0

Environment

Using dotnet-cli 1.0.0-preview4-004233

@codito
Copy link
Contributor

codito commented Dec 16, 2016

Fix available at dotnet/cli#5054

natemcmaster pushed a commit to aspnet/KoreBuild that referenced this issue Dec 16, 2016
@codito
Copy link
Contributor

codito commented Dec 17, 2016

dotnet/cli#5054 is merged now.

@codito codito closed this as completed Dec 17, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants