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

Write dll instead of target on abort, rename errors #5115

Merged
merged 1 commit into from
Jun 20, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 8 additions & 2 deletions src/Microsoft.TestPlatform.Build/Tasks/VSTestTask2.cs
Original file line number Diff line number Diff line change
Expand Up @@ -111,8 +111,14 @@ protected override void LogEventsFromTextOutput(string singleLine, MessageImport
}

case "run-cancel":
// There is other overload that takes just message, and params, specifying the name of the first parameter explicitly so I don't
// accidentally use it, because that will throw error when message is null, which it always is (We provide that null as first parameter).
Log.LogError(subcategory: null, "TESTRUNCANCEL", null, TestFileFullPath?.ItemSpec ?? string.Empty, 0, 0, 0, 0, data[0]);
break;
case "run-abort":
Log.LogError(data[0]);
// There is other overload that takes just message, and params, specifying the name of the first parameter explicitly so I don't
// accidentally use it, because that will throw error when message is null, which it always is (We provide that null as first parameter).
Log.LogError(subcategory: null, "TESTRUNABORT", null, TestFileFullPath?.ItemSpec ?? string.Empty, 0, 0, 0, 0, data[0]);
break;
case "run-finish":
// 0 - Localized summary
Expand Down Expand Up @@ -222,7 +228,7 @@ protected override void LogEventsFromTextOutput(string singleLine, MessageImport
file ??= string.Empty;

// Report error to msbuild.
Log.LogError(null, "VSTEST1", null, file ?? string.Empty, lineNumber, 0, 0, 0, fullErrorMessage, null);
Log.LogError(null, "TESTERROR", null, file ?? string.Empty, lineNumber, 0, 0, 0, fullErrorMessage, null);
}
break;
default:
Expand Down
Loading