From 1ac24f7b460e3534e09f67fa34ce698e25e6d471 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Tue, 17 Mar 2026 09:29:07 +0000 Subject: [PATCH 1/8] Initial plan From 2fe5b53185a59b922358c877bef911360dc4dccd Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Tue, 17 Mar 2026 09:49:26 +0000 Subject: [PATCH 2/8] Exclude integration tests from Release CI jobs Add solution filters (TestFx.NoIntegrationTests.slnf and NonWindowsTests.NoIntegrationTests.slnf) that exclude integration test projects and their test assets. Modify azure-pipelines.yml to use ExcludeIntegrationTests property and the new solution filters for Release matrix entries, so that integration tests are only built and run under Debug jobs. Update eng/Build.props to select the appropriate solution filter based on the ExcludeIntegrationTests property. Co-authored-by: Evangelink <11340282+Evangelink@users.noreply.github.com> --- NonWindowsTests.NoIntegrationTests.slnf | 39 ++++++++++++++++++ TestFx.NoIntegrationTests.slnf | 54 +++++++++++++++++++++++++ azure-pipelines.yml | 21 ++++++++-- eng/Build.props | 12 +++++- 4 files changed, 121 insertions(+), 5 deletions(-) create mode 100644 NonWindowsTests.NoIntegrationTests.slnf create mode 100644 TestFx.NoIntegrationTests.slnf diff --git a/NonWindowsTests.NoIntegrationTests.slnf b/NonWindowsTests.NoIntegrationTests.slnf new file mode 100644 index 0000000000..d8b7e2ebeb --- /dev/null +++ b/NonWindowsTests.NoIntegrationTests.slnf @@ -0,0 +1,39 @@ +{ + "solution": { + "path": "TestFx.slnx", + "projects": [ + "src\\Adapter\\MSTest.Engine\\MSTest.Engine.csproj", + "src\\Adapter\\MSTest.TestAdapter\\MSTest.TestAdapter.csproj", + "src\\Adapter\\MSTestAdapter.PlatformServices\\MSTestAdapter.PlatformServices.csproj", + "src\\Analyzers\\MSTest.Analyzers.CodeFixes\\MSTest.Analyzers.CodeFixes.csproj", + "src\\Analyzers\\MSTest.Analyzers.Package\\MSTest.Analyzers.Package.csproj", + "src\\Analyzers\\MSTest.Analyzers\\MSTest.Analyzers.csproj", + "src\\Analyzers\\MSTest.GlobalConfigsGenerator\\MSTest.GlobalConfigsGenerator.csproj", + "src\\Analyzers\\MSTest.SourceGeneration\\MSTest.SourceGeneration.csproj", + "src\\Package\\MSTest.Sdk\\MSTest.Sdk.csproj", + "src\\Package\\MSTest\\MSTest.csproj", + "src\\Platform\\Microsoft.Testing.Extensions.AzureDevOpsReport\\Microsoft.Testing.Extensions.AzureDevOpsReport.csproj", + "src\\Platform\\Microsoft.Testing.Extensions.AzureFoundry\\Microsoft.Testing.Extensions.AzureFoundry.csproj", + "src\\Platform\\Microsoft.Testing.Extensions.CrashDump\\Microsoft.Testing.Extensions.CrashDump.csproj", + "src\\Platform\\Microsoft.Testing.Extensions.HangDump\\Microsoft.Testing.Extensions.HangDump.csproj", + "src\\Platform\\Microsoft.Testing.Extensions.HotReload\\Microsoft.Testing.Extensions.HotReload.csproj", + "src\\Platform\\Microsoft.Testing.Extensions.MSBuild\\Microsoft.Testing.Extensions.MSBuild.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", + "src\\Platform\\Microsoft.Testing.Extensions.TrxReport\\Microsoft.Testing.Extensions.TrxReport.csproj", + "src\\Platform\\Microsoft.Testing.Extensions.VSTestBridge\\Microsoft.Testing.Extensions.VSTestBridge.csproj", + "src\\Platform\\Microsoft.Testing.Platform.AI\\Microsoft.Testing.Platform.AI.csproj", + "src\\Platform\\Microsoft.Testing.Platform.MSBuild\\Microsoft.Testing.Platform.MSBuild.csproj", + "src\\Platform\\Microsoft.Testing.Platform\\Microsoft.Testing.Platform.csproj", + "src\\TestFramework\\TestFramework.Extensions\\TestFramework.Extensions.csproj", + "src\\TestFramework\\TestFramework\\TestFramework.csproj", + "test\\UnitTests\\MSTest.Analyzers.UnitTests\\MSTest.Analyzers.UnitTests.csproj", + "test\\UnitTests\\Microsoft.Testing.Extensions.UnitTests\\Microsoft.Testing.Extensions.UnitTests.csproj", + "test\\UnitTests\\Microsoft.Testing.Extensions.VSTestBridge.UnitTests\\Microsoft.Testing.Extensions.VSTestBridge.UnitTests.csproj", + "test\\UnitTests\\Microsoft.Testing.Platform.MSBuild.UnitTests\\Microsoft.Testing.Platform.MSBuild.UnitTests.csproj", + "test\\UnitTests\\Microsoft.Testing.Platform.UnitTests\\Microsoft.Testing.Platform.UnitTests.csproj", + "test\\Utilities\\Microsoft.Testing.TestInfrastructure\\Microsoft.Testing.TestInfrastructure.csproj" + ] + } +} diff --git a/TestFx.NoIntegrationTests.slnf b/TestFx.NoIntegrationTests.slnf new file mode 100644 index 0000000000..b6303ac38a --- /dev/null +++ b/TestFx.NoIntegrationTests.slnf @@ -0,0 +1,54 @@ +{ + "solution": { + "path": "TestFx.slnx", + "projects": [ + "samples\\FSharpPlayground\\FSharpPlayground.fsproj", + "samples\\FxExtensibility\\FxExtensibility.csproj", + "samples\\NUnitPlayground\\NUnitPlayground.csproj", + "samples\\Playground\\Playground.csproj", + "samples\\WasiPlayground\\WasiPlayground.csproj", + "src\\Adapter\\MSTest.Engine\\MSTest.Engine.csproj", + "src\\Adapter\\MSTest.TestAdapter\\MSTest.TestAdapter.csproj", + "src\\Adapter\\MSTestAdapter.PlatformServices\\MSTestAdapter.PlatformServices.csproj", + "src\\Analyzers\\MSTest.Analyzers.CodeFixes\\MSTest.Analyzers.CodeFixes.csproj", + "src\\Analyzers\\MSTest.Analyzers.Package\\MSTest.Analyzers.Package.csproj", + "src\\Analyzers\\MSTest.Analyzers\\MSTest.Analyzers.csproj", + "src\\Analyzers\\MSTest.GlobalConfigsGenerator\\MSTest.GlobalConfigsGenerator.csproj", + "src\\Analyzers\\MSTest.SourceGeneration\\MSTest.SourceGeneration.csproj", + "src\\Package\\MSTest.Sdk\\MSTest.Sdk.csproj", + "src\\Package\\MSTest\\MSTest.csproj", + "src\\Platform\\Microsoft.Testing.Extensions.AzureDevOpsReport\\Microsoft.Testing.Extensions.AzureDevOpsReport.csproj", + "src\\Platform\\Microsoft.Testing.Extensions.AzureFoundry\\Microsoft.Testing.Extensions.AzureFoundry.csproj", + "src\\Platform\\Microsoft.Testing.Extensions.CrashDump\\Microsoft.Testing.Extensions.CrashDump.csproj", + "src\\Platform\\Microsoft.Testing.Extensions.HangDump\\Microsoft.Testing.Extensions.HangDump.csproj", + "src\\Platform\\Microsoft.Testing.Extensions.HotReload\\Microsoft.Testing.Extensions.HotReload.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", + "src\\Platform\\Microsoft.Testing.Extensions.TrxReport\\Microsoft.Testing.Extensions.TrxReport.csproj", + "src\\Platform\\Microsoft.Testing.Extensions.VSTestBridge\\Microsoft.Testing.Extensions.VSTestBridge.csproj", + "src\\Platform\\Microsoft.Testing.Platform.AI\\Microsoft.Testing.Platform.AI.csproj", + "src\\Platform\\Microsoft.Testing.Platform.MSBuild\\Microsoft.Testing.Platform.MSBuild.csproj", + "src\\Platform\\Microsoft.Testing.Platform\\Microsoft.Testing.Platform.csproj", + "src\\TestFramework\\TestFramework.Extensions\\TestFramework.Extensions.csproj", + "src\\TestFramework\\TestFramework\\TestFramework.csproj", + "test\\Performance\\MSTest.Performance.Runner\\MSTest.Performance.Runner.csproj", + "test\\UnitTests\\Microsoft.Testing.Extensions.UnitTests\\Microsoft.Testing.Extensions.UnitTests.csproj", + "test\\UnitTests\\Microsoft.Testing.Extensions.VSTestBridge.UnitTests\\Microsoft.Testing.Extensions.VSTestBridge.UnitTests.csproj", + "test\\UnitTests\\Microsoft.Testing.Platform.MSBuild.UnitTests\\Microsoft.Testing.Platform.MSBuild.UnitTests.csproj", + "test\\UnitTests\\Microsoft.Testing.Platform.UnitTests\\Microsoft.Testing.Platform.UnitTests.csproj", + "test\\UnitTests\\MSTest.Analyzers.UnitTests\\MSTest.Analyzers.UnitTests.csproj", + "test\\UnitTests\\MSTest.Engine.UnitTests\\MSTest.Engine.UnitTests.csproj", + "test\\UnitTests\\MSTest.SelfRealExamples.UnitTests\\MSTest.SelfRealExamples.UnitTests.csproj", + "test\\UnitTests\\MSTest.SourceGeneration.UnitTests\\MSTest.SourceGeneration.UnitTests.csproj", + "test\\UnitTests\\MSTestAdapter.PlatformServices.UnitTests\\MSTestAdapter.PlatformServices.UnitTests.csproj", + "test\\UnitTests\\MSTestAdapter.UnitTests\\MSTestAdapter.UnitTests.csproj", + "test\\UnitTests\\TestFramework.UnitTests\\TestFramework.UnitTests.csproj", + "test\\Utilities\\Automation.CLI\\Automation.CLI.csproj", + "test\\Utilities\\Microsoft.Testing.TestInfrastructure\\Microsoft.Testing.TestInfrastructure.csproj", + "test\\Utilities\\TestFramework.ForTestingMSTest\\TestFramework.ForTestingMSTest.csproj" + ] + } +} diff --git a/azure-pipelines.yml b/azure-pipelines.yml index 9b5c1184b7..ecef07d9ba 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -64,8 +64,12 @@ stages: matrix: Release: _BuildConfig: Release + _ExcludeIntegrationTests: true + _TestSolution: TestFx.NoIntegrationTests.slnf Debug: _BuildConfig: Debug + _ExcludeIntegrationTests: false + _TestSolution: TestFx.slnx steps: - task: PowerShell@2 displayName: 'Install Windows SDK' @@ -105,6 +109,7 @@ stages: /p:Publish=false /p:Test=false /p:FastAcceptanceTest=true + /p:ExcludeIntegrationTests=$(_ExcludeIntegrationTests) name: Build displayName: Build @@ -120,7 +125,7 @@ stages: # Because the build step is using -ci flag, restore is done in a local .packages directory. # We need to pass NUGET_PACKAGES so that when dotnet test is doing evaluation phase on the projects, it can resolve .props/.targets from packages and import them. # Otherwise, props/targets are not imported. It's important that they are imported so that IsTestingPlatformApplication ends up being set. - - script: dotnet test -c $(_BuildConfig) --no-build -bl:$(BUILD.SOURCESDIRECTORY)\artifacts\TestResults\$(_BuildConfig)\TestStep.binlog --no-progress --output detailed -p:UsingDotNetTest=true + - script: dotnet test --solution $(_TestSolution) -c $(_BuildConfig) --no-build -bl:$(BUILD.SOURCESDIRECTORY)\artifacts\TestResults\$(_BuildConfig)\TestStep.binlog --no-progress --output detailed -p:UsingDotNetTest=true name: Test displayName: Test env: @@ -203,8 +208,12 @@ stages: matrix: Release: _BuildConfig: Release + _ExcludeIntegrationTests: true + _TestSolution: NonWindowsTests.NoIntegrationTests.slnf Debug: _BuildConfig: Debug + _ExcludeIntegrationTests: false + _TestSolution: NonWindowsTests.slnf steps: - script: eng/common/cibuild.sh -configuration $(_BuildConfig) @@ -213,6 +222,7 @@ stages: /p:Publish=false /p:NonWindowsBuild=true /p:FastAcceptanceTest=true + /p:ExcludeIntegrationTests=$(_ExcludeIntegrationTests) displayName: Build - task: PublishBuildArtifacts@1 @@ -226,7 +236,7 @@ stages: # Because the build step is using -ci flag, restore is done in a local .packages directory. # We need to pass NUGET_PACKAGES so that when dotnet test is doing evaluation phase on the projects, it can resolve .props/.targets from packages and import them. # Otherwise, props/targets are not imported. It's important that they are imported so that IsTestingPlatformApplication ends up being set. - - script: dotnet test --solution NonWindowsTests.slnf -c $(_BuildConfig) --no-build -bl:$(BUILD.SOURCESDIRECTORY)/artifacts/TestResults/$(_BuildConfig)/TestStep.binlog --no-progress --output detailed -p:UsingDotNetTest=true + - script: dotnet test --solution $(_TestSolution) -c $(_BuildConfig) --no-build -bl:$(BUILD.SOURCESDIRECTORY)/artifacts/TestResults/$(_BuildConfig)/TestStep.binlog --no-progress --output detailed -p:UsingDotNetTest=true name: Test displayName: Test env: @@ -267,8 +277,12 @@ stages: matrix: Release: _BuildConfig: Release + _ExcludeIntegrationTests: true + _TestSolution: NonWindowsTests.NoIntegrationTests.slnf Debug: _BuildConfig: Debug + _ExcludeIntegrationTests: false + _TestSolution: NonWindowsTests.slnf steps: - script: eng/common/cibuild.sh -configuration $(_BuildConfig) @@ -277,6 +291,7 @@ stages: /p:Publish=false /p:NonWindowsBuild=true /p:FastAcceptanceTest=true + /p:ExcludeIntegrationTests=$(_ExcludeIntegrationTests) displayName: Build - task: PublishBuildArtifacts@1 @@ -290,7 +305,7 @@ stages: # Because the build step is using -ci flag, restore is done in a local .packages directory. # We need to pass NUGET_PACKAGES so that when dotnet test is doing evaluation phase on the projects, it can resolve .props/.targets from packages and import them. # Otherwise, props/targets are not imported. It's important that they are imported so that IsTestingPlatformApplication ends up being set. - - script: dotnet test --solution NonWindowsTests.slnf -c $(_BuildConfig) --no-build -bl:$(BUILD.SOURCESDIRECTORY)/artifacts/TestResults/$(_BuildConfig)/TestStep.binlog --no-progress --output detailed -p:UsingDotNetTest=true + - script: dotnet test --solution $(_TestSolution) -c $(_BuildConfig) --no-build -bl:$(BUILD.SOURCESDIRECTORY)/artifacts/TestResults/$(_BuildConfig)/TestStep.binlog --no-progress --output detailed -p:UsingDotNetTest=true name: Test displayName: Test env: diff --git a/eng/Build.props b/eng/Build.props index 559d7f3749..21e5a110ad 100644 --- a/eng/Build.props +++ b/eng/Build.props @@ -5,15 +5,23 @@ - + + + + + - + + + + + From ecc4627a05d009f3d8611f0eb4013b0483ab36ef Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Tue, 17 Mar 2026 12:17:52 +0000 Subject: [PATCH 3/8] Skip integration test binlog publish steps when integration tests are excluded The 'Copy binlogs' and 'Publish integration tests binlogs' steps fail on Release jobs because the testsuite binlog directory doesn't exist when integration tests are excluded. Add condition to only run these steps when _ExcludeIntegrationTests is 'false' (Debug builds). Co-authored-by: Evangelink <11340282+Evangelink@users.noreply.github.com> --- azure-pipelines.yml | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index ecef07d9ba..184678af63 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -147,14 +147,14 @@ stages: Contents: | **/*.binlog TargetFolder: '$(Build.ArtifactStagingDirectory)/binlogs' - condition: always() + condition: and(always(), eq(variables._ExcludeIntegrationTests, 'false')) - task: PublishBuildArtifacts@1 displayName: 'Publish integration tests binlogs' inputs: PathtoPublish: '$(Build.ArtifactStagingDirectory)/binlogs' ArtifactName: Integration_Tests_Windows_Binlogs_$(_BuildConfig) - condition: always() + condition: and(always(), eq(variables._ExcludeIntegrationTests, 'false')) # Upload code coverage to codecov.io - script: dotnet msbuild -restore @@ -258,14 +258,14 @@ stages: Contents: | **/*.binlog TargetFolder: '$(Build.ArtifactStagingDirectory)/binlogs' - condition: always() + condition: and(always(), eq(variables._ExcludeIntegrationTests, 'false')) - task: PublishBuildArtifacts@1 displayName: 'Publish integration tests binlogs' inputs: PathtoPublish: '$(Build.ArtifactStagingDirectory)/binlogs' ArtifactName: Integration_Tests_Linux_Binlogs_$(_BuildConfig) - condition: always() + condition: and(always(), eq(variables._ExcludeIntegrationTests, 'false')) - job: MacOS timeoutInMinutes: 90 @@ -327,11 +327,11 @@ stages: Contents: | **/*.binlog TargetFolder: '$(Build.ArtifactStagingDirectory)/binlogs' - condition: always() + condition: and(always(), eq(variables._ExcludeIntegrationTests, 'false')) - task: PublishBuildArtifacts@1 displayName: 'Publish integration tests binlogs' inputs: PathtoPublish: '$(Build.ArtifactStagingDirectory)/binlogs' ArtifactName: Integration_Tests_MacOS_Binlogs_$(_BuildConfig) - condition: always() + condition: and(always(), eq(variables._ExcludeIntegrationTests, 'false')) From c6ff763652d60e4c431486cc5af983b0d7bf4a16 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Tue, 17 Mar 2026 13:44:49 +0000 Subject: [PATCH 4/8] Rework: use --test-modules instead of .slnf files to skip integration tests in Release Replace the solution filter approach with dotnet test --test-modules glob pattern. For Release builds, runs only unit test modules via: --test-modules "artifacts/bin/*UnitTests*/$(_BuildConfig)/**/*UnitTests.dll" For Debug builds, keeps original test commands unchanged. Removes TestFx.NoIntegrationTests.slnf and NonWindowsTests.NoIntegrationTests.slnf. Reverts eng/Build.props to original (no ExcludeIntegrationTests logic needed). Co-authored-by: Evangelink <11340282+Evangelink@users.noreply.github.com> --- NonWindowsTests.NoIntegrationTests.slnf | 39 -------------- TestFx.NoIntegrationTests.slnf | 54 ------------------- azure-pipelines.yml | 69 ++++++++++++++++--------- eng/Build.props | 12 +---- 4 files changed, 47 insertions(+), 127 deletions(-) delete mode 100644 NonWindowsTests.NoIntegrationTests.slnf delete mode 100644 TestFx.NoIntegrationTests.slnf diff --git a/NonWindowsTests.NoIntegrationTests.slnf b/NonWindowsTests.NoIntegrationTests.slnf deleted file mode 100644 index d8b7e2ebeb..0000000000 --- a/NonWindowsTests.NoIntegrationTests.slnf +++ /dev/null @@ -1,39 +0,0 @@ -{ - "solution": { - "path": "TestFx.slnx", - "projects": [ - "src\\Adapter\\MSTest.Engine\\MSTest.Engine.csproj", - "src\\Adapter\\MSTest.TestAdapter\\MSTest.TestAdapter.csproj", - "src\\Adapter\\MSTestAdapter.PlatformServices\\MSTestAdapter.PlatformServices.csproj", - "src\\Analyzers\\MSTest.Analyzers.CodeFixes\\MSTest.Analyzers.CodeFixes.csproj", - "src\\Analyzers\\MSTest.Analyzers.Package\\MSTest.Analyzers.Package.csproj", - "src\\Analyzers\\MSTest.Analyzers\\MSTest.Analyzers.csproj", - "src\\Analyzers\\MSTest.GlobalConfigsGenerator\\MSTest.GlobalConfigsGenerator.csproj", - "src\\Analyzers\\MSTest.SourceGeneration\\MSTest.SourceGeneration.csproj", - "src\\Package\\MSTest.Sdk\\MSTest.Sdk.csproj", - "src\\Package\\MSTest\\MSTest.csproj", - "src\\Platform\\Microsoft.Testing.Extensions.AzureDevOpsReport\\Microsoft.Testing.Extensions.AzureDevOpsReport.csproj", - "src\\Platform\\Microsoft.Testing.Extensions.AzureFoundry\\Microsoft.Testing.Extensions.AzureFoundry.csproj", - "src\\Platform\\Microsoft.Testing.Extensions.CrashDump\\Microsoft.Testing.Extensions.CrashDump.csproj", - "src\\Platform\\Microsoft.Testing.Extensions.HangDump\\Microsoft.Testing.Extensions.HangDump.csproj", - "src\\Platform\\Microsoft.Testing.Extensions.HotReload\\Microsoft.Testing.Extensions.HotReload.csproj", - "src\\Platform\\Microsoft.Testing.Extensions.MSBuild\\Microsoft.Testing.Extensions.MSBuild.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", - "src\\Platform\\Microsoft.Testing.Extensions.TrxReport\\Microsoft.Testing.Extensions.TrxReport.csproj", - "src\\Platform\\Microsoft.Testing.Extensions.VSTestBridge\\Microsoft.Testing.Extensions.VSTestBridge.csproj", - "src\\Platform\\Microsoft.Testing.Platform.AI\\Microsoft.Testing.Platform.AI.csproj", - "src\\Platform\\Microsoft.Testing.Platform.MSBuild\\Microsoft.Testing.Platform.MSBuild.csproj", - "src\\Platform\\Microsoft.Testing.Platform\\Microsoft.Testing.Platform.csproj", - "src\\TestFramework\\TestFramework.Extensions\\TestFramework.Extensions.csproj", - "src\\TestFramework\\TestFramework\\TestFramework.csproj", - "test\\UnitTests\\MSTest.Analyzers.UnitTests\\MSTest.Analyzers.UnitTests.csproj", - "test\\UnitTests\\Microsoft.Testing.Extensions.UnitTests\\Microsoft.Testing.Extensions.UnitTests.csproj", - "test\\UnitTests\\Microsoft.Testing.Extensions.VSTestBridge.UnitTests\\Microsoft.Testing.Extensions.VSTestBridge.UnitTests.csproj", - "test\\UnitTests\\Microsoft.Testing.Platform.MSBuild.UnitTests\\Microsoft.Testing.Platform.MSBuild.UnitTests.csproj", - "test\\UnitTests\\Microsoft.Testing.Platform.UnitTests\\Microsoft.Testing.Platform.UnitTests.csproj", - "test\\Utilities\\Microsoft.Testing.TestInfrastructure\\Microsoft.Testing.TestInfrastructure.csproj" - ] - } -} diff --git a/TestFx.NoIntegrationTests.slnf b/TestFx.NoIntegrationTests.slnf deleted file mode 100644 index b6303ac38a..0000000000 --- a/TestFx.NoIntegrationTests.slnf +++ /dev/null @@ -1,54 +0,0 @@ -{ - "solution": { - "path": "TestFx.slnx", - "projects": [ - "samples\\FSharpPlayground\\FSharpPlayground.fsproj", - "samples\\FxExtensibility\\FxExtensibility.csproj", - "samples\\NUnitPlayground\\NUnitPlayground.csproj", - "samples\\Playground\\Playground.csproj", - "samples\\WasiPlayground\\WasiPlayground.csproj", - "src\\Adapter\\MSTest.Engine\\MSTest.Engine.csproj", - "src\\Adapter\\MSTest.TestAdapter\\MSTest.TestAdapter.csproj", - "src\\Adapter\\MSTestAdapter.PlatformServices\\MSTestAdapter.PlatformServices.csproj", - "src\\Analyzers\\MSTest.Analyzers.CodeFixes\\MSTest.Analyzers.CodeFixes.csproj", - "src\\Analyzers\\MSTest.Analyzers.Package\\MSTest.Analyzers.Package.csproj", - "src\\Analyzers\\MSTest.Analyzers\\MSTest.Analyzers.csproj", - "src\\Analyzers\\MSTest.GlobalConfigsGenerator\\MSTest.GlobalConfigsGenerator.csproj", - "src\\Analyzers\\MSTest.SourceGeneration\\MSTest.SourceGeneration.csproj", - "src\\Package\\MSTest.Sdk\\MSTest.Sdk.csproj", - "src\\Package\\MSTest\\MSTest.csproj", - "src\\Platform\\Microsoft.Testing.Extensions.AzureDevOpsReport\\Microsoft.Testing.Extensions.AzureDevOpsReport.csproj", - "src\\Platform\\Microsoft.Testing.Extensions.AzureFoundry\\Microsoft.Testing.Extensions.AzureFoundry.csproj", - "src\\Platform\\Microsoft.Testing.Extensions.CrashDump\\Microsoft.Testing.Extensions.CrashDump.csproj", - "src\\Platform\\Microsoft.Testing.Extensions.HangDump\\Microsoft.Testing.Extensions.HangDump.csproj", - "src\\Platform\\Microsoft.Testing.Extensions.HotReload\\Microsoft.Testing.Extensions.HotReload.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", - "src\\Platform\\Microsoft.Testing.Extensions.TrxReport\\Microsoft.Testing.Extensions.TrxReport.csproj", - "src\\Platform\\Microsoft.Testing.Extensions.VSTestBridge\\Microsoft.Testing.Extensions.VSTestBridge.csproj", - "src\\Platform\\Microsoft.Testing.Platform.AI\\Microsoft.Testing.Platform.AI.csproj", - "src\\Platform\\Microsoft.Testing.Platform.MSBuild\\Microsoft.Testing.Platform.MSBuild.csproj", - "src\\Platform\\Microsoft.Testing.Platform\\Microsoft.Testing.Platform.csproj", - "src\\TestFramework\\TestFramework.Extensions\\TestFramework.Extensions.csproj", - "src\\TestFramework\\TestFramework\\TestFramework.csproj", - "test\\Performance\\MSTest.Performance.Runner\\MSTest.Performance.Runner.csproj", - "test\\UnitTests\\Microsoft.Testing.Extensions.UnitTests\\Microsoft.Testing.Extensions.UnitTests.csproj", - "test\\UnitTests\\Microsoft.Testing.Extensions.VSTestBridge.UnitTests\\Microsoft.Testing.Extensions.VSTestBridge.UnitTests.csproj", - "test\\UnitTests\\Microsoft.Testing.Platform.MSBuild.UnitTests\\Microsoft.Testing.Platform.MSBuild.UnitTests.csproj", - "test\\UnitTests\\Microsoft.Testing.Platform.UnitTests\\Microsoft.Testing.Platform.UnitTests.csproj", - "test\\UnitTests\\MSTest.Analyzers.UnitTests\\MSTest.Analyzers.UnitTests.csproj", - "test\\UnitTests\\MSTest.Engine.UnitTests\\MSTest.Engine.UnitTests.csproj", - "test\\UnitTests\\MSTest.SelfRealExamples.UnitTests\\MSTest.SelfRealExamples.UnitTests.csproj", - "test\\UnitTests\\MSTest.SourceGeneration.UnitTests\\MSTest.SourceGeneration.UnitTests.csproj", - "test\\UnitTests\\MSTestAdapter.PlatformServices.UnitTests\\MSTestAdapter.PlatformServices.UnitTests.csproj", - "test\\UnitTests\\MSTestAdapter.UnitTests\\MSTestAdapter.UnitTests.csproj", - "test\\UnitTests\\TestFramework.UnitTests\\TestFramework.UnitTests.csproj", - "test\\Utilities\\Automation.CLI\\Automation.CLI.csproj", - "test\\Utilities\\Microsoft.Testing.TestInfrastructure\\Microsoft.Testing.TestInfrastructure.csproj", - "test\\Utilities\\TestFramework.ForTestingMSTest\\TestFramework.ForTestingMSTest.csproj" - ] - } -} diff --git a/azure-pipelines.yml b/azure-pipelines.yml index 184678af63..195fa735ca 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -64,12 +64,8 @@ stages: matrix: Release: _BuildConfig: Release - _ExcludeIntegrationTests: true - _TestSolution: TestFx.NoIntegrationTests.slnf Debug: _BuildConfig: Debug - _ExcludeIntegrationTests: false - _TestSolution: TestFx.slnx steps: - task: PowerShell@2 displayName: 'Install Windows SDK' @@ -109,7 +105,6 @@ stages: /p:Publish=false /p:Test=false /p:FastAcceptanceTest=true - /p:ExcludeIntegrationTests=$(_ExcludeIntegrationTests) name: Build displayName: Build @@ -125,9 +120,21 @@ stages: # Because the build step is using -ci flag, restore is done in a local .packages directory. # We need to pass NUGET_PACKAGES so that when dotnet test is doing evaluation phase on the projects, it can resolve .props/.targets from packages and import them. # Otherwise, props/targets are not imported. It's important that they are imported so that IsTestingPlatformApplication ends up being set. - - script: dotnet test --solution $(_TestSolution) -c $(_BuildConfig) --no-build -bl:$(BUILD.SOURCESDIRECTORY)\artifacts\TestResults\$(_BuildConfig)\TestStep.binlog --no-progress --output detailed -p:UsingDotNetTest=true + - script: dotnet test -c $(_BuildConfig) --no-build -bl:$(BUILD.SOURCESDIRECTORY)\artifacts\TestResults\$(_BuildConfig)\TestStep.binlog --no-progress --output detailed -p:UsingDotNetTest=true name: Test displayName: Test + condition: and(succeeded(), eq(variables._BuildConfig, 'Debug')) + env: + DOTNET_ROOT: $(Build.SourcesDirectory)/.dotnet + NUGET_PACKAGES: $(Build.SourcesDirectory)/.packages + DOTNET_CLI_CONTEXT_VERBOSE: 1 + + # Integration tests are redundant in Release—they spawn child processes that already cover + # both Debug and Release configurations. Use --test-modules to run only unit tests. + - script: dotnet test --test-modules "artifacts/bin/*UnitTests*/$(_BuildConfig)/**/*UnitTests.dll" --results-directory $(BUILD.SOURCESDIRECTORY)\artifacts\TestResults\$(_BuildConfig) --no-progress --output detailed + name: TestRelease + displayName: Test (unit tests only) + condition: and(succeeded(), eq(variables._BuildConfig, 'Release')) env: DOTNET_ROOT: $(Build.SourcesDirectory)/.dotnet NUGET_PACKAGES: $(Build.SourcesDirectory)/.packages @@ -147,14 +154,14 @@ stages: Contents: | **/*.binlog TargetFolder: '$(Build.ArtifactStagingDirectory)/binlogs' - condition: and(always(), eq(variables._ExcludeIntegrationTests, 'false')) + condition: and(always(), eq(variables._BuildConfig, 'Debug')) - task: PublishBuildArtifacts@1 displayName: 'Publish integration tests binlogs' inputs: PathtoPublish: '$(Build.ArtifactStagingDirectory)/binlogs' ArtifactName: Integration_Tests_Windows_Binlogs_$(_BuildConfig) - condition: and(always(), eq(variables._ExcludeIntegrationTests, 'false')) + condition: and(always(), eq(variables._BuildConfig, 'Debug')) # Upload code coverage to codecov.io - script: dotnet msbuild -restore @@ -208,12 +215,8 @@ stages: matrix: Release: _BuildConfig: Release - _ExcludeIntegrationTests: true - _TestSolution: NonWindowsTests.NoIntegrationTests.slnf Debug: _BuildConfig: Debug - _ExcludeIntegrationTests: false - _TestSolution: NonWindowsTests.slnf steps: - script: eng/common/cibuild.sh -configuration $(_BuildConfig) @@ -222,7 +225,6 @@ stages: /p:Publish=false /p:NonWindowsBuild=true /p:FastAcceptanceTest=true - /p:ExcludeIntegrationTests=$(_ExcludeIntegrationTests) displayName: Build - task: PublishBuildArtifacts@1 @@ -236,9 +238,21 @@ stages: # Because the build step is using -ci flag, restore is done in a local .packages directory. # We need to pass NUGET_PACKAGES so that when dotnet test is doing evaluation phase on the projects, it can resolve .props/.targets from packages and import them. # Otherwise, props/targets are not imported. It's important that they are imported so that IsTestingPlatformApplication ends up being set. - - script: dotnet test --solution $(_TestSolution) -c $(_BuildConfig) --no-build -bl:$(BUILD.SOURCESDIRECTORY)/artifacts/TestResults/$(_BuildConfig)/TestStep.binlog --no-progress --output detailed -p:UsingDotNetTest=true + - script: dotnet test --solution NonWindowsTests.slnf -c $(_BuildConfig) --no-build -bl:$(BUILD.SOURCESDIRECTORY)/artifacts/TestResults/$(_BuildConfig)/TestStep.binlog --no-progress --output detailed -p:UsingDotNetTest=true name: Test displayName: Test + condition: and(succeeded(), eq(variables._BuildConfig, 'Debug')) + env: + DOTNET_ROOT: $(Build.SourcesDirectory)/.dotnet + NUGET_PACKAGES: $(Build.SourcesDirectory)/.packages + DOTNET_CLI_CONTEXT_VERBOSE: 1 + + # Integration tests are redundant in Release—they spawn child processes that already cover + # both Debug and Release configurations. Use --test-modules to run only unit tests. + - script: dotnet test --test-modules "artifacts/bin/*UnitTests*/$(_BuildConfig)/**/*UnitTests.dll" --results-directory $(BUILD.SOURCESDIRECTORY)/artifacts/TestResults/$(_BuildConfig) --no-progress --output detailed + name: TestRelease + displayName: Test (unit tests only) + condition: and(succeeded(), eq(variables._BuildConfig, 'Release')) env: DOTNET_ROOT: $(Build.SourcesDirectory)/.dotnet NUGET_PACKAGES: $(Build.SourcesDirectory)/.packages @@ -258,14 +272,14 @@ stages: Contents: | **/*.binlog TargetFolder: '$(Build.ArtifactStagingDirectory)/binlogs' - condition: and(always(), eq(variables._ExcludeIntegrationTests, 'false')) + condition: and(always(), eq(variables._BuildConfig, 'Debug')) - task: PublishBuildArtifacts@1 displayName: 'Publish integration tests binlogs' inputs: PathtoPublish: '$(Build.ArtifactStagingDirectory)/binlogs' ArtifactName: Integration_Tests_Linux_Binlogs_$(_BuildConfig) - condition: and(always(), eq(variables._ExcludeIntegrationTests, 'false')) + condition: and(always(), eq(variables._BuildConfig, 'Debug')) - job: MacOS timeoutInMinutes: 90 @@ -277,12 +291,8 @@ stages: matrix: Release: _BuildConfig: Release - _ExcludeIntegrationTests: true - _TestSolution: NonWindowsTests.NoIntegrationTests.slnf Debug: _BuildConfig: Debug - _ExcludeIntegrationTests: false - _TestSolution: NonWindowsTests.slnf steps: - script: eng/common/cibuild.sh -configuration $(_BuildConfig) @@ -291,7 +301,6 @@ stages: /p:Publish=false /p:NonWindowsBuild=true /p:FastAcceptanceTest=true - /p:ExcludeIntegrationTests=$(_ExcludeIntegrationTests) displayName: Build - task: PublishBuildArtifacts@1 @@ -305,9 +314,21 @@ stages: # Because the build step is using -ci flag, restore is done in a local .packages directory. # We need to pass NUGET_PACKAGES so that when dotnet test is doing evaluation phase on the projects, it can resolve .props/.targets from packages and import them. # Otherwise, props/targets are not imported. It's important that they are imported so that IsTestingPlatformApplication ends up being set. - - script: dotnet test --solution $(_TestSolution) -c $(_BuildConfig) --no-build -bl:$(BUILD.SOURCESDIRECTORY)/artifacts/TestResults/$(_BuildConfig)/TestStep.binlog --no-progress --output detailed -p:UsingDotNetTest=true + - script: dotnet test --solution NonWindowsTests.slnf -c $(_BuildConfig) --no-build -bl:$(BUILD.SOURCESDIRECTORY)/artifacts/TestResults/$(_BuildConfig)/TestStep.binlog --no-progress --output detailed -p:UsingDotNetTest=true name: Test displayName: Test + condition: and(succeeded(), eq(variables._BuildConfig, 'Debug')) + env: + DOTNET_ROOT: $(Build.SourcesDirectory)/.dotnet + NUGET_PACKAGES: $(Build.SourcesDirectory)/.packages + DOTNET_CLI_CONTEXT_VERBOSE: 1 + + # Integration tests are redundant in Release—they spawn child processes that already cover + # both Debug and Release configurations. Use --test-modules to run only unit tests. + - script: dotnet test --test-modules "artifacts/bin/*UnitTests*/$(_BuildConfig)/**/*UnitTests.dll" --results-directory $(BUILD.SOURCESDIRECTORY)/artifacts/TestResults/$(_BuildConfig) --no-progress --output detailed + name: TestRelease + displayName: Test (unit tests only) + condition: and(succeeded(), eq(variables._BuildConfig, 'Release')) env: DOTNET_ROOT: $(Build.SourcesDirectory)/.dotnet NUGET_PACKAGES: $(Build.SourcesDirectory)/.packages @@ -327,11 +348,11 @@ stages: Contents: | **/*.binlog TargetFolder: '$(Build.ArtifactStagingDirectory)/binlogs' - condition: and(always(), eq(variables._ExcludeIntegrationTests, 'false')) + condition: and(always(), eq(variables._BuildConfig, 'Debug')) - task: PublishBuildArtifacts@1 displayName: 'Publish integration tests binlogs' inputs: PathtoPublish: '$(Build.ArtifactStagingDirectory)/binlogs' ArtifactName: Integration_Tests_MacOS_Binlogs_$(_BuildConfig) - condition: and(always(), eq(variables._ExcludeIntegrationTests, 'false')) + condition: and(always(), eq(variables._BuildConfig, 'Debug')) diff --git a/eng/Build.props b/eng/Build.props index 21e5a110ad..559d7f3749 100644 --- a/eng/Build.props +++ b/eng/Build.props @@ -5,23 +5,15 @@ - + - - - - - + - - - - From 953e5fd10b3bcc3aa9e92d29153961ed54c6f518 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Amaury=20Lev=C3=A9?= Date: Fri, 20 Mar 2026 18:23:20 +0100 Subject: [PATCH 5/8] Update azure-pipelines.yml Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> --- azure-pipelines.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index 195fa735ca..e3f128acfd 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -131,7 +131,7 @@ stages: # Integration tests are redundant in Release—they spawn child processes that already cover # both Debug and Release configurations. Use --test-modules to run only unit tests. - - script: dotnet test --test-modules "artifacts/bin/*UnitTests*/$(_BuildConfig)/**/*UnitTests.dll" --results-directory $(BUILD.SOURCESDIRECTORY)\artifacts\TestResults\$(_BuildConfig) --no-progress --output detailed + - script: dotnet test --test-modules "artifacts/bin/*UnitTests*/$(_BuildConfig)/**/*UnitTests.dll" --test-modules "artifacts/bin/*UnitTests*/$(_BuildConfig)/net4*/*UnitTests.exe" --results-directory $(BUILD.SOURCESDIRECTORY)\artifacts\TestResults\$(_BuildConfig) --no-progress --output detailed name: TestRelease displayName: Test (unit tests only) condition: and(succeeded(), eq(variables._BuildConfig, 'Release')) From 61486e1f79abb5f45e05fdf3ffb6445656a12b68 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Amaury=20Lev=C3=A9?= Date: Tue, 21 Apr 2026 09:59:20 +0200 Subject: [PATCH 6/8] Add continueOnError to Publish Test Results steps In Release mode, if the build fails before the test step runs, the TestResults directory won't exist and the publish step would add a misleading failure. Adding continueOnError: true prevents this from failing the build. --- azure-pipelines.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index 856e9f5928..73facd3db3 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -147,6 +147,7 @@ stages: PathtoPublish: '$(Build.SourcesDirectory)/artifacts/TestResults/$(_BuildConfig)' ArtifactName: TestResults_Windows_$(_BuildConfig)_Attempt$(System.JobAttempt) condition: always() + continueOnError: true - task: CopyFiles@2 displayName: 'Copy binlogs' @@ -230,6 +231,7 @@ stages: PathtoPublish: '$(Build.SourcesDirectory)/artifacts/TestResults/$(_BuildConfig)' ArtifactName: TestResults_Linux_$(_BuildConfig)_Attempt$(System.JobAttempt) condition: always() + continueOnError: true - task: CopyFiles@2 displayName: 'Copy binlogs' @@ -299,6 +301,7 @@ stages: PathtoPublish: '$(Build.SourcesDirectory)/artifacts/TestResults/$(_BuildConfig)' ArtifactName: TestResults_MacOs_$(_BuildConfig)_Attempt$(System.JobAttempt) condition: always() + continueOnError: true - task: CopyFiles@2 displayName: 'Copy binlogs' From 02420cf9e3a83d69c9a45039920d512faa6adcf5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Amaury=20Lev=C3=A9?= Date: Tue, 21 Apr 2026 10:38:35 +0200 Subject: [PATCH 7/8] Address review: add --no-build to Release test steps, revert continueOnError - Add --no-build to all three Release dotnet test --test-modules commands to avoid unnecessary rebuilds (Windows, Linux, macOS) - Remove continueOnError: true from Publish Test Results steps to avoid masking real infrastructure failures --- azure-pipelines.yml | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index 73facd3db3..e41d0d73d7 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -132,7 +132,7 @@ stages: # Integration tests are redundant in Release—they spawn child processes that already cover # both Debug and Release configurations. Use --test-modules to run only unit tests. - - script: dotnet test --test-modules "artifacts/bin/*UnitTests*/$(_BuildConfig)/**/*UnitTests.dll" --test-modules "artifacts/bin/*UnitTests*/$(_BuildConfig)/net4*/*UnitTests.exe" --results-directory $(BUILD.SOURCESDIRECTORY)\artifacts\TestResults\$(_BuildConfig) --no-progress --output detailed + - script: dotnet test --no-build --test-modules "artifacts/bin/*UnitTests*/$(_BuildConfig)/**/*UnitTests.dll" --test-modules "artifacts/bin/*UnitTests*/$(_BuildConfig)/net4*/*UnitTests.exe" --results-directory $(BUILD.SOURCESDIRECTORY)\artifacts\TestResults\$(_BuildConfig) --no-progress --output detailed name: TestRelease displayName: Test (unit tests only) condition: and(succeeded(), eq(variables._BuildConfig, 'Release')) @@ -147,7 +147,6 @@ stages: PathtoPublish: '$(Build.SourcesDirectory)/artifacts/TestResults/$(_BuildConfig)' ArtifactName: TestResults_Windows_$(_BuildConfig)_Attempt$(System.JobAttempt) condition: always() - continueOnError: true - task: CopyFiles@2 displayName: 'Copy binlogs' @@ -216,7 +215,7 @@ stages: # Integration tests are redundant in Release—they spawn child processes that already cover # both Debug and Release configurations. Use --test-modules to run only unit tests. - - script: dotnet test --test-modules "artifacts/bin/*UnitTests*/$(_BuildConfig)/**/*UnitTests.dll" --results-directory $(BUILD.SOURCESDIRECTORY)/artifacts/TestResults/$(_BuildConfig) --no-progress --output detailed + - script: dotnet test --no-build --test-modules "artifacts/bin/*UnitTests*/$(_BuildConfig)/**/*UnitTests.dll" --results-directory $(BUILD.SOURCESDIRECTORY)/artifacts/TestResults/$(_BuildConfig) --no-progress --output detailed name: TestRelease displayName: Test (unit tests only) condition: and(succeeded(), eq(variables._BuildConfig, 'Release')) @@ -231,7 +230,6 @@ stages: PathtoPublish: '$(Build.SourcesDirectory)/artifacts/TestResults/$(_BuildConfig)' ArtifactName: TestResults_Linux_$(_BuildConfig)_Attempt$(System.JobAttempt) condition: always() - continueOnError: true - task: CopyFiles@2 displayName: 'Copy binlogs' @@ -286,7 +284,7 @@ stages: # Integration tests are redundant in Release—they spawn child processes that already cover # both Debug and Release configurations. Use --test-modules to run only unit tests. - - script: dotnet test --test-modules "artifacts/bin/*UnitTests*/$(_BuildConfig)/**/*UnitTests.dll" --results-directory $(BUILD.SOURCESDIRECTORY)/artifacts/TestResults/$(_BuildConfig) --no-progress --output detailed + - script: dotnet test --no-build --test-modules "artifacts/bin/*UnitTests*/$(_BuildConfig)/**/*UnitTests.dll" --results-directory $(BUILD.SOURCESDIRECTORY)/artifacts/TestResults/$(_BuildConfig) --no-progress --output detailed name: TestRelease displayName: Test (unit tests only) condition: and(succeeded(), eq(variables._BuildConfig, 'Release')) @@ -301,7 +299,6 @@ stages: PathtoPublish: '$(Build.SourcesDirectory)/artifacts/TestResults/$(_BuildConfig)' ArtifactName: TestResults_MacOs_$(_BuildConfig)_Attempt$(System.JobAttempt) condition: always() - continueOnError: true - task: CopyFiles@2 displayName: 'Copy binlogs' From 7f8bb730da1dccb2587e1eb0129d12d949a9b29d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Amaury=20Lev=C3=A9?= Date: Tue, 21 Apr 2026 11:20:21 +0200 Subject: [PATCH 8/8] Fix --test-modules: use single *.exe glob for Windows Release --test-modules only accepts a single argument. Use *.exe glob which covers both net4x (native exe) and net8+/net9+ (apphost exe) outputs. Linux/macOS already use a single --test-modules with *.dll pattern. --- azure-pipelines.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index e41d0d73d7..8cc6e62358 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -132,7 +132,8 @@ stages: # Integration tests are redundant in Release—they spawn child processes that already cover # both Debug and Release configurations. Use --test-modules to run only unit tests. - - script: dotnet test --no-build --test-modules "artifacts/bin/*UnitTests*/$(_BuildConfig)/**/*UnitTests.dll" --test-modules "artifacts/bin/*UnitTests*/$(_BuildConfig)/net4*/*UnitTests.exe" --results-directory $(BUILD.SOURCESDIRECTORY)\artifacts\TestResults\$(_BuildConfig) --no-progress --output detailed + # Use *.exe to cover both net4x (native exe) and net8+/net9+ (apphost exe) in a single glob. + - script: dotnet test --no-build --test-modules "artifacts/bin/*UnitTests*/$(_BuildConfig)/**/*UnitTests.exe" --results-directory $(BUILD.SOURCESDIRECTORY)\artifacts\TestResults\$(_BuildConfig) --no-progress --output detailed name: TestRelease displayName: Test (unit tests only) condition: and(succeeded(), eq(variables._BuildConfig, 'Release'))