From 278e2ec4992e0afa5a27a53de4dc5a369680dfdf Mon Sep 17 00:00:00 2001 From: Jakub Majocha <1760221+majocha@users.noreply.github.com> Date: Sun, 13 Oct 2024 09:08:03 +0200 Subject: [PATCH] split ComponentTests into two processes in ci --- eng/Build.ps1 | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/eng/Build.ps1 b/eng/Build.ps1 index abfd48c5d79..e42fd7d8c43 100644 --- a/eng/Build.ps1 +++ b/eng/Build.ps1 @@ -646,12 +646,18 @@ try { if ($testDesktop -and $ci) { # Run FSharpSuite in the background because it's very slow in the CI. - $bgJob = TestUsingMSBuild -testProject "$RepoRoot\tests\fsharp\FSharpSuite.Tests.fsproj" -targetFramework $script:desktopTargetFramework -testadapterpath "$ArtifactsDir\bin\FSharpSuite.Tests\" -backgroundJob 1 -settings "-- xUnit.MaxParallelThreads=4.0x" + $bgJob1 = TestUsingMSBuild -testProject "$RepoRoot\tests\fsharp\FSharpSuite.Tests.fsproj" -targetFramework $script:desktopTargetFramework -testadapterpath "$ArtifactsDir\bin\FSharpSuite.Tests\" -backgroundJob 1 -settings "-- xUnit.MaxParallelThreads=4.0x" + # Split ComponentTests run into two processes using filter. + $bgJob2 = TestUsingMSBuild -testProject "$RepoRoot\tests\FSharp.Compiler.ComponentTests\FSharp.Compiler.ComponentTests.fsproj" -targetFramework $script:desktopTargetFramework -testadapterpath "$ArtifactsDir\bin\FSharp.Compiler.ComponentTests\" -backgroundJob 2 -settings "--filter ""FullyQualifiedName!~Conformance&FullyQualifiedName!~Miscellaneous"" " + $bgJob3 = TestUsingMSBuild -testProject "$RepoRoot\tests\FSharp.Compiler.ComponentTests\FSharp.Compiler.ComponentTests.fsproj" -targetFramework $script:desktopTargetFramework -testadapterpath "$ArtifactsDir\bin\FSharp.Compiler.ComponentTests\" -backgroundJob 3 -settings "--filter ""FullyQualifiedName~Conformance|FullyQualifiedName~Miscellaneous"" " + # Run in single node with -m:1. There is no need to rush, it will wait for FSharpSuite anyway. - TestSolutionUsingMSBuild -testSolution "$RepoRoot\FSharp.sln" -targetFramework $script:desktopTargetFramework -testadapterpath "$ArtifactsDir\bin\FSharp.Compiler.ComponentTests\" -settings "--no-build -m:1 --filter Project!=FSharpSuite.Tests " + TestSolutionUsingMSBuild -testSolution "$RepoRoot\FSharp.sln" -targetFramework $script:desktopTargetFramework -testadapterpath "$ArtifactsDir\bin\FSharp.Compiler.ComponentTests\" -settings "--no-build -m:1 --filter ""Project!=FSharpSuite.Tests&Project!=FSharp.Compiler.ComponentTests"" " # Collect output from background job - Receive -job $bgJob + Receive -job $bgJob1 + Receive -job $bgJob2 + Receive -job $bgJob3 } if ($testFSharpQA) {