From 1660956bca91b93259393419cb169a10df088926 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. (#23848) --- azure-pipelines.yml | 15 +++++++++++++++ build-test.cmd | 5 +++++ build-test.sh | 3 ++- 3 files changed, 22 insertions(+), 1 deletion(-) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index 07aa29415691..fb2b53e4677f 100644 --- a/azure-pipelines.yml +++ b/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/build-test.cmd b/build-test.cmd index ee2a4c1a41e7..774bd7c83761 100644 --- a/build-test.cmd +++ b/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/build-test.sh b/build-test.sh index 2489e7eb5633..96e6959746f3 100755 --- a/build-test.sh +++ b/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}