// Create a folder for JIT stress jobs
folder('jitstress')
+// Create a folder for testing via illink
+folder('illink')
+
def static getOSGroup(def os) {
def osGroupMap = ['Ubuntu':'Linux',
'RHEL7.2': 'Linux',
'coverage',
'formatting',
'gcsimulator',
- 'jitdiff',
- 'standalone_gc'] + r2rJitStressScenarios
+ 'jitdiff',
+ 'standalone_gc',
+ 'illink'] + r2rJitStressScenarios
def static configurationList = ['Debug', 'Checked', 'Release']
// Non-test jobs use the default timeout value.
}
+def static getJobFolder(def scenario) {
+ if (isJITStressJob(scenario)) {
+ return 'jitstress'
+ }
+ if (scenario == 'illink') {
+ return 'illink'
+ }
+ return ''
+}
+
def static getStressModeDisplayName(def scenario) {
def displayStr = ''
Constants.jitStressModeScenarios[scenario].each{ k, v ->
// we don't care about the configuration for the formatting job. It runs all configs
baseName = architecture.toLowerCase() + '_' + os.toLowerCase()
}
+ else if (scenario == 'illink') {
+ // Identify that the job ran post-illink
+ baseName = architecture.toLowerCase() + '_' + configuration.toLowerCase() + '_' + os.toLowerCase() + '_illink'
+ }
else {
baseName = architecture.toLowerCase() + '_' + configuration.toLowerCase() + '_' + os.toLowerCase()
}
}
}
break
+
+ case 'illink':
+ // Testing on other operating systems TBD
+ assert (os == 'Windows_NT')
+ assert (architecture == 'x64' || architecture == 'x86' || architecture == 'x86compatjit')
+ Utilities.addPeriodicTrigger(job, '@daily')
+ break
+
default:
println("Unknown scenario: ${scenario}");
assert false
Utilities.addGithubPRTriggerForBranch(job, branch, "${os} ${architecture} ${configuration} Build and Test (Jit - ${displayName})",
"(?i).*test\\W+${os}\\W+${architecture}\\W+${scenario}.*")
break
+ case 'illink':
+ Utilities.addGithubPRTriggerForBranch(job, branch, "${os} ${architecture} ${configuration} via ILLink", "(?i).*test\\W+illink\\W+${os}\\W+${configuration}\\W+${scenario}.*")
+ break
default:
println("Unknown scenario: ${scenario}");
assert false
Utilities.addGithubPRTriggerForBranch(job, branch, "${os} ${architecture} ${configuration} Build and Test (Jit - ${displayName})",
"(?i).*test\\W+${os}\\W+${architecture}\\W+${scenario}.*")
break
+ case 'illink':
+ Utilities.addGithubPRTriggerForBranch(job, branch, "${os} ${architecture} ${configuration} via ILLink", "(?i).*test\\W+illink\\W+${os}\\W+${configuration}\\W+${scenario}.*")
+ break
default:
println("Unknown scenario: ${os} ${architecture} ${scenario}");
assert false
Utilities.addGithubPRTriggerForBranch(job, branch, "${os} ${arch} ${jit} ${configuration} Build and Test (Jit - ${displayName})",
"(?i).*test\\W+${os}\\W+${arch}\\W+${jit}\\W+${configuration}\\W+${scenario}.*")
break
+ case 'illink':
+ Utilities.addGithubPRTriggerForBranch(job, branch, "${os} ${architecture} ${configuration} via ILLink", "(?i).*test\\W+illink\\W+${os}\\W+${configuration}\\W+${scenario}.*")
+ break
default:
println("Unknown scenario: ${os} ${arch} ${jit} ${scenario}");
assert false
buildOpts = 'compatjitcrossgen skiptests'
}
+ // build_illink.cmd performs the following tasks:
+ // - Clone and build illink for netcoreapp2.0
+ // - sets ILLINK=<path to illink.exe> in the environment.
+ if (scenario == 'illink') {
+ def illinkArgs = (architecture == 'x86compatjit') ? 'x86' : architecture
+ buildCommands += "tests\\build_illink.cmd clone setenv ${illinkArgs}"
+ }
+
if (Constants.jitStressModeScenarios.containsKey(scenario) ||
scenario == 'default' ||
scenario == 'r2r' ||
scenario == 'jitdiff' ||
+ scenario == 'illink' ||
Constants.r2rJitStressScenarios.indexOf(scenario) != -1) {
buildOpts += enableCorefxTesting ? ' skiptests' : ''
buildCommands += "set __TestIntermediateDir=int&&build.cmd ${lowerConfiguration} ${arch} ${buildOpts}"
def gcstressStr = ''
def runtestArguments = ''
def gcTestArguments = ''
+ def illinkArguments = ''
if (scenario == 'r2r' ||
scenario == 'pri1r2r' ||
gcTestArguments = "${scenario} sequential"
}
- runtestArguments = "${lowerConfiguration} ${arch} ${gcstressStr} ${crossgenStr} ${runcrossgentestsStr} ${runjitstressStr} ${runjitstressregsStr} ${runjitmioptsStr} ${runjitforcerelocsStr} ${runjitdisasmStr} ${gcTestArguments} collectdumps"
+ if (scenario == 'illink')
+ {
+ illinkArguments = 'link %ILLINK%'
+ }
+
+ runtestArguments = "${lowerConfiguration} ${arch} ${gcstressStr} ${crossgenStr} ${runcrossgentestsStr} ${runjitstressStr} ${runjitstressregsStr} ${runjitmioptsStr} ${runjitforcerelocsStr} ${runjitdisasmStr} ${gcTestArguments} ${illinkArguments} collectdumps"
if (Constants.jitStressModeScenarios.containsKey(scenario)) {
def stepScriptLocation = "%WORKSPACE%\\SetStressModes.bat"
return
}
break
+ case 'illink':
+ if (os != 'Windows_NT') {
+ return
+ }
+ if (architecture != 'x64' && architecture != 'x86' && architecture != 'x86compatjit') {
+ return
+ }
+ if (isBuildOnly) {
+ return
+ }
+ break
case 'default':
// Nothing skipped
break
// Calculate names
def lowerConfiguration = configuration.toLowerCase()
def jobName = getJobName(configuration, architecture, os, scenario, isBuildOnly, isLinuxEmulatorBuild)
- def folderName = isJITStressJob(scenario) ? 'jitstress' : '';
+ def folderName = getJobFolder(scenario)
// Create the new job
def newJob = job(Utilities.getFullJobName(project, jobName, isPR, folderName)) {}
}
case 'formatting':
return
+ case 'illink':
+ if (os != 'Windows_NT') {
+ return
+ }
+ break
case 'default':
// Nothing skipped
break
}
}
- def folder = isJITStressJob(scenario) ? 'jitstress' : ''
+ def folder = getJobFolder(scenario)
def newJob = job(Utilities.getFullJobName(project, jobName, isPR, folder)) {
// Add parameters for the inputs
--- /dev/null
+if not defined _echo @echo off
+setlocal
+set rid=win10-x64
+
+:Arg_Loop
+if "%1" == "" goto ArgsDone
+if /i "%1" == "-?" goto Usage
+if /i "%1" == "-h" goto Usage
+if /i "%1" == "-help" goto Usage
+if /i "%1" == "clone" (set doClone=1&shift&goto Arg_Loop)
+if /i "%1" == "setenv" (set setEnv=1&shift&goto Arg_Loop)
+if /i "%1" == "x64" (set rid=win10-x64&shift&goto Arg_Loop)
+if /i "%1" == "x86" (set rid=win10-x86&shift&goto Arg_Loop)
+
+goto Usage
+
+:ArgsDone
+
+if defined doCLone (
+ git clone --recursive https://github.com/mono/linker
+)
+
+pushd linker\corebuild
+call restore.cmd -RuntimeIdentifier=%rid%
+set DoNotEmbedDescriptors=1
+cd ..\linker
+..\corebuild\Tools\dotnetcli\dotnet.exe publish -r %rid% -c netcore_Relase
+popd
+
+if not defined setEnv goto Done
+echo set ILLINK=%cd%\linker\linker\bin\netcore_Relase\netcoreapp2.0\%rid%\publish\illink.exe
+endlocal && set ILLINK=%cd%\linker\linker\bin\netcore_Relase\netcoreapp2.0\%rid%\publish\illink.exe
+
+:Done
+exit /b 0
+
+:Usage
+echo.
+echo.Build the ILLINK for CoreCLR testing
+echo.
+echo.Usage:
+echo build_illink.cmd [clone] [setenv] runtime-ID
+echo.Where:
+echo.-? -h -help: view this message.
+echo.clone: Clone the repository https://github.com/mono/linker
+echo.set: set ILLINK to the path to illink.exe
+echo.runtime-ID: The os-architecture configuration to build: x64 (default) or x86
+goto Done