File tree Expand file tree Collapse file tree 1 file changed +13
-1
lines changed
.azure-pipelines/PipelineSteps Expand file tree Collapse file tree 1 file changed +13
-1
lines changed Original file line number Diff line number Diff line change @@ -31,7 +31,19 @@ if ($PowerShellPlatform) {
3131$preference = $ErrorActionPreference
3232$ErrorActionPreference = ' Continue'
3333$buildProjPath = Join-Path $RepoRoot ' build.proj'
34- dotnet msbuild $buildProjPath / t:Test " /p:Configuration=$Configuration ;TestFramework=$TestFramework "
34+
35+ $buildArgs = " /p:Configuration=$Configuration ;TestFramework=$TestFramework "
36+
37+ if ($IsLinux ) {
38+ # Applying various parallelism/heap restriction behaviors to prevent OOM issues on Ubuntu 24.04
39+ Write-Host - ForegroundColor Yellow " Detected Linux agent – applying memory tuning for tests"
40+ $env: DOTNET_gcServer = " 0"
41+ $env: DOTNET_gcHeapCount = " 2"
42+ $buildArgs += " ;RunConfiguration.MaxCpuCount=2"
43+ }
44+
45+ dotnet msbuild $buildProjPath / t:Test $buildArgs
46+
3547Write-Host - ForegroundColor DarkGreen " -------------------- End testing ... --------------------`n`n`n`n`n "
3648
3749# Test AutoGen Modules With PowerShell Core
You can’t perform that action at this time.
0 commit comments