From 1f8e0a11e56534bd3183bbb81efd166e958a9dd0 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Tom=C3=A1=C5=A1=20Rylek?= Date: Wed, 29 Jul 2020 19:37:59 +0200 Subject: [PATCH] Crossgen2 composite GC stress pipeline (#39949) --- eng/pipelines/coreclr/crossgen2-gcstress.yml | 60 ++++++++++++++++++++++++++ src/coreclr/tests/src/CLRTest.CrossGen.targets | 24 +++++++++++ 2 files changed, 84 insertions(+) create mode 100644 eng/pipelines/coreclr/crossgen2-gcstress.yml diff --git a/eng/pipelines/coreclr/crossgen2-gcstress.yml b/eng/pipelines/coreclr/crossgen2-gcstress.yml new file mode 100644 index 0000000..7942e74 --- /dev/null +++ b/eng/pipelines/coreclr/crossgen2-gcstress.yml @@ -0,0 +1,60 @@ +trigger: none + +pr: none + +schedules: +- cron: "0 6 * * 0,1" + displayName: Sat and Sun at 10:00 PM (UTC-8:00) + branches: + include: + - master + always: true + +jobs: +# +# Checkout repository +# +- template: /eng/pipelines/common/checkout-job.yml + +- template: /eng/pipelines/common/platform-matrix.yml + parameters: + jobTemplate: /eng/pipelines/common/build-coreclr-and-libraries-job.yml + buildConfig: checked + platforms: + - Linux_x64 + - Linux_arm64 + - OSX_x64 + - Windows_NT_x64 + - Windows_NT_arm64 + - CoreClrTestBuildHost # Either OSX_x64 or Linux_x64 + jobParameters: + testGroup: gcstress-extra + +- template: /eng/pipelines/common/platform-matrix.yml + parameters: + jobTemplate: /eng/pipelines/common/templates/runtimes/build-test-job.yml + buildConfig: checked + platforms: + - CoreClrTestBuildHost # Either OSX_x64 or Linux_x64 + jobParameters: + testGroup: gcstress-extra + liveLibrariesBuildConfig: Release + +- 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 + - Linux_arm64 + - OSX_x64 + - Windows_NT_x64 + - Windows_NT_arm64 + jobParameters: + testGroup: gcstress-extra + readyToRun: true + crossgen2: true + compositeBuildMode: true + displayNameArgs: Composite + liveLibrariesBuildConfig: Release diff --git a/src/coreclr/tests/src/CLRTest.CrossGen.targets b/src/coreclr/tests/src/CLRTest.CrossGen.targets index a110437..926f6ec 100644 --- a/src/coreclr/tests/src/CLRTest.CrossGen.targets +++ b/src/coreclr/tests/src/CLRTest.CrossGen.targets @@ -84,6 +84,14 @@ if [ ! -z ${RunCrossGen2+x} ]%3B then __ResponseFile="$__OutputFile.rsp" rm $__ResponseFile + // Suppress the GC stress COMPlus for the duration of Crossgen2 execution + local gcStressModeToRestore = $COMPlus_GCStress; + local heapVerifyModeToRestore = $COMPlus_HeapVerify; + local readyToRunModeToRestore = $COMPlus_ReadyToRun; + export COMPlus_GCStress= + export COMPlus_HeapVerify= + export COMPlus_ReadyToRun= + __Command=$_DebuggerFullPath # Tests run locally need __TestDotNetCmd (set by runtest.py) or a compatible 5.0 dotnet runtime in the path if [ ! -z ${__TestDotNetCmd+x} ] %3B then @@ -109,6 +117,10 @@ if [ ! -z ${RunCrossGen2+x} ]%3B then echo "Running CrossGen2: $__Command" $__Command __cg2ExitCode=$? + + export COMPlus_GCStress=$gcStressModeToRestore + export COMPlus_HeapVerify=$heapVerifyModeToRestore + export COMPlus_ReadyToRun=$readyToRunModeToRestore } if [ ! -z ${CompositeBuildMode+x} ]%3B then @@ -212,6 +224,14 @@ if defined RunCrossGen2 ( set __ResponseFile=!__OutputFile!.rsp del /Q !__ResponseFile! + REM Suppress GC stress mode for the duration of Crossgen2 execution + set __gcStressModeToRestore=!COMPlus_GCStress! + set COMPlus_GCStress= + set __heapVerifyModeToRestore=!COMPlus_HeapVerify! + set COMPlus_HeapVerify= + set __readyToRunModeToRestore=!COMPlus_ReadyToRun! + set COMPlus_ReadyToRun= + set __Command=!_DebuggerFullPath! REM Tests run locally need __TestDotNetCmd (set by runtest.py) or a compatible 5.0 dotnet runtime in the path if defined __TestDotNetCmd ( @@ -237,6 +257,10 @@ if defined RunCrossGen2 ( echo "!__Command!" call !__Command! set CrossGen2Status=!ERRORLEVEL! + set COMPlus_GCStress=!__gcStressModeToRestore! + set COMPlus_HeapVerify=!__heapVerifyModeToRestore! + set COMPlus_ReadyToRun=!__readyToRunModeToRestore! + Exit /b 0 :DoneCrossgen2Operations -- 2.7.4