Fix incorrect default VSTest verbosity level.
Commit 10289504a8
changed the default verbosity
option used for MSBuild from `-v:quiet` to `-verbosity:quiet`. This triggered a
match that was being done against arguments starting with `-verbosity` to
forward the value to VSTest via the `VSTestVerbosity` property. The result is
that VSTest is using a default verbosity of `quiet`, suppressing error output
that users expect to see.
The fix is to change the check to only match against user-supplied options.
The default level the command uses for MSBuild is not forwarded to VSTest.
Fixes #9229.
This commit is contained in:
parent
d0bcc1e6df
commit
1feaa0385a
3 changed files with 27 additions and 4 deletions
|
@ -110,6 +110,27 @@ namespace Microsoft.DotNet.Cli.Test.Tests
|
|||
result.ExitCode.Should().Be(1);
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public void GivenAFailingTestItDisplaysFailureDetails()
|
||||
{
|
||||
var testInstance = TestAssets.Get("XunitCore")
|
||||
.CreateInstance()
|
||||
.WithSourceFiles();
|
||||
|
||||
var result = new DotnetTestCommand()
|
||||
.WithWorkingDirectory(testInstance.Root.FullName)
|
||||
.ExecuteWithCapturedOutput();
|
||||
|
||||
result.ExitCode.Should().Be(1);
|
||||
|
||||
if (!DotnetUnderTest.IsLocalized())
|
||||
{
|
||||
result.StdOut.Should().Contain("Failed TestNamespace.VSTestXunitTests.VSTestXunitFailTest");
|
||||
result.StdOut.Should().Contain("Assert.Equal() Failure");
|
||||
result.StdOut.Should().Contain("Total tests: 2. Passed: 1. Failed: 1. Skipped: 0.");
|
||||
}
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public void TestWillNotBuildTheProjectIfNoBuildArgsIsGiven()
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue