From 4e244e1ab9d7122046b88b30f6e93e5a88a069da Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jakub=20Jare=C5=A1?= Date: Wed, 9 Oct 2024 15:25:47 +0200 Subject: [PATCH] Downgrade xunit skip warning to info (#10381) --- src/vstest.console/Internal/MSBuildLogger.cs | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/src/vstest.console/Internal/MSBuildLogger.cs b/src/vstest.console/Internal/MSBuildLogger.cs index 7a087592eb..691236db32 100644 --- a/src/vstest.console/Internal/MSBuildLogger.cs +++ b/src/vstest.console/Internal/MSBuildLogger.cs @@ -78,7 +78,15 @@ private void TestMessageHandler(object? sender, TestRunMessageEventArgs e) SendMessage($"output-info", e.Message); break; case TestMessageLevel.Warning: - SendMessage($"output-warning", e.Message); + // Downgrade xUnit skip warning to info, otherwise any skipped test will report warning, which is often upgraded to error. + if (e.Message.EndsWith("[SKIP]")) + { + SendMessage($"output-info", e.Message); + } + else + { + SendMessage($"output-warning", e.Message); + } break; case TestMessageLevel.Error: SendMessage($"output-error", e.Message);