From fe97e78dd27aab657a0917f3d32ad27d6136e12e Mon Sep 17 00:00:00 2001 From: Daniel Languiller Date: Mon, 15 Sep 2025 12:00:56 +1000 Subject: [PATCH 1/6] fix: trialling memory management tweaks for linux on test steps --- .azure-pipelines/PipelineSteps/test-steps.ps1 | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/.azure-pipelines/PipelineSteps/test-steps.ps1 b/.azure-pipelines/PipelineSteps/test-steps.ps1 index f435bae3bd2a..773622ee7df7 100644 --- a/.azure-pipelines/PipelineSteps/test-steps.ps1 +++ b/.azure-pipelines/PipelineSteps/test-steps.ps1 @@ -31,7 +31,19 @@ if ($PowerShellPlatform) { $preference = $ErrorActionPreference $ErrorActionPreference = 'Continue' $buildProjPath = Join-Path $RepoRoot 'build.proj' -dotnet msbuild $buildProjPath /t:Test "/p:Configuration=$Configuration;TestFramework=$TestFramework" + +$buildArgs = "/p:Configuration=$Configuration;TestFramework=$TestFramework" + +if ($IsLinux) { + # Applying various parrelism/heap restriction behaviours to prevent OOM issues on Ubuntu 2404 + Write-Host -ForegroundColor Yellow "Detected Linux agent – applying memory tuning for tests" + $env:DOTNET_gcServer = "0" + $env:DOTNET_gcHeapCount = "2" + $buildArgs += ";RunConfiguration.MaxCpuCount=2" +} + +dotnet msbuild $buildProjPath /t:Test $buildArgs + Write-Host -ForegroundColor DarkGreen "-------------------- End testing ... --------------------`n`n`n`n`n" # Test AutoGen Modules With PowerShell Core From b488b2dd3f9abd8a47c3c02094f35fb7c6d60be5 Mon Sep 17 00:00:00 2001 From: Daniel Languiller Date: Mon, 15 Sep 2025 15:59:42 +1000 Subject: [PATCH 2/6] Revert "fix: trialling memory management tweaks for linux on test steps" This reverts commit fe97e78dd27aab657a0917f3d32ad27d6136e12e. --- .azure-pipelines/PipelineSteps/test-steps.ps1 | 14 +------------- 1 file changed, 1 insertion(+), 13 deletions(-) diff --git a/.azure-pipelines/PipelineSteps/test-steps.ps1 b/.azure-pipelines/PipelineSteps/test-steps.ps1 index 773622ee7df7..f435bae3bd2a 100644 --- a/.azure-pipelines/PipelineSteps/test-steps.ps1 +++ b/.azure-pipelines/PipelineSteps/test-steps.ps1 @@ -31,19 +31,7 @@ if ($PowerShellPlatform) { $preference = $ErrorActionPreference $ErrorActionPreference = 'Continue' $buildProjPath = Join-Path $RepoRoot 'build.proj' - -$buildArgs = "/p:Configuration=$Configuration;TestFramework=$TestFramework" - -if ($IsLinux) { - # Applying various parrelism/heap restriction behaviours to prevent OOM issues on Ubuntu 2404 - Write-Host -ForegroundColor Yellow "Detected Linux agent – applying memory tuning for tests" - $env:DOTNET_gcServer = "0" - $env:DOTNET_gcHeapCount = "2" - $buildArgs += ";RunConfiguration.MaxCpuCount=2" -} - -dotnet msbuild $buildProjPath /t:Test $buildArgs - +dotnet msbuild $buildProjPath /t:Test "/p:Configuration=$Configuration;TestFramework=$TestFramework" Write-Host -ForegroundColor DarkGreen "-------------------- End testing ... --------------------`n`n`n`n`n" # Test AutoGen Modules With PowerShell Core From 79eb221a71c1a082c254f8038be81b9a249f493b Mon Sep 17 00:00:00 2001 From: Daniel Languiller Date: Mon, 15 Sep 2025 16:19:49 +1000 Subject: [PATCH 3/6] feature: mock change to trigger tests --- .azure-pipelines/PipelineSteps/test-steps.ps1 | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/.azure-pipelines/PipelineSteps/test-steps.ps1 b/.azure-pipelines/PipelineSteps/test-steps.ps1 index f435bae3bd2a..ed0152f81eda 100644 --- a/.azure-pipelines/PipelineSteps/test-steps.ps1 +++ b/.azure-pipelines/PipelineSteps/test-steps.ps1 @@ -31,6 +31,11 @@ if ($PowerShellPlatform) { $preference = $ErrorActionPreference $ErrorActionPreference = 'Continue' $buildProjPath = Join-Path $RepoRoot 'build.proj' + +if ($IsLinux) { + # Mock step + Write-Host -ForegroundColor Yellow "Detected Linux agent – applying memory tuning for tests" +} dotnet msbuild $buildProjPath /t:Test "/p:Configuration=$Configuration;TestFramework=$TestFramework" Write-Host -ForegroundColor DarkGreen "-------------------- End testing ... --------------------`n`n`n`n`n" From 1f934e68ea47a4f14c2063abe72f3d07152316ce Mon Sep 17 00:00:00 2001 From: Daniel Languiller Date: Mon, 15 Sep 2025 16:48:47 +1000 Subject: [PATCH 4/6] Revert "feature: mock change to trigger tests" This reverts commit 79eb221a71c1a082c254f8038be81b9a249f493b. --- .azure-pipelines/PipelineSteps/test-steps.ps1 | 5 ----- 1 file changed, 5 deletions(-) diff --git a/.azure-pipelines/PipelineSteps/test-steps.ps1 b/.azure-pipelines/PipelineSteps/test-steps.ps1 index ed0152f81eda..f435bae3bd2a 100644 --- a/.azure-pipelines/PipelineSteps/test-steps.ps1 +++ b/.azure-pipelines/PipelineSteps/test-steps.ps1 @@ -31,11 +31,6 @@ if ($PowerShellPlatform) { $preference = $ErrorActionPreference $ErrorActionPreference = 'Continue' $buildProjPath = Join-Path $RepoRoot 'build.proj' - -if ($IsLinux) { - # Mock step - Write-Host -ForegroundColor Yellow "Detected Linux agent – applying memory tuning for tests" -} dotnet msbuild $buildProjPath /t:Test "/p:Configuration=$Configuration;TestFramework=$TestFramework" Write-Host -ForegroundColor DarkGreen "-------------------- End testing ... --------------------`n`n`n`n`n" From 0a7dee1437df374cbfa57c33b4fe25330ab508f9 Mon Sep 17 00:00:00 2001 From: Daniel Languiller Date: Mon, 15 Sep 2025 16:49:06 +1000 Subject: [PATCH 5/6] Reapply "fix: trialling memory management tweaks for linux on test steps" This reverts commit b488b2dd3f9abd8a47c3c02094f35fb7c6d60be5. --- .azure-pipelines/PipelineSteps/test-steps.ps1 | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/.azure-pipelines/PipelineSteps/test-steps.ps1 b/.azure-pipelines/PipelineSteps/test-steps.ps1 index f435bae3bd2a..773622ee7df7 100644 --- a/.azure-pipelines/PipelineSteps/test-steps.ps1 +++ b/.azure-pipelines/PipelineSteps/test-steps.ps1 @@ -31,7 +31,19 @@ if ($PowerShellPlatform) { $preference = $ErrorActionPreference $ErrorActionPreference = 'Continue' $buildProjPath = Join-Path $RepoRoot 'build.proj' -dotnet msbuild $buildProjPath /t:Test "/p:Configuration=$Configuration;TestFramework=$TestFramework" + +$buildArgs = "/p:Configuration=$Configuration;TestFramework=$TestFramework" + +if ($IsLinux) { + # Applying various parrelism/heap restriction behaviours to prevent OOM issues on Ubuntu 2404 + Write-Host -ForegroundColor Yellow "Detected Linux agent – applying memory tuning for tests" + $env:DOTNET_gcServer = "0" + $env:DOTNET_gcHeapCount = "2" + $buildArgs += ";RunConfiguration.MaxCpuCount=2" +} + +dotnet msbuild $buildProjPath /t:Test $buildArgs + Write-Host -ForegroundColor DarkGreen "-------------------- End testing ... --------------------`n`n`n`n`n" # Test AutoGen Modules With PowerShell Core From 6db5328447a6df44fef873f0977f2865f0e88c7d Mon Sep 17 00:00:00 2001 From: Daniel Languiller Date: Tue, 16 Sep 2025 08:50:31 +1000 Subject: [PATCH 6/6] fix: address Copilot typo comments --- .azure-pipelines/PipelineSteps/test-steps.ps1 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.azure-pipelines/PipelineSteps/test-steps.ps1 b/.azure-pipelines/PipelineSteps/test-steps.ps1 index 773622ee7df7..cbd27ed996c3 100644 --- a/.azure-pipelines/PipelineSteps/test-steps.ps1 +++ b/.azure-pipelines/PipelineSteps/test-steps.ps1 @@ -35,7 +35,7 @@ $buildProjPath = Join-Path $RepoRoot 'build.proj' $buildArgs = "/p:Configuration=$Configuration;TestFramework=$TestFramework" if ($IsLinux) { - # Applying various parrelism/heap restriction behaviours to prevent OOM issues on Ubuntu 2404 + # Applying various parallelism/heap restriction behaviors to prevent OOM issues on Ubuntu 24.04 Write-Host -ForegroundColor Yellow "Detected Linux agent – applying memory tuning for tests" $env:DOTNET_gcServer = "0" $env:DOTNET_gcHeapCount = "2"