dotnet / dotnet/arcade

Failing tests don't fail build when warningsAsErrors is false

Open
#1,589 8 comments 0 reactions 0 assignees View on GitHub
Dominant language
C#
Stars
729
Forks
397
Avg merge
3d 15m
Merged PRs (30d)
149

Description

We've started setting warningsAsErrors to false in our builds of Arcade projects because that's what we did before, and we have some warnings that would currently cause us to start failing, but when we do this test failures don't fail the build because they're only logged as warnings. I suspect this is caused by [this line](https://github.com/dotnet/arcade/blob/master/src/Microsoft.DotNet.Arcade.Sdk/tools/XUnit/XUnit.targets#L86), where `LogStandardErrorAsError="false"`. I've noticed that that's set that way in a couple different Exec's, so possibly this is not the only area affected.

Repro:

1. Clone git@github.com:aspnet/Extensions.git
1. git checkout rybrande/Arcade
1. .\build.cmd

That takes a while to run, but if I'm right it should replicated against any arcade repo with a failing test against which warnaserrors=false was passed.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.