From 431ac21af4e0c2754e5b5df13eb4c0ad5cb612a5 Mon Sep 17 00:00:00 2001 From: Aman Khalid Date: Thu, 31 Aug 2023 17:56:59 -0400 Subject: [PATCH] Test hot/cold splitting in runtime-coreclr crossgen2 pipeline (#91217) Adds job to runtime-coreclr crossgen2 that runs the innerloop test group with hot/cold splitting enabled in Crossgen2. --- .../common/templates/runtimes/run-test-job.yml | 5 +++++ .../templates/runtimes/send-to-helix-step.yml | 2 ++ eng/pipelines/coreclr/crossgen2.yml | 18 ++++++++++++++++++ src/tests/Common/CLRTest.CrossGen.targets | 6 ++++++ src/tests/Common/helixpublishwitharcade.proj | 4 ++++ 5 files changed, 35 insertions(+) diff --git a/eng/pipelines/common/templates/runtimes/run-test-job.yml b/eng/pipelines/common/templates/runtimes/run-test-job.yml index 527be29f981..125fe758643 100644 --- a/eng/pipelines/common/templates/runtimes/run-test-job.yml +++ b/eng/pipelines/common/templates/runtimes/run-test-job.yml @@ -7,6 +7,7 @@ parameters: testGroup: '' crossBuild: false readyToRun: false + hotColdSplitting: false liveLibrariesBuildConfig: '' compositeBuildMode: false useCodeFlowEnforcement: '' @@ -119,6 +120,9 @@ jobs: value: 'composite' - name: LogNamePrefix value: TestRunLogs_R2R_CG2_Composite + - ${{ if eq(parameters.hotColdSplitting, true) }}: + - name: LogNamePrefix + value: TestRunLogs_R2R_CG2_HotColdSplitting - name: testTreeFilterArg value: '' @@ -349,6 +353,7 @@ jobs: compositeBuildMode: ${{ parameters.compositeBuildMode }} runInUnloadableContext: ${{ parameters.runInUnloadableContext }} tieringTest: ${{ parameters.tieringTest }} + hotColdSplitting: ${{ parameters.hotColdSplitting }} ${{ if eq(variables['System.TeamProject'], 'internal') }}: # Access token variable for internal project from the diff --git a/eng/pipelines/common/templates/runtimes/send-to-helix-step.yml b/eng/pipelines/common/templates/runtimes/send-to-helix-step.yml index 37b455b19d8..8ff61d0cdc7 100644 --- a/eng/pipelines/common/templates/runtimes/send-to-helix-step.yml +++ b/eng/pipelines/common/templates/runtimes/send-to-helix-step.yml @@ -22,6 +22,7 @@ parameters: helixProjectArguments: '' runInUnloadableContext: '' tieringTest: '' + hotColdSplitting: '' nativeAotTest: '' longRunningGcTests: '' gcSimulatorTests: '' @@ -55,6 +56,7 @@ steps: _CompositeBuildMode: ${{ parameters.compositeBuildMode }} _RunInUnloadableContext: ${{ parameters.runInUnloadableContext }} _TieringTest: ${{ parameters.tieringTest }} + _HotColdSplitting: ${{ parameters.hotColdSplitting }} _NativeAotTest: ${{ parameters.nativeAotTest }} _LongRunningGcTests: ${{ parameters.longRunningGcTests }} _GcSimulatorTests: ${{ parameters.gcSimulatorTests }} diff --git a/eng/pipelines/coreclr/crossgen2.yml b/eng/pipelines/coreclr/crossgen2.yml index 479dfc5f112..1448474004c 100644 --- a/eng/pipelines/coreclr/crossgen2.yml +++ b/eng/pipelines/coreclr/crossgen2.yml @@ -56,3 +56,21 @@ extends: readyToRun: true displayNameArgs: R2R_CG2 liveLibrariesBuildConfig: Release + + # Run pri0 tests with hot/cold splitting enabled (only supported on x64 at the moment) + # TODO: test on arm64 once supported + - template: /eng/pipelines/common/platform-matrix.yml + parameters: + jobTemplate: /eng/pipelines/common/templates/runtimes/run-test-job.yml + helixQueuesTemplate: /eng/pipelines/coreclr/templates/helix-queues-setup.yml + buildConfig: checked + platforms: + - linux_x64 + - osx_x64 + - windows_x64 + jobParameters: + testGroup: innerloop + readyToRun: true + hotColdSplitting: true + displayNameArgs: R2R_CG2_HotColdSplitting + liveLibrariesBuildConfig: Release diff --git a/src/tests/Common/CLRTest.CrossGen.targets b/src/tests/Common/CLRTest.CrossGen.targets index 481a79a5075..c71df61f92e 100644 --- a/src/tests/Common/CLRTest.CrossGen.targets +++ b/src/tests/Common/CLRTest.CrossGen.targets @@ -111,6 +111,9 @@ if [ ! -z ${RunCrossGen2+x} ]%3B then echo --synthesize-random-mibc>>$__ResponseFile echo --embed-pgo-data>>$__ResponseFile fi + if [ ! -z ${HotColdSplitting+x} ]%3B then + echo --hot-cold-splitting>>$__ResponseFile + fi echo --targetarch:$(TargetArchitecture)>>$__ResponseFile echo --targetos:$(TargetOS)>>$__ResponseFile @@ -257,6 +260,9 @@ if defined RunCrossGen2 ( echo --synthesize-random-mibc>>!__ResponseFile! echo --embed-pgo-data>>!__ResponseFile! ) + if defined HotColdSplitting ( + echo --hot-cold-splitting>>!__ResponseFile! + ) echo -r:!CORE_ROOT!\System.*.dll>>!__ResponseFile! echo -r:!CORE_ROOT!\Microsoft.*.dll>>!__ResponseFile! echo -r:!CORE_ROOT!\xunit.*.dll>>!__ResponseFile! diff --git a/src/tests/Common/helixpublishwitharcade.proj b/src/tests/Common/helixpublishwitharcade.proj index 43f2f4dbb63..96392c36e68 100644 --- a/src/tests/Common/helixpublishwitharcade.proj +++ b/src/tests/Common/helixpublishwitharcade.proj @@ -40,6 +40,7 @@ <_GcSimulatorTests>false <_RunInUnloadableContext>false <_TieringTest>false + <_HotColdSplitting>false <_NativeAotTest>false <_TimeoutPerTestCollectionInMinutes>123 <_TimeoutPerTestInMinutes>234 @@ -99,6 +100,7 @@ GcSimulatorTests=$(_GcSimulatorTests); RunInUnloadableContext=$(_RunInUnloadableContext); TieringTest=$(_TieringTest); + HotColdSplitting=$(_HotColdSplitting); NativeAotTest=$(_NativeAotTest); TimeoutPerTestCollectionInMinutes=$(_TimeoutPerTestCollectionInMinutes); TimeoutPerTestInMinutes=$(_TimeoutPerTestInMinutes); @@ -668,6 +670,7 @@ + @@ -720,6 +723,7 @@ + -- GitLab