Skip to content
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