Removed the ItShouldShowWarningMessageOnCollectCodeCoverageThatProfilerWasNotInitialized test since it was removed but a bad branch merge reintroduced it. Set DependentUponTest as WindowsOnlyTheory since it literally runs the EXE it produces during the test.

This commit is contained in:
Michael Yanni 2024-07-01 15:53:33 -07:00
Родитель 3f1e67e88d
Коммит 09d9fc06b6
2 изменённых файлов: 1 добавлений и 25 удалений

Просмотреть файл

@ -10,7 +10,7 @@ namespace Microsoft.NET.Build.Tests
{
}
[Theory]
[WindowsOnlyTheory]
[InlineData(ToolsetInfo.CurrentTargetFramework, true)]
public void DependentUponTest(string targetFramework, bool isExe)
{

Просмотреть файл

@ -590,30 +590,6 @@ namespace Microsoft.DotNet.Cli.Test.Tests
{
var testProjectDirectory = CopyAndRestoreVSTestDotNetCoreTestApp("13");
// Call test
CommandResult result = new DotnetTestCommand(Log, disableNewOutput: true)
.WithWorkingDirectory(testProjectDirectory)
.Execute(
"--collect", "Code Coverage",
"--filter", "VSTestPassTest");
// Verify test results
if (!TestContext.IsLocalized())
{
result.StdOut.Should().Contain("No code coverage data available. Code coverage is currently supported only on Windows and Linux x64.");
result.StdOut.Should().Contain("Total: 1");
result.StdOut.Should().Contain("Passed: 1");
result.StdOut.Should().NotContain("Failed!");
}
result.ExitCode.Should().Be(0);
}
[PlatformSpecificFact(TestPlatforms.Linux)]
public void ItShouldShowWarningMessageOnCollectCodeCoverageThatProfilerWasNotInitialized()
{
var testProjectDirectory = CopyAndRestoreVSTestDotNetCoreTestApp("13");
// Call test
CommandResult result = new DotnetTestCommand(Log, disableNewOutput: true)
.WithWorkingDirectory(testProjectDirectory)