From 5fb2c1bfb4e6d70730413f88c036441a75c6ffef Mon Sep 17 00:00:00 2001 From: Swaroop Sridhar Date: Mon, 3 Apr 2017 16:10:38 -0700 Subject: [PATCH] Add a job for testing via IlLink for Linux Add jobs to run CoreCLR tests on Ubuntu via ILLINK Commit migrated from https://github.com/dotnet/coreclr/commit/c3b9127f72748289cb98e45e62f3ea3a92543186 --- src/coreclr/netci.groovy | 33 ++++++++++++++++++++++-------- src/coreclr/tests/scripts/build_illink.cmd | 3 ++- src/coreclr/tests/scripts/build_illink.sh | 4 +--- 3 files changed, 28 insertions(+), 12 deletions(-) diff --git a/src/coreclr/netci.groovy b/src/coreclr/netci.groovy index d82e2d6..29bf4dc 100755 --- a/src/coreclr/netci.groovy +++ b/src/coreclr/netci.groovy @@ -605,9 +605,11 @@ def static addNonPRTriggers(def job, def branch, def isPR, def architecture, def case 'illink': // Testing on other operating systems TBD - assert (os == 'Windows_NT') + assert (os == 'Windows_NT' || os == 'Ubuntu') if (architecture == 'x64' || architecture == 'x86') { - Utilities.addPeriodicTrigger(job, '@daily') + if (configuration == 'Checked') { + Utilities.addPeriodicTrigger(job, '@daily') + } } break @@ -687,6 +689,11 @@ def static addTriggers(def job, def branch, def isPR, def architecture, def os, Utilities.addGithubPRTriggerForBranch(job, branch, "${os} ${architecture} ${configuration} Build", "(?i).*test\\W+${os}\\W+.*") break case 'Ubuntu': + if (scenario == 'illink') { + Utilities.addGithubPRTriggerForBranch(job, branch, "${os} ${architecture} ${configuration} via ILLink", "(?i).*test\\W+${os}\\W+${architecture}\\W+${configuration}\\W+${scenario}.*") + break + } + // fall through case 'OSX10.12': // Triggers on the non-flow jobs aren't necessary here // Corefx testing uses non-flow jobs. @@ -1424,9 +1431,8 @@ def static calculateBuildCommands(def newJob, def scenario, def branch, def isPR buildOpts = 'compatjitcrossgen skiptests' } - def illinkArch = (architecture == 'x86compatjit') ? 'x86' : architecture if (scenario == 'illink') { - buildCommands += "tests\\scripts\\build_illink.cmd clone ${illinkArch}" + buildCommands += "tests\\scripts\\build_illink.cmd clone ${arch}" } if (Constants.jitStressModeScenarios.containsKey(scenario) || @@ -1547,7 +1553,7 @@ def static calculateBuildCommands(def newJob, def scenario, def branch, def isPR if (scenario == 'illink') { - illinkArguments = "link %WORKSPACE%\\linker\\linker\\bin\\netcore_Relase\\netcoreapp2.0\\win10-${illinkArch}\\publish\\illink.exe" + illinkArguments = "link %WORKSPACE%\\linker\\linker\\bin\\netcore_Release\\netcoreapp2.0\\win10-${arch}\\publish\\illink.exe" } runtestArguments = "${lowerConfiguration} ${arch} ${gcstressStr} ${crossgenStr} ${runcrossgentestsStr} ${runjitstressStr} ${runjitstressregsStr} ${runjitmioptsStr} ${runjitforcerelocsStr} ${runjitdisasmStr} ${gcTestArguments} ${illinkArguments} collectdumps" @@ -1696,6 +1702,11 @@ def static calculateBuildCommands(def newJob, def scenario, def branch, def isPR break } + if (scenario == 'illink') { + assert(os == 'Ubuntu') + buildCommands += "./tests/scripts/build_illink.sh --clone --arch=${arch}" + } + def standaloneGc = '' if (scenario == 'standalone_gc') { standaloneGc = 'buildstandalonegc' @@ -2054,7 +2065,7 @@ combinedScenarios.each { scenario -> } break case 'illink': - if (os != 'Windows_NT') { + if (os != 'Windows_NT' && (os != 'Ubuntu' || architecture != 'x64')) { return } if (architecture != 'x64' && architecture != 'x86' && architecture != 'x86compatjit') { @@ -2278,7 +2289,7 @@ combinedScenarios.each { scenario -> case 'formatting': return case 'illink': - if (os != 'Windows_NT') { + if (os != 'Windows_NT' && os != 'Ubuntu') { return } break @@ -2351,6 +2362,7 @@ combinedScenarios.each { scenario -> def runjitforcerelocsStr = '' def runjitdisasmStr = '' def gcstressStr = '' + def illinkStr = '' if (scenario == 'r2r' || scenario == 'pri1r2r' || @@ -2406,6 +2418,11 @@ combinedScenarios.each { scenario -> runjitdisasmStr = '--jitdisasm --crossgen' } + if (scenario == 'illink') + { + illinkStr = '--link=\$WORKSPACE/linker/linker/bin/netcore_Release/netcoreapp2.0/ubuntu-x64/publish/illink' + } + if (isLongGc(scenario)) { // Long GC tests behave very poorly when they are not // the only test running (many of them allocate until OOM). @@ -2574,7 +2591,7 @@ combinedScenarios.each { scenario -> --mscorlibDir=\"\${WORKSPACE}/bin/Product/${osGroup}.${architecture}.${configuration}\" \\ --coreFxBinDir=\"\${WORKSPACE}/bin/CoreFxBinDir\" \\ --limitedDumpGeneration \\ - ${testEnvOpt} ${serverGCString} ${gcstressStr} ${crossgenStr} ${runcrossgentestsStr} ${runjitstressStr} ${runjitstressregsStr} ${runjitmioptsStr} ${runjitforcerelocsStr} ${runjitdisasmStr} ${sequentialString} ${playlistString}""") + ${testEnvOpt} ${serverGCString} ${gcstressStr} ${crossgenStr} ${runcrossgentestsStr} ${runjitstressStr} ${runjitstressregsStr} ${runjitmioptsStr} ${runjitforcerelocsStr} ${runjitdisasmStr} ${illinkStr} ${sequentialString} ${playlistString}""") } } } diff --git a/src/coreclr/tests/scripts/build_illink.cmd b/src/coreclr/tests/scripts/build_illink.cmd index 16fe10c..67b7076 100644 --- a/src/coreclr/tests/scripts/build_illink.cmd +++ b/src/coreclr/tests/scripts/build_illink.cmd @@ -23,10 +23,11 @@ pushd linker\corebuild call restore.cmd -RuntimeIdentifier=%rid% set DoNotEmbedDescriptors=1 cd ..\linker -..\corebuild\Tools\dotnetcli\dotnet.exe publish -r %rid% -c netcore_Relase +..\corebuild\Tools\dotnetcli\dotnet.exe publish -r %rid% -c netcore_Release popd echo Built %cd%\linker\linker\bin\netcore_Release\netcoreapp2.0\%rid%\publish\illink.exe + :Done exit /b 0 diff --git a/src/coreclr/tests/scripts/build_illink.sh b/src/coreclr/tests/scripts/build_illink.sh index d80a82e..1bc7670 100755 --- a/src/coreclr/tests/scripts/build_illink.sh +++ b/src/coreclr/tests/scripts/build_illink.sh @@ -15,7 +15,7 @@ function print_usage { # Argument variables clone= setenv= -os='ubuntu.16.04' +os='ubuntu' arch='x64' for i in "$@" @@ -27,7 +27,6 @@ do ;; --clone) - echo "Need to clone" clone=1 ;; @@ -50,7 +49,6 @@ done rid="$os-$arch" if [ ! -z "$clone" ]; then - echo "Of Course Not here" git clone --recursive https://github.com/mono/linker fi -- 2.7.4