From d4bf9e2141c9f5f317d4005615a39e26ec392ff5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Amaury=20Lev=C3=A9?= Date: Thu, 11 Jun 2026 13:11:07 +0200 Subject: [PATCH] Fix CI failures: include OpenTelemetry in NonWindowsTests.slnf and register Ctrf/JUnit providers in AOT test host Two distinct test failures on main (build 2997792): 1. Linux `Tests` job failed because `Microsoft.Testing.Extensions.OpenTelemetry` was not listed in `NonWindowsTests.slnf` and therefore was not packed by the non-Windows build; the new `SdkTests` data row added in #8903 then could not restore the package (NU1101). Add the project to the slnf so it ships on Linux/macOS. 2. Windows Release `Test` job failed because `azure-pipelines.yml` runs every UnitTests host with `--report-ctrf` and `--report-junit` via the `--test-modules` glob, but `MSTest.AotReflection.SourceGeneration.UnitTests/Program.cs` did not register the CTRF or JUnit providers, so MTP rejected the unknown options. Register both providers to match `MSTest.SourceGeneration.UnitTests`. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- NonWindowsTests.slnf | 1 + .../MSTest.AotReflection.SourceGeneration.UnitTests/Program.cs | 2 ++ 2 files changed, 3 insertions(+) diff --git a/NonWindowsTests.slnf b/NonWindowsTests.slnf index 7b9c4bf70e..cc7b8935fd 100644 --- a/NonWindowsTests.slnf +++ b/NonWindowsTests.slnf @@ -21,6 +21,7 @@ "src\\Platform\\Microsoft.Testing.Extensions.JUnitReport\\Microsoft.Testing.Extensions.JUnitReport.csproj", "src\\Platform\\Microsoft.Testing.Extensions.Logging\\Microsoft.Testing.Extensions.Logging.csproj", "src\\Platform\\Microsoft.Testing.Extensions.MSBuild\\Microsoft.Testing.Extensions.MSBuild.csproj", + "src\\Platform\\Microsoft.Testing.Extensions.OpenTelemetry\\Microsoft.Testing.Extensions.OpenTelemetry.csproj", "src\\Platform\\Microsoft.Testing.Extensions.Retry\\Microsoft.Testing.Extensions.Retry.csproj", "src\\Platform\\Microsoft.Testing.Extensions.Telemetry\\Microsoft.Testing.Extensions.Telemetry.csproj", "src\\Platform\\Microsoft.Testing.Extensions.TrxReport.Abstractions\\Microsoft.Testing.Extensions.TrxReport.Abstractions.csproj", diff --git a/test/UnitTests/MSTest.AotReflection.SourceGeneration.UnitTests/Program.cs b/test/UnitTests/MSTest.AotReflection.SourceGeneration.UnitTests/Program.cs index 9fbdc73473..d6e54da9cc 100644 --- a/test/UnitTests/MSTest.AotReflection.SourceGeneration.UnitTests/Program.cs +++ b/test/UnitTests/MSTest.AotReflection.SourceGeneration.UnitTests/Program.cs @@ -12,8 +12,10 @@ builder.AddHangDumpProvider(); builder.AddCrashDumpProvider(ignoreIfNotSupported: true); builder.AddTrxReportProvider(); +builder.AddJUnitReportProvider(); builder.AddAppInsightsTelemetryProvider(); builder.AddAzureDevOpsProvider(); +builder.AddCtrfReportProvider(); using ITestApplication app = await builder.BuildAsync(); return await app.RunAsync();