1 // Import the utility functionality.
3 import jobs.generation.*
5 // The input project name (e.g. dotnet/coreclr)
6 def project = GithubProject
7 // The input branch name (e.g. master)
8 def branch = GithubBranchName
9 def projectFolder = Utilities.getFolderName(project) + '/' + Utilities.getFolderName(branch)
11 // Create a folder for JIT stress jobs
14 def static getOSGroup(def os) {
15 def osGroupMap = ['Ubuntu':'Linux',
17 'Ubuntu16.04': 'Linux',
21 'Windows_NT':'Windows_NT',
24 'OpenSUSE13.2': 'Linux',
25 'LinuxARMEmulator': 'Linux']
26 def osGroup = osGroupMap.get(os, null)
27 assert osGroup != null : "Could not find os group for ${os}"
31 // We use this class (vs variables) so that the static functions can access data here.
33 // Innerloop build OS's
34 // The Windows_NT_BuildOnly OS is a way to speed up the Non-NT builds temporarily by avoiding
35 // test execution in the build flow runs. It generates the exact same build
36 // as Windows_NT but without the tests.
37 def static osList = ['Ubuntu', 'Debian8.4', 'OSX', 'Windows_NT', 'Windows_NT_BuildOnly', 'FreeBSD', 'CentOS7.1', 'OpenSUSE13.2', 'RHEL7.2', 'LinuxARMEmulator', 'Ubuntu16.04', 'Fedora23']
38 def static crossList = ['Ubuntu', 'OSX', 'CentOS7.1', 'RHEL7.2', 'Debian8.4', 'OpenSUSE13.2']
39 // This is a set of JIT stress modes combined with the set of variables that
40 // need to be set to actually enable that stress mode. The key of the map is the stress mode and
41 // the values are the environment variables
42 def static jitStressModeScenarios = ['minopts' : ['COMPlus_JITMinOpts' : '1'], 'forcerelocs' : ['COMPlus_ForceRelocs' : '1'],
43 'jitstress1' : ['COMPlus_JitStress' : '1'], 'jitstress2' : ['COMPlus_JitStress' : '2'],
44 'jitstressregs1' : ['COMPlus_JitStressRegs' : '1'], 'jitstressregs2' : ['COMPlus_JitStressRegs' : '2'],
45 'jitstressregs3' : ['COMPlus_JitStressRegs' : '3'], 'jitstressregs4' : ['COMPlus_JitStressRegs' : '4'],
46 'jitstressregs8' : ['COMPlus_JitStressRegs' : '8'], 'jitstressregs0x10' : ['COMPlus_JitStressRegs' : '0x10'],
47 'jitstressregs0x80' : ['COMPlus_JitStressRegs' : '0x80'],
48 'jitstress2_jitstressregs1' : ['COMPlus_JitStress' : '2', 'COMPlus_JitStressRegs' : '1'],
49 'jitstress2_jitstressregs2' : ['COMPlus_JitStress' : '2', 'COMPlus_JitStressRegs' : '2'],
50 'jitstress2_jitstressregs3' : ['COMPlus_JitStress' : '2', 'COMPlus_JitStressRegs' : '3'],
51 'jitstress2_jitstressregs4' : ['COMPlus_JitStress' : '2', 'COMPlus_JitStressRegs' : '4'],
52 'jitstress2_jitstressregs8' : ['COMPlus_JitStress' : '2', 'COMPlus_JitStressRegs' : '8'],
53 'jitstress2_jitstressregs0x10' : ['COMPlus_JitStress' : '2', 'COMPlus_JitStressRegs' : '0x10'],
54 'jitstress2_jitstressregs0x80' : ['COMPlus_JitStress' : '2', 'COMPlus_JitStressRegs' : '0x80'],
55 'corefx_baseline' : [ : ], // corefx baseline
56 'corefx_minopts' : ['COMPlus_JITMinOpts' : '1'],
57 'corefx_jitstress1' : ['COMPlus_JitStress' : '1'],
58 'corefx_jitstress2' : ['COMPlus_JitStress' : '2'],
59 'corefx_jitstressregs1' : ['COMPlus_JitStressRegs' : '1'], 'corefx_jitstressregs2' : ['COMPlus_JitStressRegs' : '2'],
60 'corefx_jitstressregs3' : ['COMPlus_JitStressRegs' : '3'], 'corefx_jitstressregs4' : ['COMPlus_JitStressRegs' : '4'],
61 'corefx_jitstressregs8' : ['COMPlus_JitStressRegs' : '8'], 'corefx_jitstressregs0x10' : ['COMPlus_JitStressRegs' : '0x10'],
62 'corefx_jitstressregs0x80' : ['COMPlus_JitStressRegs' : '0x80'],
63 'gcstress0x3' : ['COMPlus_GCStress' : '0x3'], 'gcstress0xc' : ['COMPlus_GCStress' : '0xC'],
64 'zapdisable' : ['COMPlus_ZapDisable' : '0xC'],
65 'heapverify1' : ['COMPlus_HeapVerify' : '1'],
66 'gcstress0xc_zapdisable' : ['COMPlus_GCStress' : '0xC', 'COMPlus_ZapDisable' : '1'],
67 'gcstress0xc_zapdisable_jitstress2' : ['COMPlus_GCStress' : '0xC', 'COMPlus_ZapDisable' : '1', 'COMPlus_JitStress' : '2'],
68 'gcstress0xc_zapdisable_heapverify1' : ['COMPlus_GCStress' : '0xC', 'COMPlus_ZapDisable' : '1', 'COMPlus_HeapVerify' : '1'],
69 'gcstress0xc_jitstress1' : ['COMPlus_GCStress' : '0xC', 'COMPlus_JitStress' : '1'],
70 'gcstress0xc_jitstress2' : ['COMPlus_GCStress' : '0xC', 'COMPlus_JitStress' : '2'],
71 'gcstress0xc_minopts_heapverify1' : ['COMPlus_GCStress' : '0xC', 'COMPlus_JITMinOpts' : '1', 'COMPlus_HeapVerify' : '1']
73 // This is a set of r2r jit stress scenarios
74 def static r2rJitStressScenarios = ['r2r_jitstress1', 'r2r_jitstress2', 'r2r_jitstressregs1', 'r2r_jitstressregs2', 'r2r_jitstressregs3',
75 'r2r_jitstressregs4', 'r2r_jitstressregs8', 'r2r_jitstressregsx10', 'r2r_jitstressregsx80',
76 'r2r_jitminopts', 'r2r_jitforcerelocs']
77 // This is the basic set of scenarios
78 def static basicScenarios = ['default', 'pri1', 'ilrt', 'r2r', 'pri1r2r', 'gcstress15_pri1r2r', 'longgc', 'coverage', 'gcsimulator'] + r2rJitStressScenarios
79 def static configurationList = ['Debug', 'Checked', 'Release']
80 // This is the set of architectures
81 def static architectureList = ['arm', 'arm64', 'x64', 'x86ryujit', 'x86lb']
84 def static setMachineAffinity(def job, def os, def architecture) {
85 if (architecture == 'arm64' && os == 'Windows_NT') {
86 // For cross compilation
90 } else if ((architecture == 'arm' || architecture == 'arm64') && os == 'Ubuntu') {
91 Utilities.setMachineAffinity(job, os, 'arm-cross-latest');
93 Utilities.setMachineAffinity(job, os, 'latest-or-auto');
97 def static isJITStressJob(def scenario) {
98 return Constants.jitStressModeScenarios.containsKey(scenario) ||
99 (Constants.r2rJitStressScenarios.indexOf(scenario) != -1)
102 def static isGCStressRelatedTesting(def scenario) {
103 // The 'gcstress15_pri1r2r' scenario is a basic scenario.
104 // Detect it and make it a GCStress related.
105 if (scenario == 'gcstress15_pri1r2r')
110 def gcStressTestEnvVars = [ 'COMPlus_GCStress', 'COMPlus_ZapDisable', 'COMPlus_HeapVerify']
111 def scenarioName = scenario.toLowerCase()
112 def isGCStressTesting = false
113 Constants.jitStressModeScenarios[scenario].each{ k, v ->
114 if (k in gcStressTestEnvVars) {
115 isGCStressTesting = true;
118 return isGCStressTesting
121 def static isCorefxTesting(def scenario) {
122 def corefx_prefix = 'corefx_'
123 if (scenario.length() < corefx_prefix.length()) {
126 return scenario.substring(0,corefx_prefix.length()) == corefx_prefix
129 def static isR2R(def scenario) {
130 return (scenario == 'r2r' || scenario == 'pri1r2r')
133 def static isCoverage(def scenario) {
134 return (scenario == 'coverage')
137 def static isLongGc(def scenario) {
138 return (scenario == 'longgc' || scenario == 'gcsimulator')
141 def static setTestJobTimeOut(newJob, scenario) {
142 if (isGCStressRelatedTesting(scenario)) {
143 Utilities.setJobTimeout(newJob, 4320)
145 else if (isCorefxTesting(scenario)) {
146 Utilities.setJobTimeout(newJob, 360)
148 else if (Constants.jitStressModeScenarios.containsKey(scenario)) {
149 Utilities.setJobTimeout(newJob, 240)
151 else if (isR2R(scenario)) {
152 Utilities.setJobTimeout(newJob, 240)
154 else if (isCoverage(scenario)) {
155 Utilities.setJobTimeout(newJob, 1440)
157 else if (isLongGc(scenario)) {
158 Utilities.setJobTimeout(newJob, 1440)
160 // Non-test jobs use the default timeout value.
163 def static getStressModeDisplayName(def scenario) {
165 Constants.jitStressModeScenarios[scenario].each{ k, v ->
166 def prefixLength = 'COMPlus_'.length()
167 if (k.length() >= prefixLength) {
168 def modeName = k.substring(prefixLength, k.length())
169 displayStr += ' ' + modeName + '=' + v
175 // Generates the string for creating a file that sets environment variables
176 // that makes it possible to run stress modes. Writes the script to a file called
177 // SetStressModes.[sh/cmd]
178 def static genStressModeScriptStep(def os, def stressModeName, def stressModeVars, def stepScriptLocation) {
180 if (os == 'Windows_NT') {
181 stepScript += "echo Creating TestEnv Script for ${stressModeName}\r\n"
182 stepScript += "del ${stepScriptLocation}\r\n"
184 // Timeout in ms, default is 10 minutes. For stress
185 // modes up this to 30 minutes
186 def timeout = 1800000
189 stepScript += "set __TestTimeout=${timeout}\r\n"
190 stressModeVars.each{ k, v ->
191 // Write out what we are writing to the script file
192 stepScript += "echo Setting ${k}=${v}\r\n"
193 // Write out the set itself to the script file`
194 stepScript += "echo set ${k}=${v} >> ${stepScriptLocation}\r\n"
198 stepScript += "echo Setting variables for ${stressModeName}\n"
199 stepScript += "echo \\#\\!/usr/bin/env bash > ${stepScriptLocation}\n"
200 stressModeVars.each{ k, v ->
201 // Write out what we are writing to the script file
202 stepScript += "echo Setting ${k}=${v}\n"
203 // Write out the set itself to the script file`
204 stepScript += "echo export ${k}=${v} >> ${stepScriptLocation}\n"
206 stepScript += "chmod +x ${stepScriptLocation}\n"
211 // Corefx doesn't have a support to pass stress mode environment variables. This function
212 // generates commands to set or export environment variables
213 def static getStressModeEnvSetCmd(def os, def stressModeName) {
214 def envVars = Constants.jitStressModeScenarios[stressModeName]
216 if (os == 'Windows_NT') {
217 envVars.each{ VarName, Value ->
219 setEnvVars += "set ${VarName}=${Value}\n"
224 envVars.each{ VarName, Value ->
226 setEnvVars += "export ${VarName}=${Value}\n"
233 // Calculates the name of the build job based on some typical parameters.
235 def static getJobName(def configuration, def architecture, def os, def scenario, def isBuildOnly, def isLinuxEmulatorBuild = false) {
236 // If the architecture is x64, do not add that info into the build name.
237 // Need to change around some systems and other builds to pick up the right builds
240 def suffix = scenario != 'default' ? "_${scenario}" : '';
245 switch (architecture) {
247 if (scenario == 'default') {
248 // For now we leave x64 off of the name for compatibility with other jobs
249 baseName = configuration.toLowerCase() + '_' + os.toLowerCase()
252 baseName = architecture.toLowerCase() + '_' + configuration.toLowerCase() + '_' + os.toLowerCase()
257 // These are cross builds
258 if (isLinuxEmulatorBuild == false) {
259 baseName = architecture.toLowerCase() + '_cross_' + configuration.toLowerCase() + '_' + os.toLowerCase()
262 baseName = architecture.toLowerCase() + '_emulator_cross_' + configuration.toLowerCase() + '_' + os.toLowerCase()
266 baseName = 'x86_ryujit_' + configuration.toLowerCase() + '_' + os.toLowerCase()
269 baseName = 'x86_lb_' + configuration.toLowerCase() + '_' + os.toLowerCase()
272 println("Unknown architecture: ${architecture}");
277 return baseName + suffix
280 static void addEmailPublisher(def job, def recipient) {
283 extendedEmail(recipient, '$DEFAULT_SUBJECT', '$DEFAULT_CONTENT') {
284 trigger('Aborted', '$PROJECT_DEFAULT_SUBJECT', '$PROJECT_DEFAULT_CONTENT', null, true, true, true, true)
285 trigger('Failure', '$PROJECT_DEFAULT_SUBJECT', '$PROJECT_DEFAULT_CONTENT', null, true, true, true, true)
291 // **************************
292 // Define the basic inner loop builds for PR and commit. This is basically just the set
293 // of coreclr builds over linux/osx/freebsd/windows and debug/release/checked. In addition, the windows
294 // builds will do a couple extra steps.
295 // **************************
297 // Adds a trigger for the PR build if one is needed. If isFlowJob is true, then this is the
298 // flow job that rolls up the build and test for non-windows OS's. // If the job is a windows build only job,
299 // it's just used for internal builds
300 // If you add a job with a trigger phrase, please add that phrase to coreclr/Documentation/project-docs/ci-trigger-phrases.md
301 def static addTriggers(def job, def branch, def isPR, def architecture, def os, def configuration, def scenario, def isFlowJob, def isWindowsBuildOnlyJob, def isLinuxEmulatorBuild) {
302 if (isWindowsBuildOnlyJob) {
306 def bidailyCrossList = ['RHEL7.2', 'Debian8.4', 'OpenSUSE13.2']
307 // Non pull request builds.
312 switch (architecture) {
316 if (isFlowJob || os == 'Windows_NT' || !(os in Constants.crossList)) {
317 Utilities.addGithubPushTrigger(job)
321 Utilities.addGithubPushTrigger(job)
324 if (os == 'Windows_NT') {
325 Utilities.addGithubPushTrigger(job)
326 addEmailPublisher(job, 'dotnetonarm64@microsoft.com')
330 println("Unknown architecture: ${architecture}");
336 // Pri one gets a push trigger, and only for release
337 if (architecture == 'x64') {
338 if (configuration == 'Release') {
339 // We expect release jobs to be Windows, or in the cross list
340 assert (os == 'Windows_NT') || (os in Constants.crossList)
341 if (!os in bidailyCrossList) {
342 if (isFlowJob || os == 'Windows_NT') {
343 Utilities.addGithubPushTrigger(job)
348 Utilities.addPeriodicTrigger(job, 'H H/12 * * *')
355 //r2r jobs that aren't pri1 can only be triggered by phrase
358 assert !(os in bidailyCrossList)
359 //pri1 r2r gets a push trigger for checked/release
360 if (configuration == 'Checked' || configuration == 'Release') {
361 assert (os == 'Windows_NT') || (os in Constants.crossList)
362 if (architecture == 'x64' && os != 'OSX') {
363 //Flow jobs should be Windows, Ubuntu, OSX, or CentOS
364 if (isFlowJob || os == 'Windows_NT') {
365 Utilities.addGithubPushTrigger(job)
367 // OSX pri1r2r jobs should only run every 12 hours, not daily.
368 } else if (architecture == 'x64' && os == 'OSX'){
370 Utilities.addPeriodicTrigger(job, 'H H/12 * * *')
373 // For x86, only add per-commit jobs for Windows
374 else if (architecture == 'x86ryujit' || architecture == 'x86lb') {
375 if (os == 'Windows_NT') {
376 Utilities.addGithubPushTrigger(job)
379 // arm64 pri1r2r jobs should only run every 12 hours.
380 else if (architecture == 'arm64') {
381 if (os == 'Windows_NT') {
382 Utilities.addPeriodicTrigger(job, 'H H/12 * * *')
383 addEmailPublisher(job, 'dotnetonarm64@microsoft.com')
388 case 'r2r_jitstress1':
389 case 'r2r_jitstress2':
390 case 'r2r_jitstressregs1':
391 case 'r2r_jitstressregs2':
392 case 'r2r_jitstressregs3':
393 case 'r2r_jitstressregs4':
394 case 'r2r_jitstressregs8':
395 case 'r2r_jitstressregsx10':
396 case 'r2r_jitstressregsx80':
397 case 'r2r_jitminopts':
398 case 'r2r_jitforcerelocs':
399 case 'gcstress15_pri1r2r':
400 assert !(os in bidailyCrossList)
402 // GCStress=C is currently not supported on OS X
403 if (os == 'OSX' && isGCStressRelatedTesting(scenario)) {
407 //GC Stress 15 pri1 r2r gets a push trigger for checked/release
408 if (configuration == 'Checked' || configuration == 'Release') {
409 assert (os == 'Windows_NT') || (os in Constants.crossList)
410 if (architecture == 'x64') {
411 //Flow jobs should be Windows, Ubuntu, OSX, or CentOS
412 if (isFlowJob || os == 'Windows_NT') {
413 // Add a weekly periodic trigger
414 Utilities.addPeriodicTrigger(job, 'H H * * 3,6') // some time every Wednesday and Saturday
417 // For x86, only add per-commit jobs for Windows
418 else if (architecture == 'x86ryujit' || architecture == 'x86lb') {
419 if (os == 'Windows_NT') {
420 Utilities.addPeriodicTrigger(job, 'H H * * 3,6') // some time every Wednesday and Saturday
426 assert (os == 'Ubuntu' || os == 'Windows_NT' || os == 'OSX')
427 assert configuration == 'Release'
428 assert architecture == 'x64'
429 Utilities.addPeriodicTrigger(job, '@daily')
430 addEmailPublisher(job, 'dotnetgctests@microsoft.com')
433 assert (os == 'Ubuntu' || os == 'Windows_NT' || os == 'OSX')
434 assert configuration == 'Release'
435 assert architecture == 'x64'
436 Utilities.addPeriodicTrigger(job, 'H H * * 3,6') // some time every Wednesday and Saturday
437 addEmailPublisher(job, 'dotnetgctests@microsoft.com')
440 assert !(os in bidailyCrossList)
441 // ILASM/ILDASM roundtrip one gets a daily build, and only for release
442 if (architecture == 'x64' && configuration == 'Release') {
443 // We don't expect to see a job generated except in these scenarios
444 assert (os == 'Windows_NT') || (os in Constants.crossList)
445 if (isFlowJob || os == 'Windows_NT') {
446 Utilities.addPeriodicTrigger(job, '@daily')
451 assert (os == 'Ubuntu' || os == 'Windows_NT')
452 assert configuration == 'Release'
453 assert architecture == 'x64'
454 Utilities.addPeriodicTrigger(job, '@weekly')
456 case 'jitstressregs1':
457 case 'jitstressregs2':
458 case 'jitstressregs3':
459 case 'jitstressregs4':
460 case 'jitstressregs8':
461 case 'jitstressregs0x10':
462 case 'jitstressregs0x80':
467 case 'jitstress2_jitstressregs1':
468 case 'jitstress2_jitstressregs2':
469 case 'jitstress2_jitstressregs3':
470 case 'jitstress2_jitstressregs4':
471 case 'jitstress2_jitstressregs8':
472 case 'jitstress2_jitstressregs0x10':
473 case 'jitstress2_jitstressregs0x80':
474 case 'corefx_baseline':
475 case 'corefx_minopts':
476 case 'corefx_jitstress1':
477 case 'corefx_jitstress2':
478 case 'corefx_jitstressregs1':
479 case 'corefx_jitstressregs2':
480 case 'corefx_jitstressregs3':
481 case 'corefx_jitstressregs4':
482 case 'corefx_jitstressregs8':
483 case 'corefx_jitstressregs0x10':
484 case 'corefx_jitstressregs0x80':
486 if (os != 'CentOS7.1' && !(os in bidailyCrossList)) {
487 assert (os == 'Windows_NT') || (os in Constants.crossList)
488 Utilities.addPeriodicTrigger(job, '@daily')
493 if (os != 'CentOS7.1' && !(os in bidailyCrossList)) {
494 assert (os == 'Windows_NT') || (os in Constants.crossList)
495 if (architecture == 'arm64') {
496 assert (os == 'Windows_NT')
497 Utilities.addPeriodicTrigger(job, '@daily')
498 addEmailPublisher(job, 'dotnetonarm64@microsoft.com')
501 Utilities.addPeriodicTrigger(job, '@weekly')
506 case 'gcstress0xc_zapdisable':
507 case 'gcstress0xc_zapdisable_jitstress2':
508 case 'gcstress0xc_zapdisable_heapverify1':
509 case 'gcstress0xc_jitstress1':
510 case 'gcstress0xc_jitstress2':
511 case 'gcstress0xc_minopts_heapverify1':
512 // GCStress=C is currently not supported on OS X
513 if (os != 'CentOS7.1' && os != 'OSX' && !(os in bidailyCrossList)) {
514 assert (os == 'Windows_NT') || (os in Constants.crossList)
515 if (architecture == 'arm64') {
516 assert (os == 'Windows_NT')
517 // TODO: Enable a periodic trigger after tests are updated.
518 // Utilities.addPeriodicTrigger(job, '@daily')
519 // addEmailPublisher(job, 'dotnetonarm64@microsoft.com')
522 Utilities.addPeriodicTrigger(job, '@weekly')
527 println("Unknown scenario: ${scenario}");
533 // Pull request builds. Generally these fall into two categories: default triggers and on-demand triggers
534 // We generally only have a distinct set of default triggers but a bunch of on-demand ones.
535 def osGroup = getOSGroup(os)
536 switch (architecture) {
538 if (scenario == 'coverage') {
539 assert configuration == 'Release'
540 if (os == 'Ubuntu') {
541 Utilities.addGithubPRTriggerForBranch(job, branch, "${os} ${architecture} ${configuration} Coverage Build & Test", "(?i).*test\\W+coverage.*")
546 // OpenSUSE, Debian & RedHat get trigger phrases for pri 0 build, and pri 1 build & test
550 if (scenario == 'default') {
552 Utilities.addGithubPRTriggerForBranch(job, branch, "${os} ${architecture} ${configuration} Build", "(?i).*test\\W+${os}.*")
554 else if (scenario == 'pri1' && isFlowJob) {
555 assert (configuration == 'Release')
556 Utilities.addGithubPRTriggerForBranch(job, branch, "${os} ${architecture} ${configuration} Pri 1 Build & Test", "(?i).*test\\W+${os}\\W+${scenario}.*")
562 assert scenario == 'default'
563 Utilities.addGithubPRTriggerForBranch(job, branch, "${os} ${architecture} ${configuration} Build", "(?i).*test\\W+${os}\\W+.*")
567 // Triggers on the non-flow jobs aren't necessary here
568 // Corefx testing uses non-flow jobs.
569 if (!isFlowJob && !isCorefxTesting(scenario)) {
574 // Ubuntu uses checked for default PR tests
575 if (configuration == 'Checked') {
577 Utilities.addGithubPRTriggerForBranch(job, branch, "${os} ${architecture} ${configuration} Build and Test")
581 if (configuration == 'Release') {
582 Utilities.addGithubPRTriggerForBranch(job, branch, "${os} ${architecture} ${configuration} Priority 1 Build and Test", "(?i).*test\\W+${os}\\W+${scenario}.*")
586 if (configuration == 'Release') {
587 Utilities.addGithubPRTriggerForBranch(job, branch, "${os} ${architecture} ${configuration} IL RoundTrip Build and Test", "(?i).*test\\W+${os}\\W+${scenario}.*")
591 if (configuration == 'Release' || configuration == 'Checked') {
592 Utilities.addGithubPRTriggerForBranch(job, branch, "${os} ${architecture} ${configuration} R2R pri0 Build & Test", "(?i).*test\\W+${os}\\W+${configuration}\\W+${scenario}.*")
596 if (configuration == 'Release' || configuration == 'Checked') {
597 Utilities.addGithubPRTriggerForBranch(job, branch, "${os} ${architecture} ${configuration} R2R pri1 Build & Test", "(?i).*test\\W+${os}\\W+${configuration}\\W+${scenario}.*")
600 case 'gcstress15_pri1r2r':
601 if (configuration == 'Release' || configuration == 'Checked') {
602 Utilities.addGithubPRTriggerForBranch(job, branch, "${os} ${architecture} ${configuration} GCStress 15 R2R pri1 Build & Test", "(?i).*test\\W+${os}\\W+${configuration}\\W+${scenario}.*")
605 case 'r2r_jitstress1':
606 if (configuration == 'Release' || configuration == 'Checked') {
607 Utilities.addGithubPRTriggerForBranch(job, branch, "${os} ${architecture} ${configuration} jitstress1 R2R Build & Test", "(?i).*test\\W+${os}\\W+${configuration}\\W+${scenario}.*")
610 case 'r2r_jitstress2':
611 if (configuration == 'Release' || configuration == 'Checked') {
612 Utilities.addGithubPRTriggerForBranch(job, branch, "${os} ${architecture} ${configuration} jitstress2 R2R Build & Test", "(?i).*test\\W+${os}\\W+${configuration}\\W+${scenario}.*")
615 case 'r2r_jitstressregs1':
616 if (configuration == 'Release' || configuration == 'Checked') {
617 Utilities.addGithubPRTriggerForBranch(job, branch, "${os} ${architecture} ${configuration} jitstressregs1 R2R Build & Test", "(?i).*test\\W+${os}\\W+${configuration}\\W+${scenario}.*")
620 case 'r2r_jitstressregs2':
621 if (configuration == 'Release' || configuration == 'Checked') {
622 Utilities.addGithubPRTriggerForBranch(job, branch, "${os} ${architecture} ${configuration} jitstressregs2 R2R Build & Test", "(?i).*test\\W+${os}\\W+${configuration}\\W+${scenario}.*")
625 case 'r2r_jitstressregs3':
626 if (configuration == 'Release' || configuration == 'Checked') {
627 Utilities.addGithubPRTriggerForBranch(job, branch, "${os} ${architecture} ${configuration} jitstressregs3 R2R Build & Test", "(?i).*test\\W+${os}\\W+${configuration}\\W+${scenario}.*")
630 case 'r2r_jitstressregs4':
631 if (configuration == 'Release' || configuration == 'Checked') {
632 Utilities.addGithubPRTriggerForBranch(job, branch, "${os} ${architecture} ${configuration} jitstressregs4 R2R Build & Test", "(?i).*test\\W+${os}\\W+${configuration}\\W+${scenario}.*")
635 case 'r2r_jitstressregs8':
636 if (configuration == 'Release' || configuration == 'Checked') {
637 Utilities.addGithubPRTriggerForBranch(job, branch, "${os} ${architecture} ${configuration} jitstressregs8 R2R Build & Test", "(?i).*test\\W+${os}\\W+${configuration}\\W+${scenario}.*")
640 case 'r2r_jitstressregsx10':
641 if (configuration == 'Release' || configuration == 'Checked') {
642 Utilities.addGithubPRTriggerForBranch(job, branch, "${os} ${architecture} ${configuration} jitstressregsx10 R2R Build & Test", "(?i).*test\\W+${os}\\W+${configuration}\\W+${scenario}.*")
645 case 'r2r_jitstressregsx80':
646 if (configuration == 'Release' || configuration == 'Checked') {
647 Utilities.addGithubPRTriggerForBranch(job, branch, "${os} ${architecture} ${configuration} jitstressregsx80 R2R Build & Test", "(?i).*test\\W+${os}\\W+${configuration}\\W+${scenario}.*")
650 case 'r2r_jitminopts':
651 if (configuration == 'Release' || configuration == 'Checked') {
652 Utilities.addGithubPRTriggerForBranch(job, branch, "${os} ${architecture} ${configuration} JITMinOpts R2R Build & Test", "(?i).*test\\W+${os}\\W+${configuration}\\W+${scenario}.*")
655 case 'r2r_jitforcerelocs':
656 if (configuration == 'Release' || configuration == 'Checked') {
657 Utilities.addGithubPRTriggerForBranch(job, branch, "${os} ${architecture} ${configuration} ForceRelocs R2R Build & Test", "(?i).*test\\W+${os}\\W+${configuration}\\W+${scenario}.*")
661 if (configuration == 'Release') {
662 Utilities.addGithubPRTriggerForBranch(job, branch, "${os} ${architecture} ${configuration} Long-Running GC Build & Test", "(?i).*test\\W+${os}\\W+${configuration}\\W+${scenario}.*")
666 if (configuration == 'Release') {
667 Utilities.addGithubPRTriggerForBranch(job, branch, "${os} ${architecture} ${configuration} GC Simulator", "(?i).*test\\W+${os}\\W+${configuration}\\W+${scenario}.*")
671 assert (os == 'Windows_NT') || (os in Constants.crossList)
672 Utilities.addGithubPRTriggerForBranch(job, branch, "${os} ${architecture} ${configuration} Build and Test (Jit - MinOpts)",
673 "(?i).*test\\W+${os}\\W+${scenario}.*")
676 assert (os == 'Windows_NT') || (os in Constants.crossList)
677 Utilities.addGithubPRTriggerForBranch(job, branch, "${os} ${architecture} ${configuration} Build and Test (Jit - JitStress=1)",
678 "(?i).*test\\W+${os}\\W+${scenario}.*")
681 assert (os == 'Windows_NT') || (os in Constants.crossList)
682 Utilities.addGithubPRTriggerForBranch(job, branch, "${os} ${architecture} ${configuration} Build and Test (Jit - JitStress=2)",
683 "(?i).*test\\W+${os}\\W+${scenario}.*")
686 assert (os == 'Windows_NT') || (os in Constants.crossList)
687 Utilities.addGithubPRTriggerForBranch(job, branch, "${os} ${architecture} ${configuration} Build and Test (Jit - ForceRelocs)",
688 "(?i).*test\\W+${os}\\W+${scenario}.*")
689 case 'jitstressregs1':
690 assert (os == 'Windows_NT') || (os in Constants.crossList)
691 Utilities.addGithubPRTriggerForBranch(job, branch, "${os} ${architecture} ${configuration} Build and Test (Jit - JitStressRegs=1)",
692 "(?i).*test\\W+${os}\\W+${scenario}.*")
694 case 'jitstressregs2':
695 assert (os == 'Windows_NT') || (os in Constants.crossList)
696 Utilities.addGithubPRTriggerForBranch(job, branch, "${os} ${architecture} ${configuration} Build and Test (Jit - JitStressRegs=2)",
697 "(?i).*test\\W+${os}\\W+${scenario}.*")
699 case 'jitstressregs3':
700 assert (os == 'Windows_NT') || (os in Constants.crossList)
701 Utilities.addGithubPRTriggerForBranch(job, branch, "${os} ${architecture} ${configuration} Build and Test (Jit - JitStressRegs=3)",
702 "(?i).*test\\W+${os}\\W+${scenario}.*")
704 case 'jitstressregs4':
705 assert (os == 'Windows_NT') || (os in Constants.crossList)
706 Utilities.addGithubPRTriggerForBranch(job, branch, "${os} ${architecture} ${configuration} Build and Test (Jit - JitStressRegs=4)",
707 "(?i).*test\\W+${os}\\W+${scenario}.*")
709 case 'jitstressregs8':
710 assert (os == 'Windows_NT') || (os in Constants.crossList)
711 Utilities.addGithubPRTriggerForBranch(job, branch, "${os} ${architecture} ${configuration} Build and Test (Jit - JitStressRegs=8)",
712 "(?i).*test\\W+${os}\\W+${scenario}.*")
714 case 'jitstressregs0x10':
715 assert (os == 'Windows_NT') || (os in Constants.crossList)
716 Utilities.addGithubPRTriggerForBranch(job, branch, "${os} ${architecture} ${configuration} Build and Test (Jit - JitStressRegs=0x10)",
717 "(?i).*test\\W+${os}\\W+${scenario}.*")
719 case 'jitstressregs0x80':
720 assert (os == 'Windows_NT') || (os in Constants.crossList)
721 Utilities.addGithubPRTriggerForBranch(job, branch, "${os} ${architecture} ${configuration} Build and Test (Jit - JitStressRegs=0x80)",
722 "(?i).*test\\W+${os}\\W+${scenario}.*")
724 case 'jitstress2_jitstressregs1':
725 case 'jitstress2_jitstressregs2':
726 case 'jitstress2_jitstressregs3':
727 case 'jitstress2_jitstressregs4':
728 case 'jitstress2_jitstressregs8':
729 case 'jitstress2_jitstressregs0x10':
730 case 'jitstress2_jitstressregs0x80':
735 case 'gcstress0xc_zapdisable':
736 case 'gcstress0xc_zapdisable_jitstress2':
737 case 'gcstress0xc_zapdisable_heapverify1':
738 case 'gcstress0xc_jitstress1':
739 case 'gcstress0xc_jitstress2':
740 case 'gcstress0xc_minopts_heapverify1':
741 def displayStr = getStressModeDisplayName(scenario)
742 assert (os == 'Windows_NT') || (os in Constants.crossList)
743 Utilities.addGithubPRTriggerForBranch(job, branch, "${os} ${architecture} ${configuration} Build and Test (Jit - ${displayStr})",
744 "(?i).*test\\W+${os}\\W+${scenario}.*")
746 case 'corefx_baseline':
747 case 'corefx_minopts':
748 case 'corefx_jitstress1':
749 case 'corefx_jitstress2':
750 case 'corefx_jitstressregs1':
751 case 'corefx_jitstressregs2':
752 case 'corefx_jitstressregs3':
753 case 'corefx_jitstressregs4':
754 case 'corefx_jitstressregs8':
755 case 'corefx_jitstressregs0x10':
756 case 'corefx_jitstressregs0x80':
757 def displayName = 'CoreFx' + getStressModeDisplayName(scenario)
758 assert (os == 'Windows_NT') || (os in Constants.crossList)
759 Utilities.addGithubPRTriggerForBranch(job, branch, "${os} ${architecture} ${configuration} Build and Test (Jit - ${displayName})",
760 "(?i).*test\\W+${os}\\W+${scenario}.*")
763 println("Unknown scenario: ${scenario}");
771 if (configuration == 'Release') {
772 Utilities.addGithubPRTriggerForBranch(job, branch, "${os} ${architecture} ${configuration} Priority 1 Build and Test", "(?i).*test\\W+${os}\\W+${scenario}.*")
776 if (configuration == 'Checked' || configuration == 'Release') {
777 Utilities.addGithubPRTriggerForBranch(job, branch, "${os} ${architecture} ${configuration} R2R pri0 Build & Test", "(?i).*test\\W+${os}\\W+${configuration}\\W+${scenario}.*")
781 if (configuration == 'Checked' || configuration == 'Release') {
782 Utilities.addGithubPRTriggerForBranch(job, branch, "${os} ${architecture} ${configuration} R2R pri1 Build & Test", "(?i).*test\\W+${os}\\W+${configuration}\\W+${scenario}.*")
785 case 'gcstress15_pri1r2r':
786 if (configuration == 'Release' || configuration == 'Checked') {
787 Utilities.addGithubPRTriggerForBranch(job, branch, "${os} ${architecture} ${configuration} GCStress 15 R2R pri1 Build & Test", "(?i).*test\\W+${os}\\W+${configuration}\\W+${scenario}.*")
790 case 'r2r_jitstress1':
791 if (configuration == 'Release' || configuration == 'Checked') {
792 Utilities.addGithubPRTriggerForBranch(job, branch, "${os} ${architecture} ${configuration} jitstress1 R2R Build & Test", "(?i).*test\\W+${os}\\W+${configuration}\\W+${scenario}.*")
795 case 'r2r_jitstress2':
796 if (configuration == 'Release' || configuration == 'Checked') {
797 Utilities.addGithubPRTriggerForBranch(job, branch, "${os} ${architecture} ${configuration} jitstress2 R2R Build & Test", "(?i).*test\\W+${os}\\W+${configuration}\\W+${scenario}.*")
800 case 'r2r_jitstressregs1':
801 if (configuration == 'Release' || configuration == 'Checked') {
802 Utilities.addGithubPRTriggerForBranch(job, branch, "${os} ${architecture} ${configuration} jitstressregs1 R2R Build & Test", "(?i).*test\\W+${os}\\W+${configuration}\\W+${scenario}.*")
805 case 'r2r_jitstressregs2':
806 if (configuration == 'Release' || configuration == 'Checked') {
807 Utilities.addGithubPRTriggerForBranch(job, branch, "${os} ${architecture} ${configuration} jitstressregs2 R2R Build & Test", "(?i).*test\\W+${os}\\W+${configuration}\\W+${scenario}.*")
810 case 'r2r_jitstressregs3':
811 if (configuration == 'Release' || configuration == 'Checked') {
812 Utilities.addGithubPRTriggerForBranch(job, branch, "${os} ${architecture} ${configuration} jitstressregs3 R2R Build & Test", "(?i).*test\\W+${os}\\W+${configuration}\\W+${scenario}.*")
815 case 'r2r_jitstressregs4':
816 if (configuration == 'Release' || configuration == 'Checked') {
817 Utilities.addGithubPRTriggerForBranch(job, branch, "${os} ${architecture} ${configuration} jitstressregs4 R2R Build & Test", "(?i).*test\\W+${os}\\W+${configuration}\\W+${scenario}.*")
820 case 'r2r_jitstressregs8':
821 if (configuration == 'Release' || configuration == 'Checked') {
822 Utilities.addGithubPRTriggerForBranch(job, branch, "${os} ${architecture} ${configuration} jitstressregs8 R2R Build & Test", "(?i).*test\\W+${os}\\W+${configuration}\\W+${scenario}.*")
825 case 'r2r_jitstressregsx10':
826 if (configuration == 'Release' || configuration == 'Checked') {
827 Utilities.addGithubPRTriggerForBranch(job, branch, "${os} ${architecture} ${configuration} jitstressregsx10 R2R Build & Test", "(?i).*test\\W+${os}\\W+${configuration}\\W+${scenario}.*")
830 case 'r2r_jitstressregsx80':
831 if (configuration == 'Release' || configuration == 'Checked') {
832 Utilities.addGithubPRTriggerForBranch(job, branch, "${os} ${architecture} ${configuration} jitstressregsx80 R2R Build & Test", "(?i).*test\\W+${os}\\W+${configuration}\\W+${scenario}.*")
835 case 'r2r_jitminopts':
836 if (configuration == 'Release' || configuration == 'Checked') {
837 Utilities.addGithubPRTriggerForBranch(job, branch, "${os} ${architecture} ${configuration} JITMinOpts R2R Build & Test", "(?i).*test\\W+${os}\\W+${configuration}\\W+${scenario}.*")
840 case 'r2r_jitforcerelocs':
841 if (configuration == 'Release' || configuration == 'Checked') {
842 Utilities.addGithubPRTriggerForBranch(job, branch, "${os} ${architecture} ${configuration} ForceRelocs R2R Build & Test", "(?i).*test\\W+${os}\\W+${configuration}\\W+${scenario}.*")
852 if (configuration == 'Debug') {
853 Utilities.addGithubPRTriggerForBranch(job, branch, "${os} ${architecture} ${configuration} Build and Test")
858 if (configuration == 'Release') {
859 Utilities.addGithubPRTriggerForBranch(job, branch, "${os} ${architecture} ${configuration} Priority 1 Build and Test")
863 if (configuration == 'Release') {
864 Utilities.addGithubPRTriggerForBranch(job, branch, "${os} ${architecture} ${configuration} IL RoundTrip Build and Test", "(?i).*test\\W+${os}\\W+${scenario}.*")
868 if (configuration == 'Checked' || configuration == 'Release') {
869 Utilities.addGithubPRTriggerForBranch(job, branch, "${os} ${architecture} ${configuration} R2R pri0 Build & Test", "(?i).*test\\W+${os}\\W+${configuration}\\W+${scenario}.*")
873 if (configuration == 'Checked' || configuration == 'Release') {
874 Utilities.addGithubPRTriggerForBranch(job, branch, "${os} ${architecture} ${configuration} R2R pri1 Build & Test", "(?i).*test\\W+${os}\\W+${configuration}\\W+${scenario}.*")
877 case 'gcstress15_pri1r2r':
878 if (configuration == 'Release' || configuration == 'Checked') {
879 Utilities.addGithubPRTriggerForBranch(job, branch, "${os} ${architecture} ${configuration} GCStress 15 R2R pri1 Build & Test", "(?i).*test\\W+${os}\\W+${configuration}\\W+${scenario}.*")
882 case 'r2r_jitstress1':
883 if (configuration == 'Release' || configuration == 'Checked') {
884 Utilities.addGithubPRTriggerForBranch(job, branch, "${os} ${architecture} ${configuration} jitstress1 R2R Build & Test", "(?i).*test\\W+${os}\\W+${configuration}\\W+${scenario}.*")
887 case 'r2r_jitstress2':
888 if (configuration == 'Release' || configuration == 'Checked') {
889 Utilities.addGithubPRTriggerForBranch(job, branch, "${os} ${architecture} ${configuration} jitstress2 R2R Build & Test", "(?i).*test\\W+${os}\\W+${configuration}\\W+${scenario}.*")
892 case 'r2r_jitstressregs1':
893 if (configuration == 'Release' || configuration == 'Checked') {
894 Utilities.addGithubPRTriggerForBranch(job, branch, "${os} ${architecture} ${configuration} jitstressregs1 R2R Build & Test", "(?i).*test\\W+${os}\\W+${configuration}\\W+${scenario}.*")
897 case 'r2r_jitstressregs2':
898 if (configuration == 'Release' || configuration == 'Checked') {
899 Utilities.addGithubPRTriggerForBranch(job, branch, "${os} ${architecture} ${configuration} jitstressregs2 R2R Build & Test", "(?i).*test\\W+${os}\\W+${configuration}\\W+${scenario}.*")
902 case 'r2r_jitstressregs3':
903 if (configuration == 'Release' || configuration == 'Checked') {
904 Utilities.addGithubPRTriggerForBranch(job, branch, "${os} ${architecture} ${configuration} jitstressregs3 R2R Build & Test", "(?i).*test\\W+${os}\\W+${configuration}\\W+${scenario}.*")
907 case 'r2r_jitstressregs4':
908 if (configuration == 'Release' || configuration == 'Checked') {
909 Utilities.addGithubPRTriggerForBranch(job, branch, "${os} ${architecture} ${configuration} jitstressregs4 R2R Build & Test", "(?i).*test\\W+${os}\\W+${configuration}\\W+${scenario}.*")
912 case 'r2r_jitstressregs8':
913 if (configuration == 'Release' || configuration == 'Checked') {
914 Utilities.addGithubPRTriggerForBranch(job, branch, "${os} ${architecture} ${configuration} jitstressregs8 R2R Build & Test", "(?i).*test\\W+${os}\\W+${configuration}\\W+${scenario}.*")
917 case 'r2r_jitstressregsx10':
918 if (configuration == 'Release' || configuration == 'Checked') {
919 Utilities.addGithubPRTriggerForBranch(job, branch, "${os} ${architecture} ${configuration} jitstressregsx10 R2R Build & Test", "(?i).*test\\W+${os}\\W+${configuration}\\W+${scenario}.*")
922 case 'r2r_jitstressregsx80':
923 if (configuration == 'Release' || configuration == 'Checked') {
924 Utilities.addGithubPRTriggerForBranch(job, branch, "${os} ${architecture} ${configuration} jitstressregsx80 R2R Build & Test", "(?i).*test\\W+${os}\\W+${configuration}\\W+${scenario}.*")
927 case 'r2r_jitminopts':
928 if (configuration == 'Release' || configuration == 'Checked') {
929 Utilities.addGithubPRTriggerForBranch(job, branch, "${os} ${architecture} ${configuration} JITMinOpts R2R Build & Test", "(?i).*test\\W+${os}\\W+${configuration}\\W+${scenario}.*")
932 case 'r2r_jitforcerelocs':
933 if (configuration == 'Release' || configuration == 'Checked') {
934 Utilities.addGithubPRTriggerForBranch(job, branch, "${os} ${architecture} ${configuration} ForceRelocs R2R Build & Test", "(?i).*test\\W+${os}\\W+${configuration}\\W+${scenario}.*")
938 if (configuration == 'Release') {
939 Utilities.addGithubPRTriggerForBranch(job, branch, "${os} ${architecture} ${configuration} Long-Running GC Build & Test", "(?i).*test\\W+${os}\\W+${configuration}\\W+${scenario}.*")
943 if (configuration == 'Release') {
944 Utilities.addGithubPRTriggerForBranch(job, branch, "${os} ${architecture} ${configuration} GC Simulator", "(?i).*test\\W+${os}\\W+${configuration}\\W+${scenario}.*")
948 assert (os == 'Windows_NT') || (os in Constants.crossList)
949 Utilities.addGithubPRTriggerForBranch(job, branch, "${os} ${architecture} ${configuration} Build and Test (Jit - MinOpts)",
950 "(?i).*test\\W+${os}\\W+${scenario}.*")
953 assert (os == 'Windows_NT') || (os in Constants.crossList)
954 Utilities.addGithubPRTriggerForBranch(job, branch, "${os} ${architecture} ${configuration} Build and Test (Jit - ForceRelocs)",
955 "(?i).*test\\W+${os}\\W+${scenario}.*")
958 assert (os == 'Windows_NT') || (os in Constants.crossList)
959 Utilities.addGithubPRTriggerForBranch(job, branch, "${os} ${architecture} ${configuration} Build and Test (Jit - JitStress=1)",
960 "(?i).*test\\W+${os}\\W+${scenario}.*")
963 assert (os == 'Windows_NT') || (os in Constants.crossList)
964 Utilities.addGithubPRTriggerForBranch(job, branch, "${os} ${architecture} ${configuration} Build and Test (Jit - JitStress=2)",
965 "(?i).*test\\W+${os}\\W+${scenario}.*")
967 case 'jitstressregs1':
968 assert (os == 'Windows_NT') || (os in Constants.crossList)
969 Utilities.addGithubPRTriggerForBranch(job, branch, "${os} ${architecture} ${configuration} Build and Test (Jit - JitStressRegs=1)",
970 "(?i).*test\\W+${os}\\W+${scenario}.*")
972 case 'jitstressregs2':
973 assert (os == 'Windows_NT') || (os in Constants.crossList)
974 Utilities.addGithubPRTriggerForBranch(job, branch, "${os} ${architecture} ${configuration} Build and Test (Jit - JitStressRegs=2)",
975 "(?i).*test\\W+${os}\\W+${scenario}.*")
977 case 'jitstressregs3':
978 assert (os == 'Windows_NT') || (os in Constants.crossList)
979 Utilities.addGithubPRTriggerForBranch(job, branch, "${os} ${architecture} ${configuration} Build and Test (Jit - JitStressRegs=3)",
980 "(?i).*test\\W+${os}\\W+${scenario}.*")
982 case 'jitstressregs4':
983 assert (os == 'Windows_NT') || (os in Constants.crossList)
984 Utilities.addGithubPRTriggerForBranch(job, branch, "${os} ${architecture} ${configuration} Build and Test (Jit - JitStressRegs=4)",
985 "(?i).*test\\W+${os}\\W+${scenario}.*")
987 case 'jitstressregs8':
988 assert (os == 'Windows_NT') || (os in Constants.crossList)
989 Utilities.addGithubPRTriggerForBranch(job, branch, "${os} ${architecture} ${configuration} Build and Test (Jit - JitStressRegs=8)",
990 "(?i).*test\\W+${os}\\W+${scenario}.*")
992 case 'jitstressregs0x10':
993 assert (os == 'Windows_NT') || (os in Constants.crossList)
994 Utilities.addGithubPRTriggerForBranch(job, branch, "${os} ${architecture} ${configuration} Build and Test (Jit - JitStressRegs=0x10)",
995 "(?i).*test\\W+${os}\\W+${scenario}.*")
997 case 'jitstressregs0x80':
998 assert (os == 'Windows_NT') || (os in Constants.crossList)
999 Utilities.addGithubPRTriggerForBranch(job, branch, "${os} ${architecture} ${configuration} Build and Test (Jit - JitStressRegs=0x80)",
1000 "(?i).*test\\W+${os}\\W+${scenario}.*")
1002 case 'jitstress2_jitstressregs1':
1003 case 'jitstress2_jitstressregs2':
1004 case 'jitstress2_jitstressregs3':
1005 case 'jitstress2_jitstressregs4':
1006 case 'jitstress2_jitstressregs8':
1007 case 'jitstress2_jitstressregs0x10':
1008 case 'jitstress2_jitstressregs0x80':
1013 case 'gcstress0xc_zapdisable':
1014 case 'gcstress0xc_zapdisable_jitstress2':
1015 case 'gcstress0xc_zapdisable_heapverify1':
1016 case 'gcstress0xc_jitstress1':
1017 case 'gcstress0xc_jitstress2':
1018 case 'gcstress0xc_minopts_heapverify1':
1019 def displayStr = getStressModeDisplayName(scenario)
1020 assert (os == 'Windows_NT') || (os in Constants.crossList)
1021 Utilities.addGithubPRTriggerForBranch(job, branch, "${os} ${architecture} ${configuration} Build and Test (Jit - ${displayStr})",
1022 "(?i).*test\\W+${os}\\W+${scenario}.*")
1024 case 'corefx_baseline':
1025 case 'corefx_minopts':
1026 case 'corefx_jitstress1':
1027 case 'corefx_jitstress2':
1028 case 'corefx_jitstressregs1':
1029 case 'corefx_jitstressregs2':
1030 case 'corefx_jitstressregs3':
1031 case 'corefx_jitstressregs4':
1032 case 'corefx_jitstressregs8':
1033 case 'corefx_jitstressregs0x10':
1034 case 'corefx_jitstressregs0x80':
1035 def displayName = 'CoreFx ' + getStressModeDisplayName(scenario)
1036 assert (os == 'Windows_NT') || (os in Constants.crossList)
1037 Utilities.addGithubPRTriggerForBranch(job, branch, "${os} ${architecture} ${configuration} Build and Test (Jit - ${displayName})",
1038 "(?i).*test\\W+${os}\\W+${scenario}.*")
1041 println("Unknown scenario: ${scenario}");
1047 assert scenario == 'default'
1048 if (configuration == 'Checked') {
1049 Utilities.addGithubPRTriggerForBranch(job, branch, "${os} ${architecture} ${configuration} Build")
1053 println("Unknown os: ${os}");
1059 assert scenario == 'default'
1062 if (isLinuxEmulatorBuild == false) {
1063 // Removing the regex will cause this to run on each PR.
1064 Utilities.addGithubPRTriggerForBranch(job, branch, "${os} ${architecture} Cross ${configuration} Build", "(?i).*test\\W+Linux\\W+arm\\W+cross\\W+${configuration}.*")
1067 Utilities.addGithubPRTriggerForBranch(job, branch, "Linux ARM Emulator Cross ${configuration} Build")
1071 println("NYI os: ${os}");
1077 assert (scenario == 'default') || (scenario == 'pri1r2r') || (scenario == 'gcstress0x3') || (scenario == 'gcstress0xc')
1079 // Set up a private trigger
1080 def contextString = "${os} ${architecture} Cross ${configuration}"
1081 if (scenario != 'default')
1082 contextString += " ${scenario}"
1083 contextString += " Build"
1084 // Debug builds only.
1085 if (configuration != 'Debug') {
1086 contextString += " and Test"
1089 def arm64Users = ['erozenfeld', 'kyulee1', 'pgavlin', 'russellhadley', 'swaroop-sridhar', 'JosephTremoulet', 'jashook', 'RussKeldorph', 'gkhanna79', 'briansull', 'cmckinsey', 'jkotas', 'ramarag', 'markwilkie', 'rahku', 'tzwlai', 'weshaggard']
1094 Utilities.addPrivateGithubPRTriggerForBranch(job, branch, contextString,
1095 "(?i).*test\\W+${os}\\W+${architecture}\\W+${configuration}", null, arm64Users)
1100 Utilities.addPrivateGithubPRTriggerForBranch(job, branch, contextString,
1101 "(?i).*test\\W+${os}\\W+${architecture}\\W+${configuration}\\W+${scenario}", null, arm64Users)
1106 println("NYI os: ${os}");
1113 assert (scenario == 'default' || scenario == 'r2r' || scenario == 'pri1r2r' || scenario == 'gcstress15_pri1r2r' || scenario == 'longgc' || scenario == 'gcsimulator' ||
1114 Constants.r2rJitStressScenarios.indexOf(scenario) != -1)
1115 // For windows, x86 runs by default
1118 if (architecture == 'x86lb') {
1119 jit = 'legacy_backend'
1122 if (scenario == 'default') {
1123 if (os == 'Windows_NT') {
1124 if (configuration == 'Checked') {
1125 Utilities.addGithubPRTriggerForBranch(job, branch, "${os} ${arch} ${jit} ${configuration} Build and Test")
1130 Utilities.addGithubPRTriggerForBranch(job, branch, "${os} ${arch} ${jit} ${configuration} Build", "(?i).*test\\W+${arch}\\W+${osGroup}.\\W+${jit}*")
1133 else if (scenario == 'r2r') {
1134 if (os == 'Windows_NT') {
1135 if (configuration == 'Release') {
1136 Utilities.addGithubPRTriggerForBranch(job, branch, "${os} ${arch} ${jit} ${configuration} R2R pri0 Build & Test", "(?i).*test\\W+${os}\\W+${arch}\\W+${jit}\\W+${configuration}\\W+${scenario}.*")
1140 else if (scenario == 'pri1r2r') {
1141 if (os == 'Windows_NT') {
1142 if (configuration == 'Release') {
1143 Utilities.addGithubPRTriggerForBranch(job, branch, "${os} ${arch} ${jit} ${configuration} R2R pri1 Build & Test", "(?i).*test\\W+${os}\\W+${arch}\\W+${jit}\\W+${configuration}\\W+${scenario}.*")
1147 else if (scenario == 'gcstress15_pri1r2r'){
1148 if (os == 'Windows_NT'){
1149 if (configuration == 'Release'){
1150 Utilities.addGithubPRTriggerForBranch(job, branch, "${os} ${arch} ${jit} ${configuration} GCStress 15 R2R pri1 Build & Test", "(?i).*test\\W+${os}\\W+${arch}\\W+${jit}\\W+${configuration}\\W+${scenario}.*")
1154 else if (scenario == 'r2r_jitstress1'){
1155 if (configuration == 'Release' || configuration == 'Checked') {
1156 if (os == 'Windows_NT'){
1157 Utilities.addGithubPRTriggerForBranch(job, branch, "${os} ${arch} ${jit} ${configuration} jitstress1 R2R Build & Test", "(?i).*test\\W+${os}\\W+${arch}\\W+${jit}\\W+${configuration}\\W+${scenario}.*")
1161 else if (scenario == 'r2r_jitstress2'){
1162 if (configuration == 'Release' || configuration == 'Checked') {
1163 if (os == 'Windows_NT'){
1164 Utilities.addGithubPRTriggerForBranch(job, branch, "${os} ${arch} ${jit} ${configuration} jitstress2 R2R Build & Test", "(?i).*test\\W+${os}\\W+${arch}\\W+${jit}\\W+${configuration}\\W+${scenario}.*")
1168 else if (scenario == 'r2r_jitstressregs1'){
1169 if (configuration == 'Release' || configuration == 'Checked') {
1170 if (os == 'Windows_NT'){
1171 Utilities.addGithubPRTriggerForBranch(job, branch, "${os} ${arch} ${jit} ${configuration} jitstressregs1 R2R Build & Test", "(?i).*test\\W+${os}\\W+${arch}\\W+${jit}\\W+${configuration}\\W+${scenario}.*")
1175 else if (scenario == 'r2r_jitstressregs2'){
1176 if (configuration == 'Release' || configuration == 'Checked') {
1177 if (os == 'Windows_NT'){
1178 Utilities.addGithubPRTriggerForBranch(job, branch, "${os} ${arch} ${jit} ${configuration} jitstressregs2 R2R Build & Test", "(?i).*test\\W+${os}\\W+${arch}\\W+${jit}\\W+${configuration}\\W+${scenario}.*")
1182 else if (scenario == 'r2r_jitstressregs3'){
1183 if (configuration == 'Release' || configuration == 'Checked') {
1184 if (os == 'Windows_NT'){
1185 Utilities.addGithubPRTriggerForBranch(job, branch, "${os} ${arch} ${jit} ${configuration} jitstressregs3 R2R Build & Test", "(?i).*test\\W+${os}\\W+${arch}\\W+${jit}\\W+${configuration}\\W+${scenario}.*")
1189 else if (scenario == 'r2r_jitstressregs4'){
1190 if (configuration == 'Release' || configuration == 'Checked') {
1191 if (os == 'Windows_NT'){
1192 Utilities.addGithubPRTriggerForBranch(job, branch, "${os} ${arch} ${jit} ${configuration} jitstressregs4 R2R Build & Test", "(?i).*test\\W+${os}\\W+${arch}\\W+${jit}\\W+${configuration}\\W+${scenario}.*")
1196 else if (scenario == 'r2r_jitstressregs8'){
1197 if (configuration == 'Release' || configuration == 'Checked') {
1198 if (os == 'Windows_NT'){
1199 Utilities.addGithubPRTriggerForBranch(job, branch, "${os} ${arch} ${jit} ${configuration} jitstressregs8 R2R Build & Test", "(?i).*test\\W+${os}\\W+${arch}\\W+${jit}\\W+${configuration}\\W+${scenario}.*")
1203 else if (scenario == 'r2r_jitstressregsx10'){
1204 if (configuration == 'Release' || configuration == 'Checked') {
1205 if (os == 'Windows_NT'){
1206 Utilities.addGithubPRTriggerForBranch(job, branch, "${os} ${arch} ${jit} ${configuration} jitstressregsx10 R2R Build & Test", "(?i).*test\\W+${os}\\W+${arch}\\W+${jit}\\W+${configuration}\\W+${scenario}.*")
1210 else if (scenario == 'r2r_jitstressregsx80'){
1211 if (configuration == 'Release' || configuration == 'Checked') {
1212 if (os == 'Windows_NT'){
1213 Utilities.addGithubPRTriggerForBranch(job, branch, "${os} ${arch} ${jit} ${configuration} jitstressregsx80 R2R Build & Test", "(?i).*test\\W+${os}\\W+${arch}\\W+${jit}\\W+${configuration}\\W+${scenario}.*")
1217 else if (scenario == 'r2r_jitminopts'){
1218 if (configuration == 'Release' || configuration == 'Checked') {
1219 if (os == 'Windows_NT'){
1220 Utilities.addGithubPRTriggerForBranch(job, branch, "${os} ${arch} ${jit} ${configuration} jitminopts R2R Build & Test", "(?i).*test\\W+${os}\\W+${arch}\\W+${jit}\\W+${configuration}\\W+${scenario}.*")
1224 else if (scenario == 'r2r_jitforcerelocs'){
1225 if (configuration == 'Release' || configuration == 'Checked') {
1226 if (os == 'Windows_NT'){
1227 Utilities.addGithubPRTriggerForBranch(job, branch, "${os} ${arch} ${jit} ${configuration} jitforcerelocs R2R Build & Test", "(?i).*test\\W+${os}\\W+${arch}\\W+${jit}\\W+${configuration}\\W+${scenario}.*")
1231 else if (scenario == 'longgc') {
1232 if (os == 'Windows_NT'){
1233 if (configuration == 'Release'){
1234 Utilities.addGithubPRTriggerForBranch(job, branch, "${os} ${arch} ${jit} ${configuration} Long-Running GC Build & Test", "(?i).*test\\W+${os}\\W+${arch}\\W+${jit}\\W+${configuration}\\W+${scenario}.*")
1238 else if (scenario == 'gcsimulator') {
1239 if (os == 'Windows_NT') {
1240 if (configuration == 'Release') {
1241 Utilities.addGithubPRTriggerForBranch(job, branch, "${os} ${arch} ${jit} ${configuration} GC Simulator", "(?i).*test\\W+${os}\\W+${arch}\\W+${jit}\\W+${configuration}\\W+${scenario}.*")
1247 println("Unknown architecture: ${architecture}");
1253 // Additional scenario which can alter behavior
1255 def combinedScenarios = Constants.basicScenarios + Constants.jitStressModeScenarios.keySet()
1256 combinedScenarios.each { scenario ->
1257 [true, false].each { isPR ->
1258 Constants.architectureList.each { architecture ->
1259 Constants.configurationList.each { configuration ->
1260 Constants.osList.each { os ->
1261 // If the OS is Windows_NT_BuildOnly, set the isBuildOnly flag to true
1262 // and reset the os to Windows_NT
1263 def isBuildOnly = false
1264 if (os == 'Windows_NT_BuildOnly') {
1269 // If the OS is LinuxARMEmulator and arch is arm, set the isLinuxEmulatorBuild
1270 // flag to true and reset the os to Ubuntu
1271 // The isLinuxEmulatorBuild flag will be used at a later time to execute the right
1272 // set of build commands
1273 // The tuples (LinuxARMEmulator, other architectures) are not handled and control returns
1274 def isLinuxEmulatorBuild = false
1275 if (os == 'LinuxARMEmulator' && architecture == 'arm') {
1276 // Cross Builds only in Debug and Release modes allowed
1277 if ( configuration == 'Checked' ) {
1281 isLinuxEmulatorBuild = true
1283 } else if (os == 'LinuxARMEmulator') {
1287 // Skip totally unimplemented (in CI) configurations.
1288 switch (architecture) {
1291 if (os != 'Windows_NT' || isBuildOnly) {
1296 // Only Ubuntu cross implemented
1297 if (os != 'Ubuntu') {
1304 if (os != 'Windows_NT') {
1309 // Everything implemented
1312 println("Unknown architecture: ${architecture}")
1316 // Skip scenarios (blanket skipping for jit stress modes, which are good most everywhere
1317 // with checked builds
1318 def enableCorefxTesting = false
1319 if (Constants.jitStressModeScenarios.containsKey(scenario)) {
1320 if (configuration != 'Checked') {
1324 enableCorefxTesting = isCorefxTesting(scenario)
1326 // Since these are just execution time differences,
1327 // skip platforms that don't execute the tests here (Windows_NT only)
1328 def isEnabledOS = os == 'Windows_NT' || (os == 'Ubuntu' && enableCorefxTesting)
1329 if (!isEnabledOS || isBuildOnly) {
1333 switch (architecture) {
1335 if ((scenario != 'gcstress0x3') && (scenario != 'gcstress0xc')) {
1340 // Everything implemented
1347 // If this is a r2r jitstress, jitstressregs, jitminopts or forcerelocs scenario
1348 // and configuration is not Checked, bail out.
1349 if (configuration != 'Checked' && Constants.r2rJitStressScenarios.indexOf(scenario) != -1) {
1356 // The pri1 build isn't necessary except for Windows_NT. Non-Windows NT uses
1357 // the default scenario build
1358 if (os != 'Windows_NT') {
1362 if (architecture != 'x64') {
1367 // The ilrt build isn't necessary except for Windows_NT. Non-Windows NT uses
1368 // the default scenario build
1369 if (os != 'Windows_NT') {
1373 if (architecture != 'x64') {
1377 if (configuration != 'Release') {
1382 // The r2r build isn't necessary except for Windows_NT. Non-Windows NT uses
1383 // the default scenario build
1384 if (os != 'Windows_NT') {
1387 if (architecture != 'x64') {
1392 // The pri1r2r build isn't necessary except for Windows_NT. Non-Windows NT uses
1393 // the default scenario build
1394 if (os != 'Windows_NT') {
1397 if (architecture != 'x64') {
1398 if (architecture != 'arm64' || configuration == 'Debug') {
1403 case 'gcstress15_pri1r2r':
1404 case 'r2r_jitstress1':
1405 case 'r2r_jitstress2':
1406 case 'r2r_jitstressregs1':
1407 case 'r2r_jitstressregs2':
1408 case 'r2r_jitstressregs3':
1409 case 'r2r_jitstressregs4':
1410 case 'r2r_jitstressregs8':
1411 case 'r2r_jitstressregsx10':
1412 case 'r2r_jitstressregsx80':
1413 case 'r2r_jitminopts':
1414 case 'r2r_jitforcerelocs':
1415 // The above builds are not necessary except for Windows_NT. Non-Windows NT uses
1416 // the default scenario build
1417 if (os != 'Windows_NT') {
1420 if (architecture != 'x64') {
1426 if (os != 'Windows_NT' && os != 'Ubuntu' && os != 'OSX') {
1429 if (architecture != 'x64') {
1432 if (configuration != 'Release') {
1436 // We need Windows x64 Release bits for the code coverage build
1438 if (os != 'Windows_NT') {
1441 if (architecture != 'x64') {
1444 if (configuration != 'Release') {
1452 println("Unknown scenario: ${scenario}")
1459 def lowerConfiguration = configuration.toLowerCase()
1460 def jobName = getJobName(configuration, architecture, os, scenario, isBuildOnly, isLinuxEmulatorBuild)
1461 def folderName = isJITStressJob(scenario) ? 'jitstress' : '';
1463 // Create the new job
1464 def newJob = job(Utilities.getFullJobName(project, jobName, isPR, folderName)) {}
1466 setMachineAffinity(newJob, os, architecture)
1468 // Add all the standard options
1469 Utilities.standardJobSetup(newJob, project, isPR, "*/${branch}")
1470 addTriggers(newJob, branch, isPR, architecture, os, configuration, scenario, false, isBuildOnly, isLinuxEmulatorBuild)
1472 def buildCommands = [];
1473 def osGroup = getOSGroup(os)
1475 // Calculate the build steps, archival, and xunit results
1478 switch (architecture) {
1482 def arch = architecture
1483 if (architecture == 'x86ryujit' || architecture == 'x86lb') {
1487 if (Constants.jitStressModeScenarios.containsKey(scenario) ||
1488 scenario == 'default' ||
1489 scenario == 'r2r' ||
1490 Constants.r2rJitStressScenarios.indexOf(scenario) != -1) {
1491 buildOpts = enableCorefxTesting ? 'skiptests' : ''
1492 buildCommands += "set __TestIntermediateDir=int&&build.cmd ${lowerConfiguration} ${arch} ${buildOpts}"
1495 // For Pri 1 tests, we must shorten the output test binary path names.
1496 // if __TestIntermediateDir is already set, build-test.cmd will
1497 // output test binaries to that directory. If it is not set, the
1498 // binaries are sent to a default directory whose name is about
1499 // 35 characters long.
1501 else if (scenario == 'pri1' || scenario == 'pri1r2r' || scenario == 'gcstress15_pri1r2r'|| scenario == 'coverage') {
1502 buildCommands += "set __TestIntermediateDir=int&&build.cmd ${lowerConfiguration} ${arch} -priority=1"
1504 else if (scenario == 'ilrt') {
1505 // First do the build with skiptests and then build the tests with ilasm roundtrip
1506 buildCommands += "build.cmd ${lowerConfiguration} ${arch} skiptests"
1507 buildCommands += "set __TestIntermediateDir=int&&build-test.cmd ${lowerConfiguration} ${arch} -ilasmroundtrip"
1509 else if (isLongGc(scenario)) {
1510 buildCommands += "build.cmd ${lowerConfiguration} ${arch} skiptests"
1511 buildCommands += "set __TestIntermediateDir=int&&build-test.cmd ${lowerConfiguration} ${arch}"
1514 println("Unknown scenario: ${scenario}")
1518 // If we are running a stress mode, we should write out the set of key
1519 // value env pairs to a file at this point and then we'll pass that to runtest.cmd
1522 //If this is a crossgen build, pass 'crossgen' to runtest.cmd
1523 def crossgenStr = ''
1524 def runcrossgentestsStr = ''
1525 def runjitstressStr = ''
1526 def runjitstressregsStr = ''
1527 def runjitmioptsStr = ''
1528 def runjitforcerelocsStr = ''
1529 def gcstressStr = ''
1530 def runtestArguments = ''
1531 def gcTestArguments = ''
1533 if (scenario == 'r2r' ||
1534 scenario == 'pri1r2r' ||
1535 scenario == 'gcstress15_pri1r2r' ||
1536 Constants.r2rJitStressScenarios.indexOf(scenario) != -1) {
1537 crossgenStr = 'crossgen'
1538 runcrossgentestsStr = 'runcrossgentests'
1540 if (scenario == 'r2r_jitstress1'){
1541 runjitstressStr = 'jitstress 1'
1543 else if (scenario == 'r2r_jitstress2') {
1544 runjitstressStr = 'jitstress 2'
1546 else if (scenario == 'r2r_jitstressregs1'){
1547 runjitstressregsStr = 'jitstressregs 1'
1549 else if (scenario == 'r2r_jitstressregs2') {
1550 runjitstressregsStr = 'jitstressregs 2'
1552 else if (scenario == 'r2r_jitstressregs3') {
1553 runjitstressregsStr = 'jitstressregs 3'
1555 else if (scenario == 'r2r_jitstressregs4') {
1556 runjitstressregsStr = 'jitstressregs 4'
1558 else if (scenario == 'r2r_jitstressregs8') {
1559 runjitstressregsStr = 'jitstressregs 8'
1561 else if (scenario == 'r2r_jitstressregsx10') {
1562 runjitstressregsStr = 'jitstressregs x10'
1564 else if (scenario == 'r2r_jitstressregsx80') {
1565 runjitstressregsStr = 'jitstressregs x80'
1567 else if (scenario == 'r2r_jitminopts') {
1568 runjitmioptsStr = 'jitminopts'
1570 else if (scenario == 'r2r_jitforcerelocs') {
1571 runjitforcerelocsStr = 'jitforcerelocs'
1574 if (scenario == 'gcstress15_pri1r2r')
1576 gcstressStr = 'gcstresslevel 0xF'
1579 if (isLongGc(scenario)) {
1580 gcTestArguments = "${scenario} sequential"
1583 runtestArguments = "${lowerConfiguration} ${arch} ${gcstressStr} ${crossgenStr} ${runcrossgentestsStr} ${runjitstressStr} ${runjitstressregsStr} ${runjitmioptsStr} ${runjitforcerelocsStr} ${gcTestArguments}"
1584 if (Constants.jitStressModeScenarios.containsKey(scenario)) {
1585 if (enableCorefxTesting) {
1586 // Sync to corefx repo
1587 // Move coreclr files to a subdirectory, %workspace%/clr. Otherwise, corefx build
1588 // thinks that %workspace% is the project base directory.
1589 buildCommands += "powershell new-item clr -type directory -force"
1590 buildCommands += 'powershell foreach ($x in get-childitem -force) { if (\$x.name -ne \'clr\') { move-item $x clr }}'
1591 buildCommands += "git clone https://github.com/dotnet/corefx fx"
1593 buildCommands += getStressModeEnvSetCmd(os, scenario);
1595 // Run corefx build and testing
1596 buildCommands += "cd fx && call \"C:\\Program Files (x86)\\Microsoft Visual Studio 14.0\\VC\\vcvarsall.bat\" x86 && Build.cmd -Release -- /p:BUILDTOOLS_OVERRIDE_RUNTIME=%WORKSPACE%\\clr\\bin\\Product\\Windows_NT.x64.Checked "
1599 def stepScriptLocation = "%WORKSPACE%\\bin\\tests\\SetStressModes.bat"
1600 buildCommands += genStressModeScriptStep(os, scenario, Constants.jitStressModeScenarios[scenario], stepScriptLocation)
1602 // Run tests with the
1604 buildCommands += "tests\\runtest.cmd ${runtestArguments} TestEnv ${stepScriptLocation}"
1607 else if (architecture == 'x64') {
1608 buildCommands += "tests\\runtest.cmd ${runtestArguments}"
1610 else if (architecture == 'x86ryujit') {
1611 def testEnvLocation = "%WORKSPACE%\\tests\\x86\\ryujit_x86_testenv.cmd"
1613 buildCommands += "tests\\runtest.cmd ${runtestArguments} TestEnv ${testEnvLocation}"
1615 else if (architecture == 'x86lb') {
1616 buildCommands += "tests\\runtest.cmd ${runtestArguments} Exclude0 x86_legacy_backend_issues.targets"
1620 if (!enableCorefxTesting) {
1621 // Run the rest of the build
1622 // Build the mscorlib for the other OS's
1623 buildCommands += "build.cmd ${lowerConfiguration} ${arch} linuxmscorlib"
1624 buildCommands += "build.cmd ${lowerConfiguration} ${arch} freebsdmscorlib"
1625 buildCommands += "build.cmd ${lowerConfiguration} ${arch} osxmscorlib"
1627 // Zip up the tests directory so that we don't use so much space/time copying
1628 // 10s of thousands of files around.
1629 buildCommands += "powershell -Command \"Add-Type -Assembly 'System.IO.Compression.FileSystem'; [System.IO.Compression.ZipFile]::CreateFromDirectory('.\\bin\\tests\\${osGroup}.${arch}.${configuration}', '.\\bin\\tests\\tests.zip')\"";
1631 if (!Constants.jitStressModeScenarios.containsKey(scenario)) {
1632 // For windows, pull full test results and test drops for x86/x64.
1633 // No need to pull for stress mode scenarios (downstream builds use the default scenario)
1634 Utilities.addArchival(newJob, "bin/Product/**,bin/tests/tests.zip")
1638 if (architecture == 'x64' || !isPR) {
1639 Utilities.addXUnitDotNETResults(newJob, 'bin/**/TestRun*.xml')
1641 setTestJobTimeOut(newJob, scenario)
1645 // Archive only result xml files since corefx/bin/tests is very large around 10 GB.
1646 // For windows, pull full test results and test drops for x86/x64
1647 Utilities.addArchival(newJob, "fx/bin/tests/**/testResults.xml")
1650 setTestJobTimeOut(newJob, scenario)
1652 if (architecture == 'x64' || !isPR) {
1653 Utilities.addXUnitDotNETResults(newJob, 'fx/bin/tests/**/testResults.xml')
1659 assert (scenario == 'default') || (scenario == 'pri1r2r') || (scenario == 'gcstress0x3') || (scenario == 'gcstress0xc')
1661 setTestJobTimeOut(newJob, scenario)
1663 // Debug runs take too long to run. So build job only.
1664 if (lowerConfiguration == "debug") {
1665 buildCommands += "set __TestIntermediateDir=int&&build.cmd ${lowerConfiguration} ${architecture} toolset_dir C:\\ats2"
1668 buildCommands += "set __TestIntermediateDir=int&&build.cmd skiptests ${lowerConfiguration} ${architecture} toolset_dir C:\\ats2"
1669 // Test build and run are launched together.
1670 buildCommands += "Z:\\arm64\\common\\scripts\\arm64PostLauncher.cmd %WORKSPACE% ${architecture} ${lowerConfiguration} ${scenario}"
1671 Utilities.addXUnitDotNETResults(newJob, 'bin/tests/testResults.xml')
1675 Utilities.addArchival(newJob, "bin/Product/**")
1678 println("Unknown architecture: ${architecture}");
1690 case 'OpenSUSE13.2':
1692 switch (architecture) {
1696 def arch = architecture
1697 if (architecture == 'x86ryujit' || architecture == 'x86lb') {
1701 if (!enableCorefxTesting) {
1702 // We run pal tests on all OS but generate mscorlib (and thus, nuget packages)
1703 // only on supported OS platforms.
1704 if ((os == 'FreeBSD') || (os == 'OpenSUSE13.2'))
1706 buildCommands += "./build.sh skipmscorlib verbose ${lowerConfiguration} ${arch}"
1710 buildCommands += "./build.sh verbose ${lowerConfiguration} ${arch}"
1712 buildCommands += "src/pal/tests/palsuite/runpaltests.sh \${WORKSPACE}/bin/obj/${osGroup}.${arch}.${configuration} \${WORKSPACE}/bin/paltestout"
1715 setTestJobTimeOut(newJob, scenario)
1716 // Basic archiving of the build
1717 Utilities.addArchival(newJob, "bin/Product/**,bin/obj/*/tests/**/*.dylib,bin/obj/*/tests/**/*.so")
1719 Utilities.addXUnitDotNETResults(newJob, '**/pal_tests.xml')
1722 // Corefx stress testing
1723 assert os == 'Ubuntu'
1724 assert architecture == 'x64'
1725 assert lowerConfiguration == 'checked'
1727 // Build coreclr and move it to clr directory
1728 buildCommands += "./build.sh verbose ${lowerConfiguration} ${architecture}"
1729 buildCommands += "rm -rf .clr; mkdir .clr; mv * .clr; mv .git .clr; mv .clr clr"
1732 buildCommands += "git clone https://github.com/dotnet/corefx fx"
1734 // Set environment variable
1735 def setEnvVar = getStressModeEnvSetCmd(os, scenario)
1737 // Build and text corefx
1738 buildCommands += "rm -rf \$WORKSPACE/fx_home; mkdir \$WORKSPACE/fx_home"
1739 buildCommands += setEnvVar
1740 buildCommands += "cd fx; export HOME=\$WORKSPACE/fx_home; ./build.sh -Release -Outerloop -TestWithLocalLibraries -- /p:BUILDTOOLS_OVERRIDE_RUNTIME=\$WORKSPACE/clr/bin/Product/Linux.x64.Checked"
1742 // Archive and process test result
1743 Utilities.addArchival(newJob, "fx/bin/tests/**/testResults.xml")
1744 setTestJobTimeOut(newJob, scenario)
1745 Utilities.addXUnitDotNETResults(newJob, 'fx/bin/tests/**/testResults.xml')
1749 // We don't run the cross build except on Ubuntu
1750 assert os == 'Ubuntu'
1752 buildCommands += """echo \"Using rootfs in /opt/aarch64-linux-gnu-root\"
1753 ROOTFS_DIR=/opt/aarch64-linux-gnu-root ./build.sh skipmscorlib arm64 cross verbose ${lowerConfiguration}"""
1755 // Basic archiving of the build, no pal tests
1756 Utilities.addArchival(newJob, "bin/Product/**")
1759 // All builds for ARM architecture are run on Ubuntu currently
1760 assert os == 'Ubuntu'
1761 if (isLinuxEmulatorBuild == false) {
1762 buildCommands += """echo \"Using rootfs in /opt/arm-liux-genueabihf-root\"
1763 ROOTFS_DIR=/opt/arm-linux-genueabihf-root ./build.sh skipmscorlib arm cross verbose ${lowerConfiguration}"""
1765 // Basic archiving of the build, no pal tests
1766 Utilities.addArchival(newJob, "bin/Product/**")
1770 // Make sure the build configuration is either of debug or release
1771 assert ( lowerConfiguration == 'debug' ) || ( lowerConfiguration == 'release' )
1773 // Setup variables to hold emulator folder path and the rootfs mount path
1774 def armemul_path = '/opt/linux-arm-emulator'
1775 def armrootfs_mountpath = '/opt/linux-arm-emulator-root'
1777 // Unzip the Windows test binaries first. Exit with 0
1778 buildCommands += "unzip -q -o ./bin/tests/tests.zip -d ./bin/tests/Windows_NT.x64.${configuration} || exit 0"
1780 // Unpack the corefx binaries
1781 buildCommands += "tar -xf ./bin/build.tar.gz"
1783 // Call the ARM emulator build script to cross build and test using the ARM emulator rootfs
1784 buildCommands += """./tests/scripts/arm32_ci_script.sh \\
1785 --emulatorPath=${armemul_path} \\
1786 --mountPath=${armrootfs_mountpath} \\
1787 --buildConfig=${lowerConfiguration} \\
1788 --testRootDir=./bin/tests/Windows_NT.x64.${configuration} \\
1789 --coreFxNativeBinDir=./bin/Linux.arm-softfp.${configuration} \\
1790 --coreFxBinDir=\"./bin/Linux.AnyCPU.${configuration};./bin/Unix.AnyCPU.${configuration};./bin/AnyOS.AnyCPU.${configuration}\" \\
1791 --testDirFile=./tests/testsRunningInsideARM.txt"""
1794 // Basic archiving of the build
1795 Utilities.addArchival(newJob, "bin/Product/**")
1799 println("Unknown architecture: ${architecture}");
1805 println("Unknown os: ${os}");
1812 if (os == 'Windows_NT') {
1813 buildCommands.each { buildCommand ->
1814 batchFile(buildCommand)
1818 // Setup corefx and Windows test binaries for Linux ARM Emulator Build
1819 if (isLinuxEmulatorBuild) {
1820 // Define the Windows Tests and Corefx build job names
1821 def WindowTestsName = projectFolder + '/' +
1822 Utilities.getFullJobName(project,
1823 getJobName(lowerConfiguration,
1829 def corefxFolder = Utilities.getFolderName('dotnet/corefx') + '/' +
1830 Utilities.getFolderName(branch)
1832 // Copy the Windows test binaries and the Corefx build binaries
1833 copyArtifacts(WindowTestsName) {
1834 excludePatterns('**/testResults.xml', '**/*.ni.dll')
1836 latestSuccessful(true)
1839 copyArtifacts("${corefxFolder}/linuxarmemulator_cross_${lowerConfiguration}") {
1840 includePatterns('bin/build.tar.gz')
1842 latestSuccessful(true)
1847 buildCommands.each { buildCommand ->
1861 // Create the Linux/OSX/CentOS coreclr test leg for debug and release and each scenario
1862 combinedScenarios.each { scenario ->
1863 [true, false].each { isPR ->
1864 // Architectures. x64 only at this point
1865 ['x64'].each { architecture ->
1866 // Put the OS's supported for coreclr cross testing here
1867 Constants.crossList.each { os ->
1868 Constants.configurationList.each { configuration ->
1870 if (Constants.jitStressModeScenarios.containsKey(scenario)) {
1871 if (configuration != 'Checked') {
1874 if (isCorefxTesting(scenario)) {
1877 //Skip stress modes for these scenarios
1878 if (os == 'RHEL7.2' || os == 'Debian8.4' || os == 'OpenSUSE13.2') {
1882 // If this is a r2r jitstress, jitstressregs, jitminopts or forcerelocs scenario
1883 // and configuration is not Checked, bail out.
1884 else if (configuration != 'Checked' && Constants.r2rJitStressScenarios.indexOf(scenario) != -1) {
1887 // For CentOS, we only want Checked/Release pri1 builds.
1888 else if (os == 'CentOS7.1') {
1889 if (scenario != 'pri1' &&
1890 scenario != 'r2r' &&
1891 scenario != 'pri1r2r' &&
1892 scenario != 'gcstress15_pri1r2r' &&
1893 Constants.r2rJitStressScenarios.indexOf(scenario) == -1) {
1896 if (configuration != 'Checked' && configuration != 'Release') {
1900 // For RedHat, Debian, and OpenSUSE, we only do Release pri1 builds.
1901 else if (os == 'RHEL7.2' || os == 'Debian8.4' || os == 'OpenSUSE13.2') {
1902 if (scenario != 'pri1') {
1905 if (configuration != 'Release') {
1917 if (configuration != 'Release') {
1922 //Skip configs that aren't Checked or Release (so just Debug, for now)
1923 if (configuration != 'Checked' && configuration != 'Release') {
1928 //Skip configs that aren't Checked or Release (so just Debug, for now)
1929 if (configuration != 'Checked' && configuration != 'Release') {
1933 case 'gcstress15_pri1r2r':
1934 case 'r2r_jitstress1':
1935 case 'r2r_jitstress2':
1936 case 'r2r_jitstressregs1':
1937 case 'r2r_jitstressregs2':
1938 case 'r2r_jitstressregs3':
1939 case 'r2r_jitstressregs4':
1940 case 'r2r_jitstressregs8':
1941 case 'r2r_jitstressregsx10':
1942 case 'r2r_jitstressregsx80':
1943 case 'r2r_jitminopts':
1944 case 'r2r_jitforcerelocs':
1945 //Skip configs that aren't Checked or Release (so just Debug, for now)
1946 if (configuration != 'Checked' && configuration != 'Release') {
1952 // Long GC tests take a long time on non-Release builds
1953 if (configuration != 'Release') {
1958 //We only want Ubuntu Release for coverage
1959 if (os != 'Ubuntu') {
1962 if (configuration != 'Release') {
1969 println("Unknown scenario: ${scenario}")
1975 def lowerConfiguration = configuration.toLowerCase()
1976 def osGroup = getOSGroup(os)
1977 def jobName = getJobName(configuration, architecture, os, scenario, false) + "_tst"
1979 // Unless this is a coverage test run, we want to copy over the default build of coreclr.
1980 def inputScenario = 'default'
1981 if (scenario == 'coverage') {
1982 inputScenario = 'coverage'
1984 def inputCoreCLRBuildName = projectFolder + '/' +
1985 Utilities.getFullJobName(project, getJobName(configuration, architecture, os, inputScenario, false), isPR)
1986 // If this is a stress scenario, there isn't any difference in the build job
1987 // so we didn't create a build only job for windows_nt specific to that stress mode. Just copy
1988 // from the default scenario
1989 def testBuildScenario = scenario
1990 if (testBuildScenario == 'coverage' || testBuildScenario == 'pri1r2r'|| testBuildScenario == 'gcstress15_pri1r2r') {
1991 testBuildScenario = 'pri1'
1993 else if ( testBuildScenario == 'r2r' || isLongGc(testBuildScenario)) {
1994 testBuildScenario = 'default'
1996 def inputWindowTestsBuildName = ''
1997 if (Constants.jitStressModeScenarios.containsKey(testBuildScenario)) {
1998 inputWindowTestsBuildName = projectFolder + '/' +
1999 Utilities.getFullJobName(project, getJobName(configuration, architecture, 'windows_nt', 'default', true), isPR)
2002 inputWindowTestsBuildName = projectFolder + '/' +
2003 Utilities.getFullJobName(project, getJobName(configuration, architecture, 'windows_nt', testBuildScenario, true), isPR)
2005 // Enable Server GC for Ubuntu PR builds
2006 def serverGCString = ''
2008 // Whether or not this test run should be run sequentially instead
2009 // of in parallel. Only used for long GC tests.
2010 def sequentialString = ''
2012 // Whether or not this test run should run a specific playlist.
2013 // Only used for long GC tests.
2015 // A note - runtest.sh does have "--long-gc" and "--gcsimulator" options
2016 // for running long GC and GCSimulator tests, respectively. We don't use them
2017 // here because using a playlist file produces much more readable output on the CI machines
2018 // and reduces running time.
2019 def playlistString = ''
2021 if (os == 'Ubuntu' && isPR){
2022 serverGCString = '--useServerGC'
2025 // pass --crossgen to runtest.sh for crossgen builds
2026 def crossgenStr = ''
2027 def runcrossgentestsStr = ''
2028 def runjitstressStr = ''
2029 def runjitstressregsStr = ''
2030 def runjitmioptsStr = ''
2031 def runjitforcerelocsStr = ''
2032 def gcstressStr = ''
2034 if (scenario == 'r2r' ||
2035 scenario == 'pri1r2r' ||
2036 scenario == 'gcstress15_pri1r2r' ||
2037 Constants.r2rJitStressScenarios.indexOf(scenario) != -1) {
2038 crossgenStr = '--crossgen'
2039 runcrossgentestsStr = '--runcrossgentests'
2041 if (scenario == 'r2r_jitstress1'){
2042 runjitstressStr = '--jitstress=1'
2044 else if (scenario == 'r2r_jitstress2') {
2045 runjitstressStr = '--jitstress=2'
2047 else if (scenario == 'r2r_jitstressregs1'){
2048 runjitstressregsStr = '--jitstressregs=1'
2050 else if (scenario == 'r2r_jitstressregs2') {
2051 runjitstressregsStr = '--jitstressregs=2'
2053 else if (scenario == 'r2r_jitstressregs3') {
2054 runjitstressregsStr = '--jitstressregs=3'
2056 else if (scenario == 'r2r_jitstressregs4') {
2057 runjitstressregsStr = '--jitstressregs=4'
2059 else if (scenario == 'r2r_jitstressregs8') {
2060 runjitstressregsStr = '--jitstressregs=8'
2062 else if (scenario == 'r2r_jitstressregsx10') {
2063 runjitstressregsStr = '--jitstressregs=x10'
2065 else if (scenario == 'r2r_jitstressregsx80') {
2066 runjitstressregsStr = '--jitstressregs=x80'
2068 else if (scenario == 'r2r_jitminopts') {
2069 runjitmioptsStr = '--jitminopts'
2071 else if (scenario == 'r2r_jitforcerelocs') {
2072 runjitforcerelocsStr = '--jitforcerelocs'
2075 if (scenario == 'gcstress15_pri1r2r')
2077 gcstressStr = '--gcstresslevel=0xF'
2080 if (isLongGc(scenario)) {
2081 // Long GC tests behave very poorly when they are not
2082 // the only test running (many of them allocate until OOM).
2083 sequentialString = '--sequential'
2085 // The Long GC playlist contains all of the tests that are
2086 // going to be run. The GCSimulator playlist contains all of
2087 // the GC simulator tests.
2088 if (scenario == 'longgc') {
2089 playlistString = '--long-gc --playlist=./tests/longRunningGcTests.txt'
2091 else if (scenario == 'gcsimulator') {
2092 playlistString = '--gcsimulator --playlist=./tests/gcSimulatorTests.txt'
2096 def folder = isJITStressJob(scenario) ? 'jitstress' : ''
2097 def newJob = job(Utilities.getFullJobName(project, jobName, isPR, folder)) {
2098 // Add parameters for the inputs
2101 stringParam('CORECLR_WINDOWS_BUILD', '', 'Build number to copy CoreCLR windows test binaries from')
2102 stringParam('CORECLR_BUILD', '', "Build number to copy CoreCLR ${osGroup} binaries from")
2106 // Set up the copies
2108 // Coreclr build containing the tests and mscorlib
2110 copyArtifacts(inputWindowTestsBuildName) {
2111 excludePatterns('**/testResults.xml', '**/*.ni.dll')
2113 buildNumber('${CORECLR_WINDOWS_BUILD}')
2117 if (scenario == 'coverage') {
2119 // Move coreclr to clr directory
2120 shell("rm -rf .clr; mkdir .clr; mv * .clr; mv .git .clr; mv .clr clr")
2123 shell("./clr/build.sh coverage verbose ${lowerConfiguration} ${architecture}")
2125 // Remove folders from obj that we don't expect to be covered. May update this later.
2126 shell("rm -rf ./clr/bin/obj/Linux.x64.Release/src/ToolBox")
2127 shell("rm -rf ./clr/bin/obj/Linux.x64.Release/src/debug")
2128 shell("rm -rf ./clr/bin/obj/Linux.x64.Release/src/ilasm")
2129 shell("rm -rf ./clr/bin/obj/Linux.x64.Release/src/ildasm")
2130 shell("rm -rf ./clr/bin/obj/Linux.x64.Release/src/dlls/dbgshim")
2131 shell("rm -rf ./clr/bin/obj/Linux.x64.Release/src/dlls/mscordac")
2132 shell("rm -rf ./clr/bin/obj/Linux.x64.Release/src/dlls/mscordbi")
2135 shell("./clr/src/pal/tests/palsuite/runpaltests.sh \$(pwd)/clr/bin/obj/${osGroup}.${architecture}.${configuration} \$(pwd)/clr/bin/paltestout")
2137 // Remove obj files for PAL tests so they're not included in coverage results
2138 shell("rm -rf ./clr/bin/obj/Linux.x64.Release/src/pal/tests")
2140 // Unzip the tests first. Exit with 0
2141 shell("unzip -q -o ./clr/bin/tests/tests.zip -d ./clr/bin/tests/Windows_NT.${architecture}.${configuration} || exit 0")
2144 shell("git clone https://github.com/dotnet/corefx fx")
2146 // Build Linux corefx
2147 shell("./fx/build-native.sh -release -buildArch=x64 -os=Linux")
2148 shell("./fx/build-managed.sh -release -buildArch=x64 -osgroup=Linux -skiptests")
2151 def scriptFileName = "\$WORKSPACE/set_stress_test_env.sh"
2152 def createScriptCmds = genStressModeScriptStep(os, scenario, Constants.jitStressModeScenarios['heapverify1'], scriptFileName)
2153 shell("${createScriptCmds}")
2154 testEnvOpt = "--test-env=" + scriptFileName
2157 shell("""./fx/run-test.sh \\
2158 --coreclr-bins \$(pwd)/clr/bin/Product/${osGroup}.${architecture}.${configuration} \\
2159 --mscorlib-bins \$(pwd)/clr/bin/Product/${osGroup}.${architecture}.${configuration} \\
2160 --corefx-tests \$(pwd)/fx/bin/tests/${osGroup}.AnyCPU.${configuration} \\
2161 --corefx-native-bins \$(pwd)/fx/bin/${osGroup}.${architecture}.${configuration} \\
2162 --configurationGroup Release""")
2165 // Run coreclr tests w/ workstation GC
2166 shell("""./clr/tests/runtest.sh \\
2167 --testRootDir=\"\$(pwd)/clr/bin/tests/Windows_NT.${architecture}.${configuration}\" \\
2168 --testNativeBinDir=\"\$(pwd)/clr/bin/obj/${osGroup}.${architecture}.${configuration}/tests\" \\
2169 --coreClrBinDir=\"\$(pwd)/clr/bin/Product/${osGroup}.${architecture}.${configuration}\" \\
2170 --mscorlibDir=\"\$(pwd)/clr/bin/Product/${osGroup}.${architecture}.${configuration}\" \\
2171 --coreFxBinDir=\"\$(pwd)/fx/bin/${osGroup}.AnyCPU.Release;\$(pwd)/fx/bin/Unix.AnyCPU.Release;\$(pwd)/fx/bin/AnyOS.AnyCPU.Release\" \\
2172 --coreFxNativeBinDir=\"\$(pwd)/fx/bin/${osGroup}.${architecture}.Release\" \\
2173 --crossgen --runcrossgentests""")
2175 // Run coreclr tests w/ server GC & HeapVerify enabled
2176 shell("""./clr/tests/runtest.sh \\
2177 --testRootDir=\"\$(pwd)/clr/bin/tests/Windows_NT.${architecture}.${configuration}\" \\
2178 --testNativeBinDir=\"\$(pwd)/clr/bin/obj/${osGroup}.${architecture}.${configuration}/tests\" \\
2179 --coreOverlayDir=\"\$(pwd)/clr/bin/tests/Windows_NT.${architecture}.${configuration}/Tests/coreoverlay\" \\
2180 --useServerGC ${testEnvOpt}""")
2182 // Run long-running coreclr GC tests & produce coverage reports
2183 shell("""./clr/tests/runtest.sh \\
2184 --testRootDir=\"\$(pwd)/clr/bin/tests/Windows_NT.${architecture}.${configuration}\" \\
2185 --testNativeBinDir=\"\$(pwd)/clr/bin/obj/${osGroup}.${architecture}.${configuration}/tests\" \\
2186 --coreOverlayDir=\"\$(pwd)/clr/bin/tests/Windows_NT.${architecture}.${configuration}/Tests/coreoverlay\" \\
2187 --long-gc --playlist=\"\$(pwd)/clr/tests/longRunningGcTests.txt\" --coreclr-coverage\\
2188 --coreclr-objs=\"\$(pwd)/clr/bin/obj/${osGroup}.${architecture}.${configuration}\" \\
2189 --coreclr-src=\"\$(pwd)/clr/src\" \\
2190 --coverage-output-dir=\"\${WORKSPACE}/coverage\" """)
2195 // Coreclr build we are trying to test
2197 copyArtifacts(inputCoreCLRBuildName) {
2198 excludePatterns('**/testResults.xml', '**/*.ni.dll')
2200 buildNumber('${CORECLR_BUILD}')
2204 def corefxFolder = Utilities.getFolderName('dotnet/corefx') + '/' + Utilities.getFolderName(branch)
2206 // Corefx components. We now have full stack builds on all distros we test here, so we can copy straight from CoreFX jobs.
2207 def osJobName = (os == 'Ubuntu') ? 'ubuntu14.04' : os.toLowerCase()
2208 copyArtifacts("${corefxFolder}/${osJobName}_release") {
2209 includePatterns('bin/build.tar.gz')
2211 latestSuccessful(true)
2215 // Unpack the corefx binaries
2216 shell("tar -xf ./bin/build.tar.gz")
2218 // Unzip the tests first. Exit with 0
2219 shell("unzip -q -o ./bin/tests/tests.zip -d ./bin/tests/Windows_NT.${architecture}.${configuration} || exit 0")
2221 // Execute the tests
2222 // If we are running a stress mode, we'll set those variables first
2224 if (Constants.jitStressModeScenarios.containsKey(scenario)) {
2225 def scriptFileName = "\$WORKSPACE/set_stress_test_env.sh"
2226 def createScriptCmds = genStressModeScriptStep(os, scenario, Constants.jitStressModeScenarios[scenario], scriptFileName)
2227 if (createScriptCmds != "") {
2228 shell("${createScriptCmds}")
2229 testEnvOpt = "--test-env=" + scriptFileName
2233 if (isGCStressRelatedTesting(scenario)) {
2234 shell('./init-tools.sh')
2237 shell("""./tests/runtest.sh \\
2238 --testRootDir=\"\${WORKSPACE}/bin/tests/Windows_NT.${architecture}.${configuration}\" \\
2239 --testNativeBinDir=\"\${WORKSPACE}/bin/obj/${osGroup}.${architecture}.${configuration}/tests\" \\
2240 --coreClrBinDir=\"\${WORKSPACE}/bin/Product/${osGroup}.${architecture}.${configuration}\" \\
2241 --mscorlibDir=\"\${WORKSPACE}/bin/Product/${osGroup}.${architecture}.${configuration}\" \\
2242 --coreFxBinDir=\"\${WORKSPACE}/bin/${osGroup}.AnyCPU.Release;\${WORKSPACE}/bin/Unix.AnyCPU.Release;\${WORKSPACE}/bin/AnyOS.AnyCPU.Release\" \\
2243 --coreFxNativeBinDir=\"\${WORKSPACE}/bin/${osGroup}.${architecture}.Release\" \\
2244 --limitedDumpGeneration \\
2245 ${testEnvOpt} ${serverGCString} ${gcstressStr} ${crossgenStr} ${runcrossgentestsStr} ${runjitstressStr} ${runjitstressregsStr} ${runjitmioptsStr} ${runjitforcerelocsStr} ${sequentialString} ${playlistString}""")
2250 if (scenario == 'coverage') {
2251 // Publish coverage reports
2252 Utilities.addHtmlPublisher(newJob, '${WORKSPACE}/coverage/Coverage/reports', 'Code Coverage Report', 'coreclr.html')
2253 addEmailPublisher(newJob, 'clrcoverage@microsoft.com')
2256 // Experimental: If on Ubuntu 14.04, then attempt to pull in crash dump links
2257 if (os in ['Ubuntu']) {
2258 SummaryBuilder summaries = new SummaryBuilder()
2259 summaries.addLinksSummaryFromFile('Crash dumps from this run:', 'dumplings.txt')
2260 summaries.emit(newJob)
2263 setMachineAffinity(newJob, os, architecture)
2264 Utilities.standardJobSetup(newJob, project, isPR, "*/${branch}")
2265 // Set timeouts to 240.
2266 setTestJobTimeOut(newJob, scenario)
2267 Utilities.addXUnitDotNETResults(newJob, '**/coreclrtests.xml')
2269 // Create a build flow to join together the build and tests required to run this
2271 // Windows CoreCLR build and Linux CoreCLR build (in parallel) ->
2272 // Linux CoreCLR test
2273 def flowJobName = getJobName(configuration, architecture, os, scenario, false) + "_flow"
2274 def fullTestJobName = projectFolder + '/' + newJob.name
2275 // Add a reference to the input jobs for report purposes
2276 JobReport.Report.addReference(inputCoreCLRBuildName)
2277 JobReport.Report.addReference(inputWindowTestsBuildName)
2278 JobReport.Report.addReference(fullTestJobName)
2281 // If this is a coverage job, we don't copy any input coreCLR build - instead, we build it as part of the flow job,
2282 // so that coverage data can be preserved.
2283 if (scenario == 'coverage') {
2284 newFlowJob = buildFlowJob(Utilities.getFullJobName(project, flowJobName, isPR, folder)) {
2286 // Build the input Windows job
2287 windowsBuildJob = build(params, '${inputWindowTestsBuildName}')
2289 // And then build the test build
2290 build(params + [CORECLR_WINDOWS_BUILD: windowsBuildJob.build.number], '${fullTestJobName}')
2293 // Normal jobs copy a Windows build & a non-Windows build
2295 newFlowJob = buildFlowJob(Utilities.getFullJobName(project, flowJobName, isPR, folder)) {
2297 // Build the input jobs in parallel
2299 { coreclrBuildJob = build(params, '${inputCoreCLRBuildName}') },
2300 { windowsBuildJob = build(params, '${inputWindowTestsBuildName}') }
2303 // And then build the test build
2304 build(params + [CORECLR_BUILD: coreclrBuildJob.build.number,
2305 CORECLR_WINDOWS_BUILD: windowsBuildJob.build.number], '${fullTestJobName}')
2310 setMachineAffinity(newFlowJob, os, architecture)
2311 Utilities.standardJobSetup(newFlowJob, project, isPR, "*/${branch}")
2312 addTriggers(newFlowJob, branch, isPR, architecture, os, configuration, scenario, true, false, false)
2319 JobReport.Report.generateJobReport(out)