From e9c7126e31c9adc399f8747c8b06a34cac6b2a2b Mon Sep 17 00:00:00 2001 From: Egor Chesakov Date: Thu, 11 Apr 2019 22:50:48 -0700 Subject: [PATCH] Enable default Ready2Run testing in pull requests. Workaround an issue with custom xunit.console.dll runner. (dotnet/coreclr#23848) Commit migrated from https://github.com/dotnet/coreclr/commit/1660956bca91b93259393419cb169a10df088926 --- eng/pipelines/coreclr/azure-pipelines.yml | 15 +++++++++++++++ src/coreclr/build-test.cmd | 5 +++++ src/coreclr/build-test.sh | 3 ++- 3 files changed, 22 insertions(+), 1 deletion(-) diff --git a/eng/pipelines/coreclr/azure-pipelines.yml b/eng/pipelines/coreclr/azure-pipelines.yml index 07aa294156911..fb2b53e4677f2 100644 --- a/eng/pipelines/coreclr/azure-pipelines.yml +++ b/eng/pipelines/coreclr/azure-pipelines.yml @@ -221,6 +221,21 @@ jobs: ${{ if eq(variables['Build.DefinitionName'], 'coreclr-outerloop-gcstress0x3-gcstress0xc') }}: testGroup: outerloop-gcstress0x3-gcstress0xc +# The ReadyToRun test jobs that are triggered by default from a PR. +- ${{ if and(eq(variables['System.TeamProject'], 'public'), eq(variables['Build.Reason'], 'PullRequest'), eq(variables['Build.DefinitionName'], 'coreclr-ci')) }}: + - template: eng/platform-matrix.yml + parameters: + jobTemplate: test-job.yml + buildConfig: checked + platforms: + - Linux_x64 + - OSX_x64 + - Windows_NT_x64 + - Windows_NT_x86 + jobParameters: + readyToRun: true + testGroup: innerloop + # CI - ${{ if and(eq(variables['System.TeamProject'], 'public'), in(variables['Build.Reason'], 'IndividualCI', 'BatchedCI')) }}: - template: eng/platform-matrix.yml diff --git a/src/coreclr/build-test.cmd b/src/coreclr/build-test.cmd index ee2a4c1a41e7b..774bd7c83761c 100644 --- a/src/coreclr/build-test.cmd +++ b/src/coreclr/build-test.cmd @@ -557,6 +557,11 @@ if /I "%2" == "mscorlib.ni.dll" exit /b 0 REM don't precompile anything from CoreCLR if /I exist %CORE_ROOT_STAGE%\%2 exit /b 0 +REM Don't precompile xunit.* files +echo "%2" | findstr /b "xunit." >nul && ( + exit /b 0 +) + "%CORE_ROOT_STAGE%\crossgen.exe" /Platform_Assemblies_Paths "%CORE_ROOT%" /in "%1" /out "%CORE_ROOT%/temp.ni.dll" >nul 2>nul set /a __exitCode = %errorlevel% if "%__exitCode%" == "-2146230517" ( diff --git a/src/coreclr/build-test.sh b/src/coreclr/build-test.sh index 2489e7eb56330..96e6959746f3a 100755 --- a/src/coreclr/build-test.sh +++ b/src/coreclr/build-test.sh @@ -176,7 +176,8 @@ precompile_coreroot_fx() local overlayDir=$CORE_ROOT - filesToPrecompile=$(find -L $overlayDir -iname \*.dll -not -iname \*.ni.dll -not -iname \*-ms-win-\* -type f ) + # TODO: Remove System.Xml.XDocument.dll exclusion - it was added because "custom" xunit.console.dll fails when running from Core_Root with crossgen-d framework. + filesToPrecompile=$(find -L $overlayDir -iname \*.dll -not -iname \*.ni.dll -not -iname \*-ms-win-\* -not -iname xunit.\* -not -name System.Xml.XDocument.dll -type f) for fileToPrecompile in ${filesToPrecompile} do local filename=${fileToPrecompile}