Return non-zero exit code for test failure in multitargeted test project.
Treat the errors from vstest task as errors (instead of warnings) before continuing further. Add asserts for exit code in tests for dotnet-test and dotnet-vstest.
This commit is contained in:
parent
441277ccfa
commit
f3a74f1162
4 changed files with 11 additions and 7 deletions
|
@ -38,6 +38,7 @@ namespace Microsoft.DotNet.Cli.Test.Tests
|
|||
result.StdOut.Should().Contain("Total tests: 2. Passed: 1. Failed: 1. Skipped: 0.");
|
||||
result.StdOut.Should().Contain("Passed TestNamespace.VSTestTests.VSTestPassTest");
|
||||
result.StdOut.Should().Contain("Failed TestNamespace.VSTestTests.VSTestFailTest");
|
||||
result.ExitCode.Should().Be(1);
|
||||
}
|
||||
|
||||
[Fact]
|
||||
|
@ -65,6 +66,7 @@ namespace Microsoft.DotNet.Cli.Test.Tests
|
|||
result.StdOut.Should().Contain("Total tests: 2. Passed: 1. Failed: 1. Skipped: 0.");
|
||||
result.StdOut.Should().Contain("Passed TestNamespace.VSTestXunitTests.VSTestXunitPassTest");
|
||||
result.StdOut.Should().Contain("Failed TestNamespace.VSTestXunitTests.VSTestXunitFailTest");
|
||||
result.ExitCode.Should().Be(1);
|
||||
}
|
||||
|
||||
[Fact]
|
||||
|
@ -138,4 +140,4 @@ namespace Microsoft.DotNet.Cli.Test.Tests
|
|||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue