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',
18 'Ubuntu16.10': 'Linux',
22 'Windows_NT':'Windows_NT',
25 'OpenSUSE13.2': 'Linux',
26 'OpenSUSE42.1': 'Linux',
27 'LinuxARMEmulator': 'Linux']
28 def osGroup = osGroupMap.get(os, null)
29 assert osGroup != null : "Could not find os group for ${os}"
33 // We use this class (vs variables) so that the static functions can access data here.
36 // Innerloop build OS's
37 // The Windows_NT_BuildOnly OS is a way to speed up the Non-NT builds temporarily by avoiding
38 // test execution in the build flow runs. It generates the exact same build
39 // as Windows_NT but without the tests.
45 'Windows_NT_BuildOnly',
56 def static crossList = ['Ubuntu', 'OSX', 'CentOS7.1', 'RHEL7.2', 'Debian8.4', 'OpenSUSE13.2']
58 // This is a set of JIT stress modes combined with the set of variables that
59 // need to be set to actually enable that stress mode. The key of the map is the stress mode and
60 // the values are the environment variables
61 def static jitStressModeScenarios = [
62 'minopts' : ['COMPlus_JITMinOpts' : '1'],
63 'forcerelocs' : ['COMPlus_ForceRelocs' : '1'],
64 'jitstress1' : ['COMPlus_JitStress' : '1'],
65 'jitstress2' : ['COMPlus_JitStress' : '2'],
66 'jitstressregs1' : ['COMPlus_JitStressRegs' : '1'],
67 'jitstressregs2' : ['COMPlus_JitStressRegs' : '2'],
68 'jitstressregs3' : ['COMPlus_JitStressRegs' : '3'],
69 'jitstressregs4' : ['COMPlus_JitStressRegs' : '4'],
70 'jitstressregs8' : ['COMPlus_JitStressRegs' : '8'],
71 'jitstressregs0x10' : ['COMPlus_JitStressRegs' : '0x10'],
72 'jitstressregs0x80' : ['COMPlus_JitStressRegs' : '0x80'],
73 'jitstress2_jitstressregs1' : ['COMPlus_JitStress' : '2', 'COMPlus_JitStressRegs' : '1'],
74 'jitstress2_jitstressregs2' : ['COMPlus_JitStress' : '2', 'COMPlus_JitStressRegs' : '2'],
75 'jitstress2_jitstressregs3' : ['COMPlus_JitStress' : '2', 'COMPlus_JitStressRegs' : '3'],
76 'jitstress2_jitstressregs4' : ['COMPlus_JitStress' : '2', 'COMPlus_JitStressRegs' : '4'],
77 'jitstress2_jitstressregs8' : ['COMPlus_JitStress' : '2', 'COMPlus_JitStressRegs' : '8'],
78 'jitstress2_jitstressregs0x10' : ['COMPlus_JitStress' : '2', 'COMPlus_JitStressRegs' : '0x10'],
79 'jitstress2_jitstressregs0x80' : ['COMPlus_JitStress' : '2', 'COMPlus_JitStressRegs' : '0x80'],
80 'corefx_baseline' : [ : ], // corefx baseline
81 'corefx_minopts' : ['COMPlus_JITMinOpts' : '1'],
82 'corefx_jitstress1' : ['COMPlus_JitStress' : '1'],
83 'corefx_jitstress2' : ['COMPlus_JitStress' : '2'],
84 'corefx_jitstressregs1' : ['COMPlus_JitStressRegs' : '1'],
85 'corefx_jitstressregs2' : ['COMPlus_JitStressRegs' : '2'],
86 'corefx_jitstressregs3' : ['COMPlus_JitStressRegs' : '3'],
87 'corefx_jitstressregs4' : ['COMPlus_JitStressRegs' : '4'],
88 'corefx_jitstressregs8' : ['COMPlus_JitStressRegs' : '8'],
89 'corefx_jitstressregs0x10' : ['COMPlus_JitStressRegs' : '0x10'],
90 'corefx_jitstressregs0x80' : ['COMPlus_JitStressRegs' : '0x80'],
91 'gcstress0x3' : ['COMPlus_GCStress' : '0x3'],
92 'gcstress0xc' : ['COMPlus_GCStress' : '0xC'],
93 'zapdisable' : ['COMPlus_ZapDisable' : '1'],
94 'heapverify1' : ['COMPlus_HeapVerify' : '1'],
95 'gcstress0xc_zapdisable' : ['COMPlus_GCStress' : '0xC', 'COMPlus_ZapDisable' : '1'],
96 'gcstress0xc_zapdisable_jitstress2' : ['COMPlus_GCStress' : '0xC', 'COMPlus_ZapDisable' : '1', 'COMPlus_JitStress' : '2'],
97 'gcstress0xc_zapdisable_heapverify1' : ['COMPlus_GCStress' : '0xC', 'COMPlus_ZapDisable' : '1', 'COMPlus_HeapVerify' : '1'],
98 'gcstress0xc_jitstress1' : ['COMPlus_GCStress' : '0xC', 'COMPlus_JitStress' : '1'],
99 'gcstress0xc_jitstress2' : ['COMPlus_GCStress' : '0xC', 'COMPlus_JitStress' : '2'],
100 'gcstress0xc_minopts_heapverify1' : ['COMPlus_GCStress' : '0xC', 'COMPlus_JITMinOpts' : '1', 'COMPlus_HeapVerify' : '1']
103 // This is a set of r2r jit stress scenarios
104 def static r2rJitStressScenarios = [
107 'r2r_jitstressregs1',
108 'r2r_jitstressregs2',
109 'r2r_jitstressregs3',
110 'r2r_jitstressregs4',
111 'r2r_jitstressregs8',
112 'r2r_jitstressregsx10',
113 'r2r_jitstressregsx80',
115 'r2r_jitforcerelocs']
117 // This is the basic set of scenarios
118 def static basicScenarios = [
124 'gcstress15_pri1r2r',
130 'standalone_gc'] + r2rJitStressScenarios
132 def static configurationList = ['Debug', 'Checked', 'Release']
134 // This is the set of architectures
135 def static architectureList = ['arm', 'arm64', 'x64', 'x86', 'x86compatjit', 'x86lb']
138 def static setMachineAffinity(def job, def os, def architecture) {
139 if (architecture == 'arm64' && os == 'Windows_NT') {
140 // For cross compilation
144 } else if ((architecture == 'arm' || architecture == 'arm64') && os == 'Ubuntu') {
145 Utilities.setMachineAffinity(job, os, 'arm-cross-latest');
147 Utilities.setMachineAffinity(job, os, 'latest-or-auto');
151 def static isJITStressJob(def scenario) {
152 return Constants.jitStressModeScenarios.containsKey(scenario) ||
153 (Constants.r2rJitStressScenarios.indexOf(scenario) != -1)
156 def static isGCStressRelatedTesting(def scenario) {
157 // The 'gcstress15_pri1r2r' scenario is a basic scenario.
158 // Detect it and make it a GCStress related.
159 if (scenario == 'gcstress15_pri1r2r')
164 def gcStressTestEnvVars = [ 'COMPlus_GCStress', 'COMPlus_ZapDisable', 'COMPlus_HeapVerify']
165 def scenarioName = scenario.toLowerCase()
166 def isGCStressTesting = false
167 Constants.jitStressModeScenarios[scenario].each{ k, v ->
168 if (k in gcStressTestEnvVars) {
169 isGCStressTesting = true;
172 return isGCStressTesting
175 def static isCorefxTesting(def scenario) {
176 def corefx_prefix = 'corefx_'
177 if (scenario.length() < corefx_prefix.length()) {
180 return scenario.substring(0,corefx_prefix.length()) == corefx_prefix
183 def static isR2R(def scenario) {
184 return (scenario == 'r2r' || scenario == 'pri1r2r')
187 def static isCoverage(def scenario) {
188 return (scenario == 'coverage')
191 def static isLongGc(def scenario) {
192 return (scenario == 'longgc' || scenario == 'gcsimulator')
195 def static isJitDiff(def scenario) {
196 return (scenario == 'jitdiff')
199 def static setTestJobTimeOut(newJob, scenario) {
200 if (isGCStressRelatedTesting(scenario)) {
201 Utilities.setJobTimeout(newJob, 4320)
203 else if (isCorefxTesting(scenario)) {
204 Utilities.setJobTimeout(newJob, 360)
206 else if (Constants.jitStressModeScenarios.containsKey(scenario)) {
207 Utilities.setJobTimeout(newJob, 240)
209 else if (isR2R(scenario)) {
210 Utilities.setJobTimeout(newJob, 240)
212 else if (isCoverage(scenario)) {
213 Utilities.setJobTimeout(newJob, 1440)
215 else if (isLongGc(scenario)) {
216 Utilities.setJobTimeout(newJob, 1440)
218 else if (isJitDiff(scenario)) {
219 Utilities.setJobTimeout(newJob, 240)
221 // Non-test jobs use the default timeout value.
224 def static getStressModeDisplayName(def scenario) {
226 Constants.jitStressModeScenarios[scenario].each{ k, v ->
227 def prefixLength = 'COMPlus_'.length()
228 if (k.length() >= prefixLength) {
229 def modeName = k.substring(prefixLength, k.length())
230 displayStr += ' ' + modeName + '=' + v
236 // Generates the string for creating a file that sets environment variables
237 // that makes it possible to run stress modes. Writes the script to the file
238 // specified by the stepScriptLocation parameter.
239 def static genStressModeScriptStep(def os, def stressModeName, def stressModeVars, def stepScriptLocation) {
241 if (os == 'Windows_NT') {
242 stepScript += "echo Creating TestEnv Script for ${stressModeName}\r\n"
243 stepScript += "del ${stepScriptLocation}\r\n"
245 // Timeout in ms, default is 10 minutes. For stress
246 // modes up this to 30 minutes
247 def timeout = 1800000
250 stepScript += "set __TestTimeout=${timeout}\r\n"
251 stepScript += "echo. > ${stepScriptLocation}\r\n"
252 stressModeVars.each{ k, v ->
253 // Write out what we are writing to the script file
254 stepScript += "echo Setting ${k}=${v}\r\n"
255 // Write out the set itself to the script file`
256 stepScript += "echo set ${k}=${v} >> ${stepScriptLocation}\r\n"
260 stepScript += "echo Setting variables for ${stressModeName}\n"
261 stepScript += "echo \\#\\!/usr/bin/env bash > ${stepScriptLocation}\n"
262 stressModeVars.each{ k, v ->
263 // Write out what we are writing to the script file
264 stepScript += "echo Setting ${k}=${v}\n"
265 // Write out the set itself to the script file`
266 stepScript += "echo export ${k}=${v} >> ${stepScriptLocation}\n"
268 stepScript += "chmod +x ${stepScriptLocation}\n"
273 // Calculates the name of the build job based on some typical parameters.
275 def static getJobName(def configuration, def architecture, def os, def scenario, def isBuildOnly, def isLinuxEmulatorBuild = false) {
276 // If the architecture is x64, do not add that info into the build name.
277 // Need to change around some systems and other builds to pick up the right builds
280 def suffix = scenario != 'default' ? "_${scenario}" : '';
285 switch (architecture) {
287 if (scenario == 'default') {
288 // For now we leave x64 off of the name for compatibility with other jobs
289 baseName = configuration.toLowerCase() + '_' + os.toLowerCase()
291 else if (scenario == 'formatting') {
292 // we don't care about the configuration for the formatting job. It runs all configs
293 baseName = architecture.toLowerCase() + '_' + os.toLowerCase()
296 baseName = architecture.toLowerCase() + '_' + configuration.toLowerCase() + '_' + os.toLowerCase()
301 // These are cross builds
302 if (isLinuxEmulatorBuild == false) {
303 baseName = architecture.toLowerCase() + '_cross_' + configuration.toLowerCase() + '_' + os.toLowerCase()
306 baseName = architecture.toLowerCase() + '_emulator_cross_' + configuration.toLowerCase() + '_' + os.toLowerCase()
310 baseName = architecture.toLowerCase() + '_' + configuration.toLowerCase() + '_' + os.toLowerCase()
313 baseName = 'x86_compatjit_' + configuration.toLowerCase() + '_' + os.toLowerCase()
316 baseName = 'x86_lb_' + configuration.toLowerCase() + '_' + os.toLowerCase()
319 println("Unknown architecture: ${architecture}");
324 return baseName + suffix
327 def static addNonPRTriggers(def job, def branch, def isPR, def architecture, def os, def configuration, def scenario, def isFlowJob, def isWindowsBuildOnlyJob, def isLinuxEmulatorBuild, def bidailyCrossList) {
331 switch (architecture) {
336 if (isFlowJob || os == 'Windows_NT' || !(os in Constants.crossList)) {
337 Utilities.addGithubPushTrigger(job)
341 Utilities.addGithubPushTrigger(job)
344 if (os == 'Windows_NT') {
345 Utilities.addGithubPushTrigger(job)
346 // TODO: Add once external email sending is available again
347 // addEmailPublisher(job, 'dotnetonarm64@microsoft.com')
351 println("Unknown architecture: ${architecture}");
357 // Pri one gets a push trigger, and only for release
358 if (architecture == 'x64') {
359 if (configuration == 'Release') {
360 // We expect release jobs to be Windows, or in the cross list
361 assert (os == 'Windows_NT') || (os in Constants.crossList)
362 if (!os in bidailyCrossList) {
363 if (isFlowJob || os == 'Windows_NT') {
364 Utilities.addGithubPushTrigger(job)
369 Utilities.addPeriodicTrigger(job, 'H H/12 * * *')
376 //r2r jobs that aren't pri1 can only be triggered by phrase
379 assert !(os in bidailyCrossList)
380 //pri1 r2r gets a push trigger for checked/release
381 if (configuration == 'Checked' || configuration == 'Release') {
382 assert (os == 'Windows_NT') || (os in Constants.crossList)
383 if (architecture == 'x64' && os != 'OSX') {
384 //Flow jobs should be Windows, Ubuntu, OSX, or CentOS
385 if (isFlowJob || os == 'Windows_NT') {
386 Utilities.addGithubPushTrigger(job)
388 // OSX pri1r2r jobs should only run every 12 hours, not daily.
389 } else if (architecture == 'x64' && os == 'OSX'){
391 Utilities.addPeriodicTrigger(job, 'H H/12 * * *')
394 // For x86, only add per-commit jobs for Windows
395 else if (architecture == 'x86' || architecture == 'x86compatjit' || architecture == 'x86lb') {
396 if (os == 'Windows_NT') {
397 Utilities.addGithubPushTrigger(job)
400 // arm64 pri1r2r jobs should only run every 12 hours.
401 else if (architecture == 'arm64') {
402 if (os == 'Windows_NT') {
403 Utilities.addPeriodicTrigger(job, 'H H/12 * * *')
404 // TODO: Add once external email sending is available again
405 // addEmailPublisher(job, 'dotnetonarm64@microsoft.com')
410 case 'r2r_jitstress1':
411 case 'r2r_jitstress2':
412 case 'r2r_jitstressregs1':
413 case 'r2r_jitstressregs2':
414 case 'r2r_jitstressregs3':
415 case 'r2r_jitstressregs4':
416 case 'r2r_jitstressregs8':
417 case 'r2r_jitstressregsx10':
418 case 'r2r_jitstressregsx80':
419 case 'r2r_jitminopts':
420 case 'r2r_jitforcerelocs':
421 case 'gcstress15_pri1r2r':
422 assert !(os in bidailyCrossList)
424 // GCStress=C is currently not supported on OS X
425 if (os == 'OSX' && isGCStressRelatedTesting(scenario)) {
429 //GC Stress 15 pri1 r2r gets a push trigger for checked/release
430 if (configuration == 'Checked' || configuration == 'Release') {
431 assert (os == 'Windows_NT') || (os in Constants.crossList)
432 if (architecture == 'x64') {
433 //Flow jobs should be Windows, Ubuntu, OSX, or CentOS
434 if (isFlowJob || os == 'Windows_NT') {
435 // Add a weekly periodic trigger
436 Utilities.addPeriodicTrigger(job, 'H H * * 3,6') // some time every Wednesday and Saturday
439 // For x86, only add per-commit jobs for Windows
440 else if (architecture == 'x86' || architecture == 'x86compatjit' || architecture == 'x86lb') {
441 if (os == 'Windows_NT') {
442 Utilities.addPeriodicTrigger(job, 'H H * * 3,6') // some time every Wednesday and Saturday
448 assert (os == 'Ubuntu' || os == 'Windows_NT' || os == 'OSX')
449 assert configuration == 'Release'
450 assert architecture == 'x64'
451 Utilities.addPeriodicTrigger(job, '@daily')
452 // TODO: Add once external email sending is available again
453 // addEmailPublisher(job, 'dotnetgctests@microsoft.com')
456 assert (os == 'Ubuntu' || os == 'Windows_NT' || os == 'OSX')
457 assert configuration == 'Release'
458 assert architecture == 'x64'
459 Utilities.addPeriodicTrigger(job, 'H H * * 3,6') // some time every Wednesday and Saturday
460 // TODO: Add once external email sending is available again
461 // addEmailPublisher(job, 'dotnetgctests@microsoft.com')
463 case 'standalone_gc':
464 assert (os == 'Windows_NT')
465 assert (configuration == 'Release' || configuration == 'Checked')
466 // TODO: Add once external email sending is available again
467 // addEmailPublisher(job, 'dotnetgctests@microsoft.com')
468 Utilities.addPeriodicTrigger(job, '@weekly')
471 assert !(os in bidailyCrossList)
472 // ILASM/ILDASM roundtrip one gets a daily build, and only for release
473 if (architecture == 'x64' && configuration == 'Release') {
474 // We don't expect to see a job generated except in these scenarios
475 assert (os == 'Windows_NT') || (os in Constants.crossList)
476 if (isFlowJob || os == 'Windows_NT') {
477 Utilities.addPeriodicTrigger(job, '@daily')
482 assert (os == 'Ubuntu' || os == 'Windows_NT' || os == 'OSX')
483 assert configuration == 'Checked'
484 assert (architecture == 'x64' || architecture == 'x86')
485 Utilities.addGithubPushTrigger(job)
488 assert (os == 'Ubuntu' || os == 'Windows_NT')
489 assert configuration == 'Release'
490 assert architecture == 'x64'
491 Utilities.addPeriodicTrigger(job, '@weekly')
494 assert (os == 'Windows_NT' || os == "Ubuntu")
495 assert architecture == 'x64'
496 Utilities.addGithubPushTrigger(job)
498 case 'jitstressregs1':
499 case 'jitstressregs2':
500 case 'jitstressregs3':
501 case 'jitstressregs4':
502 case 'jitstressregs8':
503 case 'jitstressregs0x10':
504 case 'jitstressregs0x80':
509 case 'jitstress2_jitstressregs1':
510 case 'jitstress2_jitstressregs2':
511 case 'jitstress2_jitstressregs3':
512 case 'jitstress2_jitstressregs4':
513 case 'jitstress2_jitstressregs8':
514 case 'jitstress2_jitstressregs0x10':
515 case 'jitstress2_jitstressregs0x80':
516 case 'corefx_baseline':
517 case 'corefx_minopts':
518 case 'corefx_jitstress1':
519 case 'corefx_jitstress2':
520 case 'corefx_jitstressregs1':
521 case 'corefx_jitstressregs2':
522 case 'corefx_jitstressregs3':
523 case 'corefx_jitstressregs4':
524 case 'corefx_jitstressregs8':
525 case 'corefx_jitstressregs0x10':
526 case 'corefx_jitstressregs0x80':
528 if (os != 'CentOS7.1' && !(os in bidailyCrossList)) {
529 assert (os == 'Windows_NT') || (os in Constants.crossList)
530 Utilities.addPeriodicTrigger(job, '@daily')
535 if (os != 'CentOS7.1' && !(os in bidailyCrossList)) {
536 assert (os == 'Windows_NT') || (os in Constants.crossList)
537 if (architecture == 'arm64') {
538 assert (os == 'Windows_NT')
539 Utilities.addPeriodicTrigger(job, '@daily')
540 // TODO: Add once external email sending is available again
541 // addEmailPublisher(job, 'dotnetonarm64@microsoft.com')
544 Utilities.addPeriodicTrigger(job, '@weekly')
549 case 'gcstress0xc_zapdisable':
550 case 'gcstress0xc_zapdisable_jitstress2':
551 case 'gcstress0xc_zapdisable_heapverify1':
552 case 'gcstress0xc_jitstress1':
553 case 'gcstress0xc_jitstress2':
554 case 'gcstress0xc_minopts_heapverify1':
555 // GCStress=C is currently not supported on OS X
556 if (os != 'CentOS7.1' && os != 'OSX' && !(os in bidailyCrossList)) {
557 assert (os == 'Windows_NT') || (os in Constants.crossList)
558 if (architecture == 'arm64') {
559 assert (os == 'Windows_NT')
560 // TODO: Enable a periodic trigger after tests are updated.
561 // Utilities.addPeriodicTrigger(job, '@daily')
562 // TODO: Add once external email sending is available again
563 // addEmailPublisher(job, 'dotnetonarm64@microsoft.com')
566 Utilities.addPeriodicTrigger(job, '@weekly')
571 println("Unknown scenario: ${scenario}");
578 // **************************
579 // Define the basic inner loop builds for PR and commit. This is basically just the set
580 // of coreclr builds over linux/osx/freebsd/windows and debug/release/checked. In addition, the windows
581 // builds will do a couple extra steps.
582 // **************************
584 // Adds a trigger for the PR build if one is needed. If isFlowJob is true, then this is the
585 // flow job that rolls up the build and test for non-windows OS's. // If the job is a windows build only job,
586 // it's just used for internal builds
587 // If you add a job with a trigger phrase, please add that phrase to coreclr/Documentation/project-docs/ci-trigger-phrases.md
588 def static addTriggers(def job, def branch, def isPR, def architecture, def os, def configuration, def scenario, def isFlowJob, def isWindowsBuildOnlyJob, def isLinuxEmulatorBuild) {
589 if (isWindowsBuildOnlyJob) {
593 def bidailyCrossList = ['RHEL7.2', 'Debian8.4', 'OpenSUSE13.2']
594 // Non pull request builds.
596 addNonPRTriggers(job, branch, isPR, architecture, os, configuration, scenario, isFlowJob, isWindowsBuildOnlyJob, isLinuxEmulatorBuild, bidailyCrossList)
599 // Pull request builds. Generally these fall into two categories: default triggers and on-demand triggers
600 // We generally only have a distinct set of default triggers but a bunch of on-demand ones.
601 def osGroup = getOSGroup(os)
602 switch (architecture) {
603 case 'x64': // editor brace matching: {
604 if (scenario == 'coverage') {
605 assert configuration == 'Release'
606 if (os == 'Ubuntu') {
607 Utilities.addGithubPRTriggerForBranch(job, branch, "${os} ${architecture} ${configuration} Coverage Build & Test", "(?i).*test\\W+coverage.*")
612 if (scenario == 'formatting') {
613 assert configuration == 'Checked'
614 if (os == 'Windows_NT' || os == 'Ubuntu') {
615 Utilities.addGithubPRTriggerForBranch(job, branch, "${os} ${architecture} Formatting")
621 // OpenSUSE, Debian & RedHat get trigger phrases for pri 0 build, and pri 1 build & test
625 if (scenario == 'default') {
627 Utilities.addGithubPRTriggerForBranch(job, branch, "${os} ${architecture} ${configuration} Build", "(?i).*test\\W+${os}.*")
629 else if (scenario == 'pri1' && isFlowJob) {
630 assert (configuration == 'Release')
631 Utilities.addGithubPRTriggerForBranch(job, branch, "${os} ${architecture} ${configuration} Pri 1 Build & Test", "(?i).*test\\W+${os}\\W+${scenario}.*")
639 assert scenario == 'default'
640 Utilities.addGithubPRTriggerForBranch(job, branch, "${os} ${architecture} ${configuration} Build", "(?i).*test\\W+${os}\\W+.*")
644 // Triggers on the non-flow jobs aren't necessary here
645 // Corefx testing uses non-flow jobs.
646 if (!isFlowJob && !isCorefxTesting(scenario)) {
651 // Ubuntu uses checked for default PR tests
652 if (configuration == 'Checked') {
654 Utilities.addGithubPRTriggerForBranch(job, branch, "${os} ${architecture} ${configuration} Build and Test")
658 if (configuration == 'Release') {
659 Utilities.addGithubPRTriggerForBranch(job, branch, "${os} ${architecture} ${configuration} Priority 1 Build and Test", "(?i).*test\\W+${os}\\W+${scenario}.*")
663 if (configuration == 'Checked') {
664 Utilities.addGithubPRTriggerForBranch(job, branch, "${os} ${architecture} ${configuration} Jit Diff Build and Test", "(?i).*test\\W+${os}\\W+${scenario}.*")
668 if (configuration == 'Release') {
669 Utilities.addGithubPRTriggerForBranch(job, branch, "${os} ${architecture} ${configuration} IL RoundTrip Build and Test", "(?i).*test\\W+${os}\\W+${scenario}.*")
673 if (configuration == 'Release' || configuration == 'Checked') {
674 Utilities.addGithubPRTriggerForBranch(job, branch, "${os} ${architecture} ${configuration} R2R pri0 Build & Test", "(?i).*test\\W+${os}\\W+${configuration}\\W+${scenario}.*")
678 if (configuration == 'Release' || configuration == 'Checked') {
679 Utilities.addGithubPRTriggerForBranch(job, branch, "${os} ${architecture} ${configuration} R2R pri1 Build & Test", "(?i).*test\\W+${os}\\W+${configuration}\\W+${scenario}.*")
682 case 'gcstress15_pri1r2r':
683 if (configuration == 'Release' || configuration == 'Checked') {
684 Utilities.addGithubPRTriggerForBranch(job, branch, "${os} ${architecture} ${configuration} GCStress 15 R2R pri1 Build & Test", "(?i).*test\\W+${os}\\W+${configuration}\\W+${scenario}.*")
687 case 'r2r_jitstress1':
688 if (configuration == 'Release' || configuration == 'Checked') {
689 Utilities.addGithubPRTriggerForBranch(job, branch, "${os} ${architecture} ${configuration} jitstress1 R2R Build & Test", "(?i).*test\\W+${os}\\W+${configuration}\\W+${scenario}.*")
692 case 'r2r_jitstress2':
693 if (configuration == 'Release' || configuration == 'Checked') {
694 Utilities.addGithubPRTriggerForBranch(job, branch, "${os} ${architecture} ${configuration} jitstress2 R2R Build & Test", "(?i).*test\\W+${os}\\W+${configuration}\\W+${scenario}.*")
697 case 'r2r_jitstressregs1':
698 if (configuration == 'Release' || configuration == 'Checked') {
699 Utilities.addGithubPRTriggerForBranch(job, branch, "${os} ${architecture} ${configuration} jitstressregs1 R2R Build & Test", "(?i).*test\\W+${os}\\W+${configuration}\\W+${scenario}.*")
702 case 'r2r_jitstressregs2':
703 if (configuration == 'Release' || configuration == 'Checked') {
704 Utilities.addGithubPRTriggerForBranch(job, branch, "${os} ${architecture} ${configuration} jitstressregs2 R2R Build & Test", "(?i).*test\\W+${os}\\W+${configuration}\\W+${scenario}.*")
707 case 'r2r_jitstressregs3':
708 if (configuration == 'Release' || configuration == 'Checked') {
709 Utilities.addGithubPRTriggerForBranch(job, branch, "${os} ${architecture} ${configuration} jitstressregs3 R2R Build & Test", "(?i).*test\\W+${os}\\W+${configuration}\\W+${scenario}.*")
712 case 'r2r_jitstressregs4':
713 if (configuration == 'Release' || configuration == 'Checked') {
714 Utilities.addGithubPRTriggerForBranch(job, branch, "${os} ${architecture} ${configuration} jitstressregs4 R2R Build & Test", "(?i).*test\\W+${os}\\W+${configuration}\\W+${scenario}.*")
717 case 'r2r_jitstressregs8':
718 if (configuration == 'Release' || configuration == 'Checked') {
719 Utilities.addGithubPRTriggerForBranch(job, branch, "${os} ${architecture} ${configuration} jitstressregs8 R2R Build & Test", "(?i).*test\\W+${os}\\W+${configuration}\\W+${scenario}.*")
722 case 'r2r_jitstressregsx10':
723 if (configuration == 'Release' || configuration == 'Checked') {
724 Utilities.addGithubPRTriggerForBranch(job, branch, "${os} ${architecture} ${configuration} jitstressregsx10 R2R Build & Test", "(?i).*test\\W+${os}\\W+${configuration}\\W+${scenario}.*")
727 case 'r2r_jitstressregsx80':
728 if (configuration == 'Release' || configuration == 'Checked') {
729 Utilities.addGithubPRTriggerForBranch(job, branch, "${os} ${architecture} ${configuration} jitstressregsx80 R2R Build & Test", "(?i).*test\\W+${os}\\W+${configuration}\\W+${scenario}.*")
732 case 'r2r_jitminopts':
733 if (configuration == 'Release' || configuration == 'Checked') {
734 Utilities.addGithubPRTriggerForBranch(job, branch, "${os} ${architecture} ${configuration} JITMinOpts R2R Build & Test", "(?i).*test\\W+${os}\\W+${configuration}\\W+${scenario}.*")
737 case 'r2r_jitforcerelocs':
738 if (configuration == 'Release' || configuration == 'Checked') {
739 Utilities.addGithubPRTriggerForBranch(job, branch, "${os} ${architecture} ${configuration} ForceRelocs R2R Build & Test", "(?i).*test\\W+${os}\\W+${configuration}\\W+${scenario}.*")
743 if (configuration == 'Release') {
744 Utilities.addGithubPRTriggerForBranch(job, branch, "${os} ${architecture} ${configuration} Long-Running GC Build & Test", "(?i).*test\\W+${os}\\W+${configuration}\\W+${scenario}.*")
748 if (configuration == 'Release') {
749 Utilities.addGithubPRTriggerForBranch(job, branch, "${os} ${architecture} ${configuration} GC Simulator", "(?i).*test\\W+${os}\\W+${configuration}\\W+${scenario}.*")
753 assert (os == 'Windows_NT') || (os in Constants.crossList)
754 Utilities.addGithubPRTriggerForBranch(job, branch, "${os} ${architecture} ${configuration} Build and Test (Jit - MinOpts)",
755 "(?i).*test\\W+${os}\\W+${scenario}.*")
758 assert (os == 'Windows_NT') || (os in Constants.crossList)
759 Utilities.addGithubPRTriggerForBranch(job, branch, "${os} ${architecture} ${configuration} Build and Test (Jit - JitStress=1)",
760 "(?i).*test\\W+${os}\\W+${scenario}.*")
763 assert (os == 'Windows_NT') || (os in Constants.crossList)
764 Utilities.addGithubPRTriggerForBranch(job, branch, "${os} ${architecture} ${configuration} Build and Test (Jit - JitStress=2)",
765 "(?i).*test\\W+${os}\\W+${scenario}.*")
768 assert (os == 'Windows_NT') || (os in Constants.crossList)
769 Utilities.addGithubPRTriggerForBranch(job, branch, "${os} ${architecture} ${configuration} Build and Test (Jit - ForceRelocs)",
770 "(?i).*test\\W+${os}\\W+${scenario}.*")
771 case 'jitstressregs1':
772 assert (os == 'Windows_NT') || (os in Constants.crossList)
773 Utilities.addGithubPRTriggerForBranch(job, branch, "${os} ${architecture} ${configuration} Build and Test (Jit - JitStressRegs=1)",
774 "(?i).*test\\W+${os}\\W+${scenario}.*")
776 case 'jitstressregs2':
777 assert (os == 'Windows_NT') || (os in Constants.crossList)
778 Utilities.addGithubPRTriggerForBranch(job, branch, "${os} ${architecture} ${configuration} Build and Test (Jit - JitStressRegs=2)",
779 "(?i).*test\\W+${os}\\W+${scenario}.*")
781 case 'jitstressregs3':
782 assert (os == 'Windows_NT') || (os in Constants.crossList)
783 Utilities.addGithubPRTriggerForBranch(job, branch, "${os} ${architecture} ${configuration} Build and Test (Jit - JitStressRegs=3)",
784 "(?i).*test\\W+${os}\\W+${scenario}.*")
786 case 'jitstressregs4':
787 assert (os == 'Windows_NT') || (os in Constants.crossList)
788 Utilities.addGithubPRTriggerForBranch(job, branch, "${os} ${architecture} ${configuration} Build and Test (Jit - JitStressRegs=4)",
789 "(?i).*test\\W+${os}\\W+${scenario}.*")
791 case 'jitstressregs8':
792 assert (os == 'Windows_NT') || (os in Constants.crossList)
793 Utilities.addGithubPRTriggerForBranch(job, branch, "${os} ${architecture} ${configuration} Build and Test (Jit - JitStressRegs=8)",
794 "(?i).*test\\W+${os}\\W+${scenario}.*")
796 case 'jitstressregs0x10':
797 assert (os == 'Windows_NT') || (os in Constants.crossList)
798 Utilities.addGithubPRTriggerForBranch(job, branch, "${os} ${architecture} ${configuration} Build and Test (Jit - JitStressRegs=0x10)",
799 "(?i).*test\\W+${os}\\W+${scenario}.*")
801 case 'jitstressregs0x80':
802 assert (os == 'Windows_NT') || (os in Constants.crossList)
803 Utilities.addGithubPRTriggerForBranch(job, branch, "${os} ${architecture} ${configuration} Build and Test (Jit - JitStressRegs=0x80)",
804 "(?i).*test\\W+${os}\\W+${scenario}.*")
806 case 'jitstress2_jitstressregs1':
807 case 'jitstress2_jitstressregs2':
808 case 'jitstress2_jitstressregs3':
809 case 'jitstress2_jitstressregs4':
810 case 'jitstress2_jitstressregs8':
811 case 'jitstress2_jitstressregs0x10':
812 case 'jitstress2_jitstressregs0x80':
817 case 'gcstress0xc_zapdisable':
818 case 'gcstress0xc_zapdisable_jitstress2':
819 case 'gcstress0xc_zapdisable_heapverify1':
820 case 'gcstress0xc_jitstress1':
821 case 'gcstress0xc_jitstress2':
822 case 'gcstress0xc_minopts_heapverify1':
823 def displayStr = getStressModeDisplayName(scenario)
824 assert (os == 'Windows_NT') || (os in Constants.crossList)
825 Utilities.addGithubPRTriggerForBranch(job, branch, "${os} ${architecture} ${configuration} Build and Test (Jit - ${displayStr})",
826 "(?i).*test\\W+${os}\\W+${scenario}.*")
828 case 'corefx_baseline':
829 case 'corefx_minopts':
830 case 'corefx_jitstress1':
831 case 'corefx_jitstress2':
832 case 'corefx_jitstressregs1':
833 case 'corefx_jitstressregs2':
834 case 'corefx_jitstressregs3':
835 case 'corefx_jitstressregs4':
836 case 'corefx_jitstressregs8':
837 case 'corefx_jitstressregs0x10':
838 case 'corefx_jitstressregs0x80':
839 def displayName = 'CoreFx ' + getStressModeDisplayName(scenario)
840 assert (os == 'Windows_NT') || (os in Constants.crossList)
841 Utilities.addGithubPRTriggerForBranch(job, branch, "${os} ${architecture} ${configuration} Build and Test (Jit - ${displayName})",
842 "(?i).*test\\W+${os}\\W+${scenario}.*")
845 println("Unknown scenario: ${scenario}");
853 if (configuration == 'Release') {
854 Utilities.addGithubPRTriggerForBranch(job, branch, "${os} ${architecture} ${configuration} Priority 1 Build and Test", "(?i).*test\\W+${os}\\W+${scenario}.*")
858 if (configuration == 'Checked' || configuration == 'Release') {
859 Utilities.addGithubPRTriggerForBranch(job, branch, "${os} ${architecture} ${configuration} R2R pri0 Build & Test", "(?i).*test\\W+${os}\\W+${configuration}\\W+${scenario}.*")
863 if (configuration == 'Checked' || configuration == 'Release') {
864 Utilities.addGithubPRTriggerForBranch(job, branch, "${os} ${architecture} ${configuration} R2R pri1 Build & Test", "(?i).*test\\W+${os}\\W+${configuration}\\W+${scenario}.*")
867 case 'gcstress15_pri1r2r':
868 if (configuration == 'Release' || configuration == 'Checked') {
869 Utilities.addGithubPRTriggerForBranch(job, branch, "${os} ${architecture} ${configuration} GCStress 15 R2R pri1 Build & Test", "(?i).*test\\W+${os}\\W+${configuration}\\W+${scenario}.*")
872 case 'r2r_jitstress1':
873 if (configuration == 'Release' || configuration == 'Checked') {
874 Utilities.addGithubPRTriggerForBranch(job, branch, "${os} ${architecture} ${configuration} jitstress1 R2R Build & Test", "(?i).*test\\W+${os}\\W+${configuration}\\W+${scenario}.*")
877 case 'r2r_jitstress2':
878 if (configuration == 'Release' || configuration == 'Checked') {
879 Utilities.addGithubPRTriggerForBranch(job, branch, "${os} ${architecture} ${configuration} jitstress2 R2R Build & Test", "(?i).*test\\W+${os}\\W+${configuration}\\W+${scenario}.*")
882 case 'r2r_jitstressregs1':
883 if (configuration == 'Release' || configuration == 'Checked') {
884 Utilities.addGithubPRTriggerForBranch(job, branch, "${os} ${architecture} ${configuration} jitstressregs1 R2R Build & Test", "(?i).*test\\W+${os}\\W+${configuration}\\W+${scenario}.*")
887 case 'r2r_jitstressregs2':
888 if (configuration == 'Release' || configuration == 'Checked') {
889 Utilities.addGithubPRTriggerForBranch(job, branch, "${os} ${architecture} ${configuration} jitstressregs2 R2R Build & Test", "(?i).*test\\W+${os}\\W+${configuration}\\W+${scenario}.*")
892 case 'r2r_jitstressregs3':
893 if (configuration == 'Release' || configuration == 'Checked') {
894 Utilities.addGithubPRTriggerForBranch(job, branch, "${os} ${architecture} ${configuration} jitstressregs3 R2R Build & Test", "(?i).*test\\W+${os}\\W+${configuration}\\W+${scenario}.*")
897 case 'r2r_jitstressregs4':
898 if (configuration == 'Release' || configuration == 'Checked') {
899 Utilities.addGithubPRTriggerForBranch(job, branch, "${os} ${architecture} ${configuration} jitstressregs4 R2R Build & Test", "(?i).*test\\W+${os}\\W+${configuration}\\W+${scenario}.*")
902 case 'r2r_jitstressregs8':
903 if (configuration == 'Release' || configuration == 'Checked') {
904 Utilities.addGithubPRTriggerForBranch(job, branch, "${os} ${architecture} ${configuration} jitstressregs8 R2R Build & Test", "(?i).*test\\W+${os}\\W+${configuration}\\W+${scenario}.*")
907 case 'r2r_jitstressregsx10':
908 if (configuration == 'Release' || configuration == 'Checked') {
909 Utilities.addGithubPRTriggerForBranch(job, branch, "${os} ${architecture} ${configuration} jitstressregsx10 R2R Build & Test", "(?i).*test\\W+${os}\\W+${configuration}\\W+${scenario}.*")
912 case 'r2r_jitstressregsx80':
913 if (configuration == 'Release' || configuration == 'Checked') {
914 Utilities.addGithubPRTriggerForBranch(job, branch, "${os} ${architecture} ${configuration} jitstressregsx80 R2R Build & Test", "(?i).*test\\W+${os}\\W+${configuration}\\W+${scenario}.*")
917 case 'r2r_jitminopts':
918 if (configuration == 'Release' || configuration == 'Checked') {
919 Utilities.addGithubPRTriggerForBranch(job, branch, "${os} ${architecture} ${configuration} JITMinOpts R2R Build & Test", "(?i).*test\\W+${os}\\W+${configuration}\\W+${scenario}.*")
922 case 'r2r_jitforcerelocs':
923 if (configuration == 'Release' || configuration == 'Checked') {
924 Utilities.addGithubPRTriggerForBranch(job, branch, "${os} ${architecture} ${configuration} ForceRelocs R2R Build & Test", "(?i).*test\\W+${os}\\W+${configuration}\\W+${scenario}.*")
934 if (configuration == 'Debug') {
935 Utilities.addGithubPRTriggerForBranch(job, branch, "${os} ${architecture} ${configuration} Build and Test")
940 if (configuration == 'Release') {
941 Utilities.addGithubPRTriggerForBranch(job, branch, "${os} ${architecture} ${configuration} Priority 1 Build and Test")
945 if (configuration == 'Checked') {
946 Utilities.addGithubPRTriggerForBranch(job, branch, "${os} ${architecture} ${configuration} Jit Diff Build and Test", "(?i).*test\\W+${os}\\W+${scenario}.*")
950 if (configuration == 'Release') {
951 Utilities.addGithubPRTriggerForBranch(job, branch, "${os} ${architecture} ${configuration} IL RoundTrip Build and Test", "(?i).*test\\W+${os}\\W+${scenario}.*")
955 if (configuration == 'Checked' || configuration == 'Release') {
956 Utilities.addGithubPRTriggerForBranch(job, branch, "${os} ${architecture} ${configuration} R2R pri0 Build & Test", "(?i).*test\\W+${os}\\W+${configuration}\\W+${scenario}.*")
960 if (configuration == 'Checked' || configuration == 'Release') {
961 Utilities.addGithubPRTriggerForBranch(job, branch, "${os} ${architecture} ${configuration} R2R pri1 Build & Test", "(?i).*test\\W+${os}\\W+${configuration}\\W+${scenario}.*")
964 case 'gcstress15_pri1r2r':
965 if (configuration == 'Release' || configuration == 'Checked') {
966 Utilities.addGithubPRTriggerForBranch(job, branch, "${os} ${architecture} ${configuration} GCStress 15 R2R pri1 Build & Test", "(?i).*test\\W+${os}\\W+${configuration}\\W+${scenario}.*")
969 case 'r2r_jitstress1':
970 if (configuration == 'Release' || configuration == 'Checked') {
971 Utilities.addGithubPRTriggerForBranch(job, branch, "${os} ${architecture} ${configuration} jitstress1 R2R Build & Test", "(?i).*test\\W+${os}\\W+${configuration}\\W+${scenario}.*")
974 case 'r2r_jitstress2':
975 if (configuration == 'Release' || configuration == 'Checked') {
976 Utilities.addGithubPRTriggerForBranch(job, branch, "${os} ${architecture} ${configuration} jitstress2 R2R Build & Test", "(?i).*test\\W+${os}\\W+${configuration}\\W+${scenario}.*")
979 case 'r2r_jitstressregs1':
980 if (configuration == 'Release' || configuration == 'Checked') {
981 Utilities.addGithubPRTriggerForBranch(job, branch, "${os} ${architecture} ${configuration} jitstressregs1 R2R Build & Test", "(?i).*test\\W+${os}\\W+${configuration}\\W+${scenario}.*")
984 case 'r2r_jitstressregs2':
985 if (configuration == 'Release' || configuration == 'Checked') {
986 Utilities.addGithubPRTriggerForBranch(job, branch, "${os} ${architecture} ${configuration} jitstressregs2 R2R Build & Test", "(?i).*test\\W+${os}\\W+${configuration}\\W+${scenario}.*")
989 case 'r2r_jitstressregs3':
990 if (configuration == 'Release' || configuration == 'Checked') {
991 Utilities.addGithubPRTriggerForBranch(job, branch, "${os} ${architecture} ${configuration} jitstressregs3 R2R Build & Test", "(?i).*test\\W+${os}\\W+${configuration}\\W+${scenario}.*")
994 case 'r2r_jitstressregs4':
995 if (configuration == 'Release' || configuration == 'Checked') {
996 Utilities.addGithubPRTriggerForBranch(job, branch, "${os} ${architecture} ${configuration} jitstressregs4 R2R Build & Test", "(?i).*test\\W+${os}\\W+${configuration}\\W+${scenario}.*")
999 case 'r2r_jitstressregs8':
1000 if (configuration == 'Release' || configuration == 'Checked') {
1001 Utilities.addGithubPRTriggerForBranch(job, branch, "${os} ${architecture} ${configuration} jitstressregs8 R2R Build & Test", "(?i).*test\\W+${os}\\W+${configuration}\\W+${scenario}.*")
1004 case 'r2r_jitstressregsx10':
1005 if (configuration == 'Release' || configuration == 'Checked') {
1006 Utilities.addGithubPRTriggerForBranch(job, branch, "${os} ${architecture} ${configuration} jitstressregsx10 R2R Build & Test", "(?i).*test\\W+${os}\\W+${configuration}\\W+${scenario}.*")
1009 case 'r2r_jitstressregsx80':
1010 if (configuration == 'Release' || configuration == 'Checked') {
1011 Utilities.addGithubPRTriggerForBranch(job, branch, "${os} ${architecture} ${configuration} jitstressregsx80 R2R Build & Test", "(?i).*test\\W+${os}\\W+${configuration}\\W+${scenario}.*")
1014 case 'r2r_jitminopts':
1015 if (configuration == 'Release' || configuration == 'Checked') {
1016 Utilities.addGithubPRTriggerForBranch(job, branch, "${os} ${architecture} ${configuration} JITMinOpts R2R Build & Test", "(?i).*test\\W+${os}\\W+${configuration}\\W+${scenario}.*")
1019 case 'r2r_jitforcerelocs':
1020 if (configuration == 'Release' || configuration == 'Checked') {
1021 Utilities.addGithubPRTriggerForBranch(job, branch, "${os} ${architecture} ${configuration} ForceRelocs R2R Build & Test", "(?i).*test\\W+${os}\\W+${configuration}\\W+${scenario}.*")
1025 if (configuration == 'Release') {
1026 Utilities.addGithubPRTriggerForBranch(job, branch, "${os} ${architecture} ${configuration} Long-Running GC Build & Test", "(?i).*test\\W+${os}\\W+${configuration}\\W+${scenario}.*")
1030 if (configuration == 'Release') {
1031 Utilities.addGithubPRTriggerForBranch(job, branch, "${os} ${architecture} ${configuration} GC Simulator", "(?i).*test\\W+${os}\\W+${configuration}\\W+${scenario}.*")
1034 case 'standalone_gc':
1035 if (configuration == 'Release' || configuration == 'Checked') {
1036 Utilities.addGithubPRTriggerForBranch(job, branch, "${os} ${architecture} ${configuration} Standalone GC", "(?i).*test\\W+${os}\\W+${configuration}\\W+${scenario}.*")
1040 assert (os == 'Windows_NT') || (os in Constants.crossList)
1041 Utilities.addGithubPRTriggerForBranch(job, branch, "${os} ${architecture} ${configuration} Build and Test (Jit - MinOpts)",
1042 "(?i).*test\\W+${os}\\W+${scenario}.*")
1045 assert (os == 'Windows_NT') || (os in Constants.crossList)
1046 Utilities.addGithubPRTriggerForBranch(job, branch, "${os} ${architecture} ${configuration} Build and Test (Jit - ForceRelocs)",
1047 "(?i).*test\\W+${os}\\W+${scenario}.*")
1050 assert (os == 'Windows_NT') || (os in Constants.crossList)
1051 Utilities.addGithubPRTriggerForBranch(job, branch, "${os} ${architecture} ${configuration} Build and Test (Jit - JitStress=1)",
1052 "(?i).*test\\W+${os}\\W+${scenario}.*")
1055 assert (os == 'Windows_NT') || (os in Constants.crossList)
1056 Utilities.addGithubPRTriggerForBranch(job, branch, "${os} ${architecture} ${configuration} Build and Test (Jit - JitStress=2)",
1057 "(?i).*test\\W+${os}\\W+${scenario}.*")
1059 case 'jitstressregs1':
1060 assert (os == 'Windows_NT') || (os in Constants.crossList)
1061 Utilities.addGithubPRTriggerForBranch(job, branch, "${os} ${architecture} ${configuration} Build and Test (Jit - JitStressRegs=1)",
1062 "(?i).*test\\W+${os}\\W+${scenario}.*")
1064 case 'jitstressregs2':
1065 assert (os == 'Windows_NT') || (os in Constants.crossList)
1066 Utilities.addGithubPRTriggerForBranch(job, branch, "${os} ${architecture} ${configuration} Build and Test (Jit - JitStressRegs=2)",
1067 "(?i).*test\\W+${os}\\W+${scenario}.*")
1069 case 'jitstressregs3':
1070 assert (os == 'Windows_NT') || (os in Constants.crossList)
1071 Utilities.addGithubPRTriggerForBranch(job, branch, "${os} ${architecture} ${configuration} Build and Test (Jit - JitStressRegs=3)",
1072 "(?i).*test\\W+${os}\\W+${scenario}.*")
1074 case 'jitstressregs4':
1075 assert (os == 'Windows_NT') || (os in Constants.crossList)
1076 Utilities.addGithubPRTriggerForBranch(job, branch, "${os} ${architecture} ${configuration} Build and Test (Jit - JitStressRegs=4)",
1077 "(?i).*test\\W+${os}\\W+${scenario}.*")
1079 case 'jitstressregs8':
1080 assert (os == 'Windows_NT') || (os in Constants.crossList)
1081 Utilities.addGithubPRTriggerForBranch(job, branch, "${os} ${architecture} ${configuration} Build and Test (Jit - JitStressRegs=8)",
1082 "(?i).*test\\W+${os}\\W+${scenario}.*")
1084 case 'jitstressregs0x10':
1085 assert (os == 'Windows_NT') || (os in Constants.crossList)
1086 Utilities.addGithubPRTriggerForBranch(job, branch, "${os} ${architecture} ${configuration} Build and Test (Jit - JitStressRegs=0x10)",
1087 "(?i).*test\\W+${os}\\W+${scenario}.*")
1089 case 'jitstressregs0x80':
1090 assert (os == 'Windows_NT') || (os in Constants.crossList)
1091 Utilities.addGithubPRTriggerForBranch(job, branch, "${os} ${architecture} ${configuration} Build and Test (Jit - JitStressRegs=0x80)",
1092 "(?i).*test\\W+${os}\\W+${scenario}.*")
1094 case 'jitstress2_jitstressregs1':
1095 case 'jitstress2_jitstressregs2':
1096 case 'jitstress2_jitstressregs3':
1097 case 'jitstress2_jitstressregs4':
1098 case 'jitstress2_jitstressregs8':
1099 case 'jitstress2_jitstressregs0x10':
1100 case 'jitstress2_jitstressregs0x80':
1105 case 'gcstress0xc_zapdisable':
1106 case 'gcstress0xc_zapdisable_jitstress2':
1107 case 'gcstress0xc_zapdisable_heapverify1':
1108 case 'gcstress0xc_jitstress1':
1109 case 'gcstress0xc_jitstress2':
1110 case 'gcstress0xc_minopts_heapverify1':
1111 def displayStr = getStressModeDisplayName(scenario)
1112 assert (os == 'Windows_NT') || (os in Constants.crossList)
1113 Utilities.addGithubPRTriggerForBranch(job, branch, "${os} ${architecture} ${configuration} Build and Test (Jit - ${displayStr})",
1114 "(?i).*test\\W+${os}\\W+${scenario}.*")
1116 case 'corefx_baseline':
1117 case 'corefx_minopts':
1118 case 'corefx_jitstress1':
1119 case 'corefx_jitstress2':
1120 case 'corefx_jitstressregs1':
1121 case 'corefx_jitstressregs2':
1122 case 'corefx_jitstressregs3':
1123 case 'corefx_jitstressregs4':
1124 case 'corefx_jitstressregs8':
1125 case 'corefx_jitstressregs0x10':
1126 case 'corefx_jitstressregs0x80':
1127 def displayName = 'CoreFx ' + getStressModeDisplayName(scenario)
1128 assert (os == 'Windows_NT') || (os in Constants.crossList)
1129 Utilities.addGithubPRTriggerForBranch(job, branch, "${os} ${architecture} ${configuration} Build and Test (Jit - ${displayName})",
1130 "(?i).*test\\W+${os}\\W+${scenario}.*")
1133 println("Unknown scenario: ${scenario}");
1139 assert scenario == 'default'
1140 if (configuration == 'Checked') {
1141 Utilities.addGithubPRTriggerForBranch(job, branch, "${os} ${architecture} ${configuration} Build")
1145 println("Unknown os: ${os}");
1150 // editor brace matching: }
1151 case 'arm': // editor brace matching: {
1152 assert scenario == 'default'
1155 if (isLinuxEmulatorBuild == false) {
1156 // Removing the regex will cause this to run on each PR.
1157 Utilities.addGithubPRTriggerForBranch(job, branch, "${os} ${architecture} Cross ${configuration} Build", "(?i).*test\\W+Linux\\W+arm\\W+cross\\W+${configuration}.*")
1160 Utilities.addGithubPRTriggerForBranch(job, branch, "Linux ARM Emulator Cross ${configuration} Build")
1164 if (configuration == 'Debug' || configuration == 'Release')
1166 Utilities.addGithubPRTriggerForBranch(job, branch, "${os} ${architecture} Cross ${configuration} Build")
1170 println("NYI os: ${os}");
1175 // editor brace matching: }
1176 case 'arm64': // editor brace matching: {
1177 assert (scenario == 'default') || (scenario == 'pri1r2r') || (scenario == 'gcstress0x3') || (scenario == 'gcstress0xc')
1179 // Set up a private trigger
1180 def contextString = "${os} ${architecture} Cross ${configuration}"
1181 if (scenario != 'default')
1182 contextString += " ${scenario}"
1183 contextString += " Build"
1184 // Debug builds only.
1185 if (configuration != 'Debug') {
1186 contextString += " and Test"
1189 def arm64Users = ['erozenfeld', 'kyulee1', 'pgavlin', 'russellhadley', 'swaroop-sridhar', 'JosephTremoulet', 'jashook', 'RussKeldorph', 'gkhanna79', 'briansull', 'cmckinsey', 'jkotas', 'ramarag', 'markwilkie', 'rahku', 'tzwlai', 'weshaggard']
1194 Utilities.addPrivateGithubPRTriggerForBranch(job, branch, contextString,
1195 "(?i).*test\\W+${os}\\W+${architecture}\\W+${configuration}.*", null, arm64Users)
1200 Utilities.addPrivateGithubPRTriggerForBranch(job, branch, contextString,
1201 "(?i).*test\\W+${os}\\W+${architecture}\\W+${configuration}\\W+${scenario}.*", null, arm64Users)
1206 println("NYI os: ${os}");
1211 // editor brace matching: }
1212 case 'x86': // editor brace matching: {
1213 assert (os == 'Windows_NT')
1216 if (configuration == 'Checked') {
1217 Utilities.addGithubPRTriggerForBranch(job, branch, "${os} ${architecture} ${configuration} Build and Test")
1221 if (configuration == 'Release') {
1222 Utilities.addGithubPRTriggerForBranch(job, branch, "${os} ${architecture} ${configuration} Priority 1 Build and Test")
1226 if (configuration == 'Release') {
1227 Utilities.addGithubPRTriggerForBranch(job, branch, "${os} ${architecture} ${configuration} IL RoundTrip Build and Test",
1228 "(?i).*test\\W+${os}\\W+${architecture}\\W+${configuration}\\W+${scenario}.*")
1232 if (configuration == 'Checked' || configuration == 'Release') {
1233 Utilities.addGithubPRTriggerForBranch(job, branch, "${os} ${architecture} ${configuration} R2R pri0 Build & Test",
1234 "(?i).*test\\W+${os}\\W+${architecture}\\W+${configuration}\\W+${scenario}.*")
1238 if (configuration == 'Checked' || configuration == 'Release') {
1239 Utilities.addGithubPRTriggerForBranch(job, branch, "${os} ${architecture} ${configuration} R2R pri1 Build & Test",
1240 "(?i).*test\\W+${os}\\W+${architecture}\\W+${configuration}\\W+${scenario}.*")
1243 case 'gcstress15_pri1r2r':
1244 if (configuration == 'Release' || configuration == 'Checked') {
1245 Utilities.addGithubPRTriggerForBranch(job, branch, "${os} ${architecture} ${configuration} GCStress 15 R2R pri1 Build & Test",
1246 "(?i).*test\\W+${os}\\W+${architecture}\\W+${configuration}\\W+${scenario}.*")
1249 case 'r2r_jitstress1':
1250 if (configuration == 'Release' || configuration == 'Checked') {
1251 Utilities.addGithubPRTriggerForBranch(job, branch, "${os} ${architecture} ${configuration} jitstress1 R2R Build & Test",
1252 "(?i).*test\\W+${os}\\W+${architecture}\\W+${configuration}\\W+${scenario}.*")
1255 case 'r2r_jitstress2':
1256 if (configuration == 'Release' || configuration == 'Checked') {
1257 Utilities.addGithubPRTriggerForBranch(job, branch, "${os} ${architecture} ${configuration} jitstress2 R2R Build & Test",
1258 "(?i).*test\\W+${os}\\W+${architecture}\\W+${configuration}\\W+${scenario}.*")
1261 case 'r2r_jitstressregs1':
1262 if (configuration == 'Release' || configuration == 'Checked') {
1263 Utilities.addGithubPRTriggerForBranch(job, branch, "${os} ${architecture} ${configuration} jitstressregs1 R2R Build & Test",
1264 "(?i).*test\\W+${os}\\W+${architecture}\\W+${configuration}\\W+${scenario}.*")
1267 case 'r2r_jitstressregs2':
1268 if (configuration == 'Release' || configuration == 'Checked') {
1269 Utilities.addGithubPRTriggerForBranch(job, branch, "${os} ${architecture} ${configuration} jitstressregs2 R2R Build & Test",
1270 "(?i).*test\\W+${os}\\W+${architecture}\\W+${configuration}\\W+${scenario}.*")
1273 case 'r2r_jitstressregs3':
1274 if (configuration == 'Release' || configuration == 'Checked') {
1275 Utilities.addGithubPRTriggerForBranch(job, branch, "${os} ${architecture} ${configuration} jitstressregs3 R2R Build & Test",
1276 "(?i).*test\\W+${os}\\W+${architecture}\\W+${configuration}\\W+${scenario}.*")
1279 case 'r2r_jitstressregs4':
1280 if (configuration == 'Release' || configuration == 'Checked') {
1281 Utilities.addGithubPRTriggerForBranch(job, branch, "${os} ${architecture} ${configuration} jitstressregs4 R2R Build & Test",
1282 "(?i).*test\\W+${os}\\W+${architecture}\\W+${configuration}\\W+${scenario}.*")
1285 case 'r2r_jitstressregs8':
1286 if (configuration == 'Release' || configuration == 'Checked') {
1287 Utilities.addGithubPRTriggerForBranch(job, branch, "${os} ${architecture} ${configuration} jitstressregs8 R2R Build & Test",
1288 "(?i).*test\\W+${os}\\W+${architecture}\\W+${configuration}\\W+${scenario}.*")
1291 case 'r2r_jitstressregsx10':
1292 if (configuration == 'Release' || configuration == 'Checked') {
1293 Utilities.addGithubPRTriggerForBranch(job, branch, "${os} ${architecture} ${configuration} jitstressregsx10 R2R Build & Test",
1294 "(?i).*test\\W+${os}\\W+${architecture}\\W+${configuration}\\W+${scenario}.*")
1297 case 'r2r_jitstressregsx80':
1298 if (configuration == 'Release' || configuration == 'Checked') {
1299 Utilities.addGithubPRTriggerForBranch(job, branch, "${os} ${architecture} ${configuration} jitstressregsx80 R2R Build & Test",
1300 "(?i).*test\\W+${os}\\W+${architecture}\\W+${configuration}\\W+${scenario}.*")
1303 case 'r2r_jitminopts':
1304 if (configuration == 'Release' || configuration == 'Checked') {
1305 Utilities.addGithubPRTriggerForBranch(job, branch, "${os} ${architecture} ${configuration} JITMinOpts R2R Build & Test",
1306 "(?i).*test\\W+${os}\\W+${architecture}\\W+${configuration}\\W+${scenario}.*")
1309 case 'r2r_jitforcerelocs':
1310 if (configuration == 'Release' || configuration == 'Checked') {
1311 Utilities.addGithubPRTriggerForBranch(job, branch, "${os} ${architecture} ${configuration} ForceRelocs R2R Build & Test",
1312 "(?i).*test\\W+${os}\\W+${architecture}\\W+${configuration}\\W+${scenario}.*")
1316 if (configuration == 'Release') {
1317 Utilities.addGithubPRTriggerForBranch(job, branch, "${os} ${architecture} ${configuration} Long-Running GC Build & Test",
1318 "(?i).*test\\W+${os}\\W+${architecture}\\W+${configuration}\\W+${scenario}.*")
1322 if (configuration == 'Release') {
1323 Utilities.addGithubPRTriggerForBranch(job, branch, "${os} ${architecture} ${configuration} GC Simulator",
1324 "(?i).*test\\W+${os}\\W+${architecture}\\W+${configuration}\\W+${scenario}.*")
1327 case 'standalone_gc':
1328 if (configuration == 'Release' || configuration == 'Checked') {
1329 Utilities.addGithubPRTriggerForBranch(job, branch, "${os} ${architecture} ${configuration} Standalone GC",
1330 "(?i).*test\\W+${os}\\W+${architecture}\\W+${configuration}\\W+${scenario}.*")
1334 Utilities.addGithubPRTriggerForBranch(job, branch, "${os} ${architecture} ${configuration} Build and Test (Jit - MinOpts)",
1335 "(?i).*test\\W+${os}\\W+${architecture}\\W+${configuration}\\W+${scenario}.*")
1338 Utilities.addGithubPRTriggerForBranch(job, branch, "${os} ${architecture} ${configuration} Build and Test (Jit - ForceRelocs)",
1339 "(?i).*test\\W+${os}\\W+${architecture}\\W+${configuration}\\W+${scenario}.*")
1342 Utilities.addGithubPRTriggerForBranch(job, branch, "${os} ${architecture} ${configuration} Build and Test (Jit - JitStress=1)",
1343 "(?i).*test\\W+${os}\\W+${architecture}\\W+${configuration}\\W+${scenario}.*")
1346 Utilities.addGithubPRTriggerForBranch(job, branch, "${os} ${architecture} ${configuration} Build and Test (Jit - JitStress=2)",
1347 "(?i).*test\\W+${os}\\W+${architecture}\\W+${configuration}\\W+${scenario}.*")
1349 case 'jitstressregs1':
1350 Utilities.addGithubPRTriggerForBranch(job, branch, "${os} ${architecture} ${configuration} Build and Test (Jit - JitStressRegs=1)",
1351 "(?i).*test\\W+${os}\\W+${architecture}\\W+${configuration}\\W+${scenario}.*")
1353 case 'jitstressregs2':
1354 Utilities.addGithubPRTriggerForBranch(job, branch, "${os} ${architecture} ${configuration} Build and Test (Jit - JitStressRegs=2)",
1355 "(?i).*test\\W+${os}\\W+${architecture}\\W+${configuration}\\W+${scenario}.*")
1357 case 'jitstressregs3':
1358 Utilities.addGithubPRTriggerForBranch(job, branch, "${os} ${architecture} ${configuration} Build and Test (Jit - JitStressRegs=3)",
1359 "(?i).*test\\W+${os}\\W+${architecture}\\W+${configuration}\\W+${scenario}.*")
1361 case 'jitstressregs4':
1362 Utilities.addGithubPRTriggerForBranch(job, branch, "${os} ${architecture} ${configuration} Build and Test (Jit - JitStressRegs=4)",
1363 "(?i).*test\\W+${os}\\W+${architecture}\\W+${configuration}\\W+${scenario}.*")
1365 case 'jitstressregs8':
1366 Utilities.addGithubPRTriggerForBranch(job, branch, "${os} ${architecture} ${configuration} Build and Test (Jit - JitStressRegs=8)",
1367 "(?i).*test\\W+${os}\\W+${architecture}\\W+${configuration}\\W+${scenario}.*")
1369 case 'jitstressregs0x10':
1370 Utilities.addGithubPRTriggerForBranch(job, branch, "${os} ${architecture} ${configuration} Build and Test (Jit - JitStressRegs=0x10)",
1371 "(?i).*test\\W+${os}\\W+${architecture}\\W+${configuration}\\W+${scenario}.*")
1373 case 'jitstressregs0x80':
1374 Utilities.addGithubPRTriggerForBranch(job, branch, "${os} ${architecture} ${configuration} Build and Test (Jit - JitStressRegs=0x80)",
1375 "(?i).*test\\W+${os}\\W+${architecture}\\W+${configuration}\\W+${scenario}.*")
1377 case 'jitstress2_jitstressregs1':
1378 case 'jitstress2_jitstressregs2':
1379 case 'jitstress2_jitstressregs3':
1380 case 'jitstress2_jitstressregs4':
1381 case 'jitstress2_jitstressregs8':
1382 case 'jitstress2_jitstressregs0x10':
1383 case 'jitstress2_jitstressregs0x80':
1388 case 'gcstress0xc_zapdisable':
1389 case 'gcstress0xc_zapdisable_jitstress2':
1390 case 'gcstress0xc_zapdisable_heapverify1':
1391 case 'gcstress0xc_jitstress1':
1392 case 'gcstress0xc_jitstress2':
1393 case 'gcstress0xc_minopts_heapverify1':
1394 def displayStr = getStressModeDisplayName(scenario)
1395 Utilities.addGithubPRTriggerForBranch(job, branch, "${os} ${architecture} ${configuration} Build and Test (Jit - ${displayStr})",
1396 "(?i).*test\\W+${os}\\W+${architecture}\\W+${configuration}\\W+${scenario}.*")
1398 case 'corefx_baseline':
1399 case 'corefx_minopts':
1400 case 'corefx_jitstress1':
1401 case 'corefx_jitstress2':
1402 case 'corefx_jitstressregs1':
1403 case 'corefx_jitstressregs2':
1404 case 'corefx_jitstressregs3':
1405 case 'corefx_jitstressregs4':
1406 case 'corefx_jitstressregs8':
1407 case 'corefx_jitstressregs0x10':
1408 case 'corefx_jitstressregs0x80':
1409 def displayName = 'CoreFx ' + getStressModeDisplayName(scenario)
1410 assert (os == 'Windows_NT') || (os in Constants.crossList)
1411 Utilities.addGithubPRTriggerForBranch(job, branch, "${os} ${architecture} ${configuration} Build and Test (Jit - ${displayName})",
1412 "(?i).*test\\W+${os}\\W+${scenario}.*")
1415 println("Unknown scenario: ${os} ${architecture} ${scenario}");
1420 // editor brace matching: }
1421 case 'x86compatjit': // editor brace matching: {
1422 assert (os == 'Windows_NT')
1424 def jit = 'compatjit'
1427 if (configuration == 'Checked') {
1428 Utilities.addGithubPRTriggerForBranch(job, branch, "${os} ${arch} ${jit} ${configuration} Build and Test",
1429 "(?i).*test\\W+${os}\\W+${arch}\\W+${jit}\\W+${configuration}.*")
1433 if (configuration == 'Release') {
1434 Utilities.addGithubPRTriggerForBranch(job, branch, "${os} ${arch} ${jit} ${configuration} Priority 1 Build and Test",
1435 "(?i).*test\\W+${os}\\W+${arch}\\W+${jit}\\W+${configuration}\\W+Priority 1 Build and Test.*")
1439 if (configuration == 'Release') {
1440 Utilities.addGithubPRTriggerForBranch(job, branch, "${os} ${arch} ${jit} ${configuration} IL RoundTrip Build and Test",
1441 "(?i).*test\\W+${os}\\W+${arch}\\W+${jit}\\W+${configuration}\\W+${scenario}.*")
1445 if (configuration == 'Checked' || configuration == 'Release') {
1446 Utilities.addGithubPRTriggerForBranch(job, branch, "${os} ${arch} ${jit} ${configuration} R2R pri0 Build & Test",
1447 "(?i).*test\\W+${os}\\W+${arch}\\W+${jit}\\W+${configuration}\\W+${scenario}.*")
1451 if (configuration == 'Checked' || configuration == 'Release') {
1452 Utilities.addGithubPRTriggerForBranch(job, branch, "${os} ${arch} ${jit} ${configuration} R2R pri1 Build & Test",
1453 "(?i).*test\\W+${os}\\W+${arch}\\W+${jit}\\W+${configuration}\\W+${scenario}.*")
1456 case 'gcstress15_pri1r2r':
1457 if (configuration == 'Release' || configuration == 'Checked') {
1458 Utilities.addGithubPRTriggerForBranch(job, branch, "${os} ${arch} ${jit} ${configuration} GCStress 15 R2R pri1 Build & Test",
1459 "(?i).*test\\W+${os}\\W+${arch}\\W+${jit}\\W+${configuration}\\W+${scenario}.*")
1462 case 'r2r_jitstress1':
1463 if (configuration == 'Release' || configuration == 'Checked') {
1464 Utilities.addGithubPRTriggerForBranch(job, branch, "${os} ${arch} ${jit} ${configuration} jitstress1 R2R Build & Test",
1465 "(?i).*test\\W+${os}\\W+${arch}\\W+${jit}\\W+${configuration}\\W+${scenario}.*")
1468 case 'r2r_jitstress2':
1469 if (configuration == 'Release' || configuration == 'Checked') {
1470 Utilities.addGithubPRTriggerForBranch(job, branch, "${os} ${arch} ${jit} ${configuration} jitstress2 R2R Build & Test",
1471 "(?i).*test\\W+${os}\\W+${arch}\\W+${jit}\\W+${configuration}\\W+${scenario}.*")
1474 case 'r2r_jitstressregs1':
1475 if (configuration == 'Release' || configuration == 'Checked') {
1476 Utilities.addGithubPRTriggerForBranch(job, branch, "${os} ${arch} ${jit} ${configuration} jitstressregs1 R2R Build & Test",
1477 "(?i).*test\\W+${os}\\W+${arch}\\W+${jit}\\W+${configuration}\\W+${scenario}.*")
1480 case 'r2r_jitstressregs2':
1481 if (configuration == 'Release' || configuration == 'Checked') {
1482 Utilities.addGithubPRTriggerForBranch(job, branch, "${os} ${arch} ${jit} ${configuration} jitstressregs2 R2R Build & Test",
1483 "(?i).*test\\W+${os}\\W+${arch}\\W+${jit}\\W+${configuration}\\W+${scenario}.*")
1486 case 'r2r_jitstressregs3':
1487 if (configuration == 'Release' || configuration == 'Checked') {
1488 Utilities.addGithubPRTriggerForBranch(job, branch, "${os} ${arch} ${jit} ${configuration} jitstressregs3 R2R Build & Test",
1489 "(?i).*test\\W+${os}\\W+${arch}\\W+${jit}\\W+${configuration}\\W+${scenario}.*")
1492 case 'r2r_jitstressregs4':
1493 if (configuration == 'Release' || configuration == 'Checked') {
1494 Utilities.addGithubPRTriggerForBranch(job, branch, "${os} ${arch} ${jit} ${configuration} jitstressregs4 R2R Build & Test",
1495 "(?i).*test\\W+${os}\\W+${arch}\\W+${jit}\\W+${configuration}\\W+${scenario}.*")
1498 case 'r2r_jitstressregs8':
1499 if (configuration == 'Release' || configuration == 'Checked') {
1500 Utilities.addGithubPRTriggerForBranch(job, branch, "${os} ${arch} ${jit} ${configuration} jitstressregs8 R2R Build & Test",
1501 "(?i).*test\\W+${os}\\W+${arch}\\W+${jit}\\W+${configuration}\\W+${scenario}.*")
1504 case 'r2r_jitstressregsx10':
1505 if (configuration == 'Release' || configuration == 'Checked') {
1506 Utilities.addGithubPRTriggerForBranch(job, branch, "${os} ${arch} ${jit} ${configuration} jitstressregsx10 R2R Build & Test",
1507 "(?i).*test\\W+${os}\\W+${arch}\\W+${jit}\\W+${configuration}\\W+${scenario}.*")
1510 case 'r2r_jitstressregsx80':
1511 if (configuration == 'Release' || configuration == 'Checked') {
1512 Utilities.addGithubPRTriggerForBranch(job, branch, "${os} ${arch} ${jit} ${configuration} jitstressregsx80 R2R Build & Test",
1513 "(?i).*test\\W+${os}\\W+${arch}\\W+${jit}\\W+${configuration}\\W+${scenario}.*")
1516 case 'r2r_jitminopts':
1517 if (configuration == 'Release' || configuration == 'Checked') {
1518 Utilities.addGithubPRTriggerForBranch(job, branch, "${os} ${arch} ${jit} ${configuration} JITMinOpts R2R Build & Test",
1519 "(?i).*test\\W+${os}\\W+${arch}\\W+${jit}\\W+${configuration}\\W+${scenario}.*")
1522 case 'r2r_jitforcerelocs':
1523 if (configuration == 'Release' || configuration == 'Checked') {
1524 Utilities.addGithubPRTriggerForBranch(job, branch, "${os} ${arch} ${jit} ${configuration} ForceRelocs R2R Build & Test",
1525 "(?i).*test\\W+${os}\\W+${arch}\\W+${jit}\\W+${configuration}\\W+${scenario}.*")
1529 if (configuration == 'Release') {
1530 Utilities.addGithubPRTriggerForBranch(job, branch, "${os} ${arch} ${jit} ${configuration} Long-Running GC Build & Test",
1531 "(?i).*test\\W+${os}\\W+${arch}\\W+${jit}\\W+${configuration}\\W+${scenario}.*")
1535 if (configuration == 'Release') {
1536 Utilities.addGithubPRTriggerForBranch(job, branch, "${os} ${arch} ${jit} ${configuration} GC Simulator",
1537 "(?i).*test\\W+${os}\\W+${arch}\\W+${jit}\\W+${configuration}\\W+${scenario}.*")
1541 Utilities.addGithubPRTriggerForBranch(job, branch, "${os} ${arch} ${jit} ${configuration} Build and Test (Jit - MinOpts)",
1542 "(?i).*test\\W+${os}\\W+${arch}\\W+${jit}\\W+${configuration}\\W+${scenario}.*")
1545 Utilities.addGithubPRTriggerForBranch(job, branch, "${os} ${arch} ${jit} ${configuration} Build and Test (Jit - ForceRelocs)",
1546 "(?i).*test\\W+${os}\\W+${arch}\\W+${jit}\\W+${configuration}\\W+${scenario}.*")
1549 Utilities.addGithubPRTriggerForBranch(job, branch, "${os} ${arch} ${jit} ${configuration} Build and Test (Jit - JitStress=1)",
1550 "(?i).*test\\W+${os}\\W+${arch}\\W+${jit}\\W+${configuration}\\W+${scenario}.*")
1553 Utilities.addGithubPRTriggerForBranch(job, branch, "${os} ${arch} ${jit} ${configuration} Build and Test (Jit - JitStress=2)",
1554 "(?i).*test\\W+${os}\\W+${arch}\\W+${jit}\\W+${configuration}\\W+${scenario}.*")
1556 case 'jitstressregs1':
1557 Utilities.addGithubPRTriggerForBranch(job, branch, "${os} ${arch} ${jit} ${configuration} Build and Test (Jit - JitStressRegs=1)",
1558 "(?i).*test\\W+${os}\\W+${arch}\\W+${jit}\\W+${configuration}\\W+${scenario}.*")
1560 case 'jitstressregs2':
1561 Utilities.addGithubPRTriggerForBranch(job, branch, "${os} ${arch} ${jit} ${configuration} Build and Test (Jit - JitStressRegs=2)",
1562 "(?i).*test\\W+${os}\\W+${arch}\\W+${jit}\\W+${configuration}\\W+${scenario}.*")
1564 case 'jitstressregs3':
1565 Utilities.addGithubPRTriggerForBranch(job, branch, "${os} ${arch} ${jit} ${configuration} Build and Test (Jit - JitStressRegs=3)",
1566 "(?i).*test\\W+${os}\\W+${arch}\\W+${jit}\\W+${configuration}\\W+${scenario}.*")
1568 case 'jitstressregs4':
1569 Utilities.addGithubPRTriggerForBranch(job, branch, "${os} ${arch} ${jit} ${configuration} Build and Test (Jit - JitStressRegs=4)",
1570 "(?i).*test\\W+${os}\\W+${arch}\\W+${jit}\\W+${configuration}\\W+${scenario}.*")
1572 case 'jitstressregs8':
1573 Utilities.addGithubPRTriggerForBranch(job, branch, "${os} ${arch} ${jit} ${configuration} Build and Test (Jit - JitStressRegs=8)",
1574 "(?i).*test\\W+${os}\\W+${arch}\\W+${jit}\\W+${configuration}\\W+${scenario}.*")
1576 case 'jitstressregs0x10':
1577 Utilities.addGithubPRTriggerForBranch(job, branch, "${os} ${arch} ${jit} ${configuration} Build and Test (Jit - JitStressRegs=0x10)",
1578 "(?i).*test\\W+${os}\\W+${arch}\\W+${jit}\\W+${configuration}\\W+${scenario}.*")
1580 case 'jitstressregs0x80':
1581 Utilities.addGithubPRTriggerForBranch(job, branch, "${os} ${arch} ${jit} ${configuration} Build and Test (Jit - JitStressRegs=0x80)",
1582 "(?i).*test\\W+${os}\\W+${arch}\\W+${jit}\\W+${configuration}\\W+${scenario}.*")
1584 case 'jitstress2_jitstressregs1':
1585 case 'jitstress2_jitstressregs2':
1586 case 'jitstress2_jitstressregs3':
1587 case 'jitstress2_jitstressregs4':
1588 case 'jitstress2_jitstressregs8':
1589 case 'jitstress2_jitstressregs0x10':
1590 case 'jitstress2_jitstressregs0x80':
1595 case 'gcstress0xc_zapdisable':
1596 case 'gcstress0xc_zapdisable_jitstress2':
1597 case 'gcstress0xc_zapdisable_heapverify1':
1598 case 'gcstress0xc_jitstress1':
1599 case 'gcstress0xc_jitstress2':
1600 case 'gcstress0xc_minopts_heapverify1':
1601 def displayStr = getStressModeDisplayName(scenario)
1602 Utilities.addGithubPRTriggerForBranch(job, branch, "${os} ${arch} ${jit} ${configuration} Build and Test (Jit - ${displayStr})",
1603 "(?i).*test\\W+${os}\\W+${arch}\\W+${jit}\\W+${configuration}\\W+${scenario}.*")
1605 case 'corefx_baseline':
1606 case 'corefx_minopts':
1607 case 'corefx_jitstress1':
1608 case 'corefx_jitstress2':
1609 case 'corefx_jitstressregs1':
1610 case 'corefx_jitstressregs2':
1611 case 'corefx_jitstressregs3':
1612 case 'corefx_jitstressregs4':
1613 case 'corefx_jitstressregs8':
1614 case 'corefx_jitstressregs0x10':
1615 case 'corefx_jitstressregs0x80':
1616 def displayName = 'CoreFx ' + getStressModeDisplayName(scenario)
1617 assert (os == 'Windows_NT')
1618 Utilities.addGithubPRTriggerForBranch(job, branch, "${os} ${arch} ${jit} ${configuration} Build and Test (Jit - ${displayName})",
1619 "(?i).*test\\W+${os}\\W+${arch}\\W+${jit}\\W+${configuration}\\W+${scenario}.*")
1622 println("Unknown scenario: ${os} ${arch} ${jit} ${scenario}");
1627 // editor brace matching: }
1628 case 'x86lb': // editor brace matching: {
1629 assert (os == 'Windows_NT')
1630 assert (scenario == 'default' ||
1631 scenario == 'r2r' ||
1632 scenario == 'pri1r2r' ||
1633 scenario == 'gcstress15_pri1r2r' ||
1634 scenario == 'longgc' ||
1635 scenario == 'gcsimulator' ||
1636 Constants.r2rJitStressScenarios.indexOf(scenario) != -1)
1639 def jit = 'legacy_backend'
1642 if (configuration == 'Checked') {
1643 Utilities.addGithubPRTriggerForBranch(job, branch, "${os} ${arch} ${jit} ${configuration} Build and Test",
1644 "(?i).*test\\W+${os}\\W+${arch}\\W+${jit}\\W+${configuration}.*")
1648 if (configuration == 'Release') {
1649 Utilities.addGithubPRTriggerForBranch(job, branch, "${os} ${arch} ${jit} ${configuration} R2R pri0 Build & Test",
1650 "(?i).*test\\W+${os}\\W+${arch}\\W+${jit}\\W+${configuration}\\W+${scenario}.*")
1654 if (configuration == 'Release') {
1655 Utilities.addGithubPRTriggerForBranch(job, branch, "${os} ${arch} ${jit} ${configuration} R2R pri1 Build & Test",
1656 "(?i).*test\\W+${os}\\W+${arch}\\W+${jit}\\W+${configuration}\\W+${scenario}.*")
1659 case 'gcstress15_pri1r2r':
1660 if (configuration == 'Release') {
1661 Utilities.addGithubPRTriggerForBranch(job, branch, "${os} ${arch} ${jit} ${configuration} GCStress 15 R2R pri1 Build & Test",
1662 "(?i).*test\\W+${os}\\W+${arch}\\W+${jit}\\W+${configuration}\\W+${scenario}.*")
1665 case 'r2r_jitstress1':
1666 if (configuration == 'Release' || configuration == 'Checked') {
1667 Utilities.addGithubPRTriggerForBranch(job, branch, "${os} ${arch} ${jit} ${configuration} jitstress1 R2R Build & Test",
1668 "(?i).*test\\W+${os}\\W+${arch}\\W+${jit}\\W+${configuration}\\W+${scenario}.*")
1671 case 'r2r_jitstress2':
1672 if (configuration == 'Release' || configuration == 'Checked') {
1673 Utilities.addGithubPRTriggerForBranch(job, branch, "${os} ${arch} ${jit} ${configuration} jitstress2 R2R Build & Test",
1674 "(?i).*test\\W+${os}\\W+${arch}\\W+${jit}\\W+${configuration}\\W+${scenario}.*")
1677 case 'r2r_jitstressregs1':
1678 if (configuration == 'Release' || configuration == 'Checked') {
1679 Utilities.addGithubPRTriggerForBranch(job, branch, "${os} ${arch} ${jit} ${configuration} jitstressregs1 R2R Build & Test",
1680 "(?i).*test\\W+${os}\\W+${arch}\\W+${jit}\\W+${configuration}\\W+${scenario}.*")
1683 case 'r2r_jitstressregs2':
1684 if (configuration == 'Release' || configuration == 'Checked') {
1685 Utilities.addGithubPRTriggerForBranch(job, branch, "${os} ${arch} ${jit} ${configuration} jitstressregs2 R2R Build & Test",
1686 "(?i).*test\\W+${os}\\W+${arch}\\W+${jit}\\W+${configuration}\\W+${scenario}.*")
1689 case 'r2r_jitstressregs3':
1690 if (configuration == 'Release' || configuration == 'Checked') {
1691 Utilities.addGithubPRTriggerForBranch(job, branch, "${os} ${arch} ${jit} ${configuration} jitstressregs3 R2R Build & Test",
1692 "(?i).*test\\W+${os}\\W+${arch}\\W+${jit}\\W+${configuration}\\W+${scenario}.*")
1695 case 'r2r_jitstressregs4':
1696 if (configuration == 'Release' || configuration == 'Checked') {
1697 Utilities.addGithubPRTriggerForBranch(job, branch, "${os} ${arch} ${jit} ${configuration} jitstressregs4 R2R Build & Test",
1698 "(?i).*test\\W+${os}\\W+${arch}\\W+${jit}\\W+${configuration}\\W+${scenario}.*")
1701 case 'r2r_jitstressregs8':
1702 if (configuration == 'Release' || configuration == 'Checked') {
1703 Utilities.addGithubPRTriggerForBranch(job, branch, "${os} ${arch} ${jit} ${configuration} jitstressregs8 R2R Build & Test",
1704 "(?i).*test\\W+${os}\\W+${arch}\\W+${jit}\\W+${configuration}\\W+${scenario}.*")
1707 case 'r2r_jitstressregsx10':
1708 if (configuration == 'Release' || configuration == 'Checked') {
1709 Utilities.addGithubPRTriggerForBranch(job, branch, "${os} ${arch} ${jit} ${configuration} jitstressregsx10 R2R Build & Test",
1710 "(?i).*test\\W+${os}\\W+${arch}\\W+${jit}\\W+${configuration}\\W+${scenario}.*")
1713 case 'r2r_jitstressregsx80':
1714 if (configuration == 'Release' || configuration == 'Checked') {
1715 Utilities.addGithubPRTriggerForBranch(job, branch, "${os} ${arch} ${jit} ${configuration} jitstressregsx80 R2R Build & Test",
1716 "(?i).*test\\W+${os}\\W+${arch}\\W+${jit}\\W+${configuration}\\W+${scenario}.*")
1719 case 'r2r_jitminopts':
1720 if (configuration == 'Release' || configuration == 'Checked') {
1721 Utilities.addGithubPRTriggerForBranch(job, branch, "${os} ${arch} ${jit} ${configuration} jitminopts R2R Build & Test",
1722 "(?i).*test\\W+${os}\\W+${arch}\\W+${jit}\\W+${configuration}\\W+${scenario}.*")
1725 case 'r2r_jitforcerelocs':
1726 if (configuration == 'Release' || configuration == 'Checked') {
1727 Utilities.addGithubPRTriggerForBranch(job, branch, "${os} ${arch} ${jit} ${configuration} jitforcerelocs R2R Build & Test",
1728 "(?i).*test\\W+${os}\\W+${arch}\\W+${jit}\\W+${configuration}\\W+${scenario}.*")
1732 if (configuration == 'Release') {
1733 Utilities.addGithubPRTriggerForBranch(job, branch, "${os} ${arch} ${jit} ${configuration} Long-Running GC Build & Test",
1734 "(?i).*test\\W+${os}\\W+${arch}\\W+${jit}\\W+${configuration}\\W+${scenario}.*")
1738 if (configuration == 'Release') {
1739 Utilities.addGithubPRTriggerForBranch(job, branch, "${os} ${arch} ${jit} ${configuration} GC Simulator",
1740 "(?i).*test\\W+${os}\\W+${arch}\\W+${jit}\\W+${configuration}\\W+${scenario}.*")
1744 println("Unknown scenario: ${os} ${arch} ${jit} ${scenario}");
1749 // editor brace matching: }
1751 println("Unknown architecture: ${architecture}");
1757 def static calculateBuildCommands(def newJob, def scenario, def branch, def isPR, def architecture, def configuration, def os, def enableCorefxTesting, def isBuildOnly, def isLinuxEmulatorBuild) {
1758 def buildCommands = [];
1759 def osGroup = getOSGroup(os)
1760 def lowerConfiguration = configuration.toLowerCase()
1762 // Calculate the build steps, archival, and xunit results
1764 case 'Windows_NT': // editor brace matching: {
1765 switch (architecture) {
1768 case 'x86compatjit':
1770 def arch = architecture
1772 if (architecture == 'x86compatjit') {
1774 buildOpts = 'compatjitcrossgen'
1776 else if (architecture == 'x86lb') {
1778 buildOpts = 'legacyjitcrossgen'
1781 if (Constants.jitStressModeScenarios.containsKey(scenario) ||
1782 scenario == 'default' ||
1783 scenario == 'r2r' ||
1784 scenario == 'jitdiff' ||
1785 Constants.r2rJitStressScenarios.indexOf(scenario) != -1) {
1786 buildOpts += enableCorefxTesting ? ' skiptests' : ''
1787 buildCommands += "set __TestIntermediateDir=int&&build.cmd ${lowerConfiguration} ${arch} ${buildOpts}"
1790 // For Pri 1 tests, we must shorten the output test binary path names.
1791 // if __TestIntermediateDir is already set, build-test.cmd will
1792 // output test binaries to that directory. If it is not set, the
1793 // binaries are sent to a default directory whose name is about
1794 // 35 characters long.
1796 else if (scenario == 'pri1' || scenario == 'pri1r2r' || scenario == 'gcstress15_pri1r2r'|| scenario == 'coverage') {
1797 buildCommands += "set __TestIntermediateDir=int&&build.cmd ${lowerConfiguration} ${arch} ${buildOpts} -priority=1"
1799 else if (scenario == 'ilrt') {
1800 // First do the build with skiptests and then build the tests with ilasm roundtrip
1801 buildCommands += "build.cmd ${lowerConfiguration} ${arch} ${buildOpts} skiptests"
1802 buildCommands += "set __TestIntermediateDir=int&&build-test.cmd ${lowerConfiguration} ${arch} -ilasmroundtrip"
1804 else if (isLongGc(scenario)) {
1805 buildCommands += "build.cmd ${lowerConfiguration} ${arch} ${buildOpts} skiptests"
1806 buildCommands += "set __TestIntermediateDir=int&&build-test.cmd ${lowerConfiguration} ${arch}"
1808 else if (scenario == 'standalone_gc') {
1809 buildCommands += "build.cmd ${lowerConfiguration} ${arch} ${buildOpts} buildstandalonegc"
1811 else if (scenario == 'formatting') {
1812 buildCommands += "python -u tests\\scripts\\format.py -c %WORKSPACE% -o Windows_NT -a ${arch}"
1813 Utilities.addArchival(newJob, "format.patch", "", true, false)
1817 println("Unknown scenario: ${scenario}")
1821 // If we are running a stress mode, we should write out the set of key
1822 // value env pairs to a file at this point and then we'll pass that to runtest.cmd
1825 //If this is a crossgen build, pass 'crossgen' to runtest.cmd
1826 def crossgenStr = ''
1827 def runcrossgentestsStr = ''
1828 def runjitstressStr = ''
1829 def runjitstressregsStr = ''
1830 def runjitmioptsStr = ''
1831 def runjitforcerelocsStr = ''
1832 def runjitdisasmStr = ''
1833 def gcstressStr = ''
1834 def runtestArguments = ''
1835 def gcTestArguments = ''
1837 if (scenario == 'r2r' ||
1838 scenario == 'pri1r2r' ||
1839 scenario == 'gcstress15_pri1r2r' ||
1840 Constants.r2rJitStressScenarios.indexOf(scenario) != -1) {
1841 crossgenStr = 'crossgen'
1842 runcrossgentestsStr = 'runcrossgentests'
1844 if (scenario == 'r2r_jitstress1'){
1845 runjitstressStr = 'jitstress 1'
1847 else if (scenario == 'r2r_jitstress2') {
1848 runjitstressStr = 'jitstress 2'
1850 else if (scenario == 'r2r_jitstressregs1'){
1851 runjitstressregsStr = 'jitstressregs 1'
1853 else if (scenario == 'r2r_jitstressregs2') {
1854 runjitstressregsStr = 'jitstressregs 2'
1856 else if (scenario == 'r2r_jitstressregs3') {
1857 runjitstressregsStr = 'jitstressregs 3'
1859 else if (scenario == 'r2r_jitstressregs4') {
1860 runjitstressregsStr = 'jitstressregs 4'
1862 else if (scenario == 'r2r_jitstressregs8') {
1863 runjitstressregsStr = 'jitstressregs 8'
1865 else if (scenario == 'r2r_jitstressregsx10') {
1866 runjitstressregsStr = 'jitstressregs x10'
1868 else if (scenario == 'r2r_jitstressregsx80') {
1869 runjitstressregsStr = 'jitstressregs x80'
1871 else if (scenario == 'r2r_jitminopts') {
1872 runjitmioptsStr = 'jitminopts'
1874 else if (scenario == 'r2r_jitforcerelocs') {
1875 runjitforcerelocsStr = 'jitforcerelocs'
1878 if (scenario == 'gcstress15_pri1r2r')
1880 gcstressStr = 'gcstresslevel 0xF'
1883 if (scenario == 'jitdiff')
1885 runjitdisasmStr = 'jitdisasm crossgen'
1888 if (isLongGc(scenario)) {
1889 gcTestArguments = "${scenario} sequential"
1892 runtestArguments = "${lowerConfiguration} ${arch} ${gcstressStr} ${crossgenStr} ${runcrossgentestsStr} ${runjitstressStr} ${runjitstressregsStr} ${runjitmioptsStr} ${runjitforcerelocsStr} ${runjitdisasmStr} ${gcTestArguments}"
1894 if (Constants.jitStressModeScenarios.containsKey(scenario)) {
1895 def stepScriptLocation = "%WORKSPACE%\\SetStressModes.bat"
1896 buildCommands += genStressModeScriptStep(os, scenario, Constants.jitStressModeScenarios[scenario], stepScriptLocation)
1898 if (enableCorefxTesting) {
1899 def workspaceRelativeFxRoot = "_/fx"
1900 def absoluteFxRoot = "%WORKSPACE%\\_\\fx"
1901 buildCommands += "python %WORKSPACE%\\tests\\scripts\\run-corefx-tests.py -arch ${arch} -build_type ${configuration} -fx_root ${absoluteFxRoot} -fx_branch ${branch} -env_script ${stepScriptLocation}"
1903 setTestJobTimeOut(newJob, scenario)
1905 // Archive and process (only) the test results
1906 Utilities.addArchival(newJob, "${workspaceRelativeFxRoot}/bin/tests/**/testResults.xml")
1907 Utilities.addXUnitDotNETResults(newJob, "${workspaceRelativeFxRoot}/bin/tests/**/testResults.xml")
1910 buildCommands += "%WORKSPACE%\\tests\\runtest.cmd ${runtestArguments} TestEnv ${stepScriptLocation}"
1913 else if (architecture == 'x64' || architecture == 'x86') {
1914 buildCommands += "tests\\runtest.cmd ${runtestArguments}"
1916 else if (architecture == 'x86compatjit') {
1917 def testEnvLocation = "%WORKSPACE%\\tests\\x86\\compatjit_x86_testenv.cmd"
1918 buildCommands += "tests\\runtest.cmd ${runtestArguments} Exclude0 x86_legacy_backend_issues.targets TestEnv ${testEnvLocation}"
1920 else if (architecture == 'x86lb') {
1921 def testEnvLocation = "%WORKSPACE%\\tests\\x86\\legacyjit_x86_testenv.cmd"
1922 buildCommands += "tests\\runtest.cmd ${runtestArguments} Exclude0 x86_legacy_backend_issues.targets TestEnv ${testEnvLocation}"
1926 if (!enableCorefxTesting) {
1927 // Run the rest of the build
1928 // Build the mscorlib for the other OS's
1929 buildCommands += "build.cmd ${lowerConfiguration} ${arch} linuxmscorlib"
1930 buildCommands += "build.cmd ${lowerConfiguration} ${arch} freebsdmscorlib"
1931 buildCommands += "build.cmd ${lowerConfiguration} ${arch} osxmscorlib"
1933 // Zip up the tests directory so that we don't use so much space/time copying
1934 // 10s of thousands of files around.
1935 buildCommands += "powershell -Command \"Add-Type -Assembly 'System.IO.Compression.FileSystem'; [System.IO.Compression.ZipFile]::CreateFromDirectory('.\\bin\\tests\\${osGroup}.${arch}.${configuration}', '.\\bin\\tests\\tests.zip')\"";
1937 if (!Constants.jitStressModeScenarios.containsKey(scenario) && scenario != 'jitdiff') {
1938 // For windows, pull full test results and test drops for x86/x64.
1939 // No need to pull for stress mode scenarios (downstream builds use the default scenario)
1940 Utilities.addArchival(newJob, "bin/Product/**,bin/tests/tests.zip")
1943 if (scenario == 'jitdiff') {
1944 // retrive jit-dasm output for base commit, and run jit-diff
1946 // if this is a build only job, we want to keep the default (build) artifacts for the flow job
1947 Utilities.addArchival(newJob, "bin/tests/${osGroup}.${arch}.${configuration}/dasm/**")
1952 if (architecture == 'x64' || !isPR) {
1953 Utilities.addXUnitDotNETResults(newJob, 'bin/**/TestRun*.xml')
1955 setTestJobTimeOut(newJob, scenario)
1960 assert (scenario == 'default')
1963 setTestJobTimeOut(newJob, scenario)
1965 if ( lowerConfiguration == "debug" ) {
1966 // For Debug builds, we will do a P1 test build
1967 buildCommands += "set __TestIntermediateDir=int&&build.cmd ${lowerConfiguration} ${architecture} -priority=1"
1970 buildCommands += "set __TestIntermediateDir=int&&build.cmd ${lowerConfiguration} ${architecture}"
1973 Utilities.addArchival(newJob, "bin/Product/**")
1976 assert (scenario == 'default') || (scenario == 'pri1r2r') || (scenario == 'gcstress0x3') || (scenario == 'gcstress0xc')
1978 setTestJobTimeOut(newJob, scenario)
1980 // Debug runs take too long to run. So build job only.
1981 if (lowerConfiguration == "debug") {
1982 buildCommands += "set __TestIntermediateDir=int&&build.cmd ${lowerConfiguration} ${architecture} toolset_dir C:\\ats2"
1985 buildCommands += "set __TestIntermediateDir=int&&build.cmd skiptests ${lowerConfiguration} ${architecture} toolset_dir C:\\ats2"
1986 // Test build and run are launched together.
1987 buildCommands += "python tests\\scripts\\arm64_post_build.py -repo_root %WORKSPACE% -arch ${architecture} -build_type ${lowerConfiguration} -scenario ${scenario} -key_location C:\\tools\\key.txt"
1988 //Utilities.addXUnitDotNETResults(newJob, 'bin/tests/testResults.xml')
1992 Utilities.addArchival(newJob, "bin/Product/**")
1995 println("Unknown architecture: ${architecture}");
2000 // editor brace matching: }
2009 case 'OpenSUSE13.2':
2010 case 'OpenSUSE42.1':
2011 case 'Fedora23': // editor brace matching: {
2012 switch (architecture) {
2015 case 'x86compatjit':
2017 def arch = architecture
2018 if (architecture == 'x86compatjit' || architecture == 'x86lb') {
2022 if (scenario == 'formatting') {
2023 buildCommands += "python tests/scripts/format.py -c \${WORKSPACE} -o Linux -a ${arch}"
2024 Utilities.addArchival(newJob, "format.patch", "", true, false)
2028 if (!enableCorefxTesting) {
2029 // We run pal tests on all OS but generate mscorlib (and thus, nuget packages)
2030 // only on supported OS platforms.
2031 if ((os == 'FreeBSD') || (os == 'OpenSUSE13.2'))
2033 buildCommands += "./build.sh skipmscorlib verbose ${lowerConfiguration} ${arch}"
2037 def bootstrapRid = Utilities.getBoostrapPublishRid(os)
2038 def bootstrapRidEnv = bootstrapRid != null ? "__PUBLISH_RID=${bootstrapRid} " : ''
2039 buildCommands += "${bootstrapRidEnv}./build.sh verbose ${lowerConfiguration} ${arch}"
2041 buildCommands += "src/pal/tests/palsuite/runpaltests.sh \${WORKSPACE}/bin/obj/${osGroup}.${arch}.${configuration} \${WORKSPACE}/bin/paltestout"
2044 setTestJobTimeOut(newJob, scenario)
2045 // Basic archiving of the build
2046 Utilities.addArchival(newJob, "bin/Product/**,bin/obj/*/tests/**/*.dylib,bin/obj/*/tests/**/*.so")
2048 Utilities.addXUnitDotNETResults(newJob, '**/pal_tests.xml')
2051 // Corefx stress testing
2052 assert os == 'Ubuntu'
2053 assert architecture == 'x64'
2054 assert lowerConfiguration == 'checked'
2055 assert Constants.jitStressModeScenarios.containsKey(scenario)
2058 buildCommands += "./build.sh verbose ${lowerConfiguration} ${architecture}"
2060 def scriptFileName = "\$WORKSPACE/set_stress_test_env.sh"
2061 buildCommands += genStressModeScriptStep(os, scenario, Constants.jitStressModeScenarios[scenario], scriptFileName)
2063 // Build and text corefx
2064 def workspaceRelativeFxRoot = "_/fx"
2065 def absoluteFxRoot = "\$WORKSPACE/${workspaceRelativeFxRoot}"
2066 buildCommands += "python \$WORKSPACE/tests/scripts/run-corefx-tests.py -arch ${arch} -build_type ${configuration} -fx_root ${absoluteFxRoot} -fx_branch ${branch} -env_script ${scriptFileName}"
2068 setTestJobTimeOut(newJob, scenario)
2070 // Archive and process (only) the test results
2071 Utilities.addArchival(newJob, "${workspaceRelativeFxRoot}/bin/tests/**/testResults.xml")
2072 Utilities.addXUnitDotNETResults(newJob, "${workspaceRelativeFxRoot}/bin/tests/**/testResults.xml")
2076 // We don't run the cross build except on Ubuntu
2077 assert os == 'Ubuntu'
2079 buildCommands += """echo \"Using rootfs in /opt/aarch64-linux-gnu-root\"
2080 ROOTFS_DIR=/opt/aarch64-linux-gnu-root ./build.sh skipmscorlib arm64 cross verbose ${lowerConfiguration}"""
2082 // Basic archiving of the build, no pal tests
2083 Utilities.addArchival(newJob, "bin/Product/**")
2086 // All builds for ARM architecture are run on Ubuntu currently
2087 assert os == 'Ubuntu'
2088 if (isLinuxEmulatorBuild == false) {
2089 buildCommands += """echo \"Using rootfs in /opt/arm-liux-genueabihf-root\"
2090 ROOTFS_DIR=/opt/arm-linux-genueabihf-root ./build.sh skipmscorlib arm cross verbose ${lowerConfiguration}"""
2092 // Basic archiving of the build, no pal tests
2093 Utilities.addArchival(newJob, "bin/Product/**")
2097 // Make sure the build configuration is either of debug or release
2098 assert ( lowerConfiguration == 'debug' ) || ( lowerConfiguration == 'release' )
2100 // Setup variables to hold emulator folder path and the rootfs mount path
2101 def armemul_path = '/opt/linux-arm-emulator'
2102 def armrootfs_mountpath = '/opt/linux-arm-emulator-root'
2104 // Unzip the Windows test binaries first. Exit with 0
2105 buildCommands += "unzip -q -o ./bin/tests/tests.zip -d ./bin/tests/Windows_NT.x64.${configuration} || exit 0"
2107 // Unpack the corefx binaries
2108 buildCommands += "tar -xf ./bin/build.tar.gz"
2110 // Call the ARM emulator build script to cross build and test using the ARM emulator rootfs
2111 buildCommands += """./tests/scripts/arm32_ci_script.sh \\
2112 --emulatorPath=${armemul_path} \\
2113 --mountPath=${armrootfs_mountpath} \\
2114 --buildConfig=${lowerConfiguration} \\
2115 --testRootDir=./bin/tests/Windows_NT.x64.${configuration} \\
2116 --coreFxNativeBinDir=./bin/Linux.arm-softfp.${configuration} \\
2117 --coreFxBinDir=\"./bin/Linux.AnyCPU.${configuration};./bin/Unix.AnyCPU.${configuration};./bin/AnyOS.AnyCPU.${configuration}\" \\
2118 --testDirFile=./tests/testsRunningInsideARM.txt"""
2121 // Basic archiving of the build
2122 Utilities.addArchival(newJob, "bin/Product/**")
2126 println("Unknown architecture: ${architecture}");
2131 // editor brace matching: }
2133 println("Unknown os: ${os}");
2138 return buildCommands
2141 // Additional scenario which can alter behavior
2143 def combinedScenarios = Constants.basicScenarios + Constants.jitStressModeScenarios.keySet()
2144 combinedScenarios.each { scenario ->
2145 [true, false].each { isPR ->
2146 Constants.architectureList.each { architecture ->
2147 Constants.configurationList.each { configuration ->
2148 Constants.osList.each { os ->
2149 // If the OS is Windows_NT_BuildOnly, set the isBuildOnly flag to true
2150 // and reset the os to Windows_NT
2151 def isBuildOnly = false
2152 if (os == 'Windows_NT_BuildOnly') {
2157 // WinArm32 is only built for Debug and Release
2158 if (os == 'Windows_NT' && architecture == 'arm')
2160 if (configuration == 'Checked')
2165 // If the OS is LinuxARMEmulator and arch is arm, set the isLinuxEmulatorBuild
2166 // flag to true and reset the os to Ubuntu
2167 // The isLinuxEmulatorBuild flag will be used at a later time to execute the right
2168 // set of build commands
2169 // The tuples (LinuxARMEmulator, other architectures) are not handled and control returns
2170 def isLinuxEmulatorBuild = false
2171 if (os == 'LinuxARMEmulator' && architecture == 'arm') {
2172 // Cross Builds only in Debug and Release modes allowed
2173 if ( configuration == 'Checked' ) {
2177 isLinuxEmulatorBuild = true
2179 } else if (os == 'LinuxARMEmulator') {
2183 // Skip totally unimplemented (in CI) configurations.
2184 switch (architecture) {
2187 if (os != 'Windows_NT' || isBuildOnly) {
2192 if ((os != 'Ubuntu') && (os != 'Windows_NT')) {
2197 case 'x86compatjit':
2200 if (os != 'Windows_NT') {
2205 // Everything implemented
2208 println("Unknown architecture: ${architecture}")
2213 // Skip scenarios (blanket skipping for jit stress modes, which are good most everywhere
2214 // with checked builds
2215 def enableCorefxTesting = false
2216 if (Constants.jitStressModeScenarios.containsKey(scenario)) {
2217 if (configuration != 'Checked') {
2221 enableCorefxTesting = isCorefxTesting(scenario)
2223 // Since these are just execution time differences,
2224 // skip platforms that don't execute the tests here (Windows_NT only)
2225 def isEnabledOS = (os == 'Windows_NT') || (os == 'Ubuntu' && enableCorefxTesting)
2226 if (!isEnabledOS || isBuildOnly) {
2230 switch (architecture) {
2232 if ((scenario != 'gcstress0x3') && (scenario != 'gcstress0xc')) {
2238 // Everything implemented
2240 case 'x86compatjit':
2242 // No stress modes for compatjit.dll, legacyjit.dll.
2243 // (There's no technical reason we couldn't allow these.)
2250 // If this is a r2r jitstress, jitstressregs, jitminopts, or forcerelocs scenario
2251 // and configuration is not Checked, bail out.
2252 if (configuration != 'Checked' && Constants.r2rJitStressScenarios.indexOf(scenario) != -1) {
2259 // The pri1 build isn't necessary except for Windows_NT. Non-Windows NT uses
2260 // the default scenario build
2261 if (os != 'Windows_NT') {
2265 if (architecture != 'x64') {
2270 // The ilrt build isn't necessary except for Windows_NT. Non-Windows NT uses
2271 // the default scenario build
2272 if (os != 'Windows_NT') {
2276 if (architecture != 'x64') {
2280 if (configuration != 'Release') {
2285 if (os != 'Windows_NT' && os != 'Ubuntu' && os != 'OSX') {
2288 if (architecture != 'x64') {
2291 if (configuration != 'Checked') {
2296 // The r2r build isn't necessary except for Windows_NT. Non-Windows NT uses
2297 // the default scenario build
2298 if (os != 'Windows_NT') {
2301 if (architecture != 'x64') {
2306 // The pri1r2r build isn't necessary except for Windows_NT. Non-Windows NT uses
2307 // the default scenario build
2308 if (os != 'Windows_NT') {
2311 if (architecture != 'x64') {
2312 if (architecture != 'arm64' || configuration == 'Debug') {
2317 case 'gcstress15_pri1r2r':
2318 case 'r2r_jitstress1':
2319 case 'r2r_jitstress2':
2320 case 'r2r_jitstressregs1':
2321 case 'r2r_jitstressregs2':
2322 case 'r2r_jitstressregs3':
2323 case 'r2r_jitstressregs4':
2324 case 'r2r_jitstressregs8':
2325 case 'r2r_jitstressregsx10':
2326 case 'r2r_jitstressregsx80':
2327 case 'r2r_jitminopts':
2328 case 'r2r_jitforcerelocs':
2329 // The above builds are not necessary except for Windows_NT. Non-Windows NT uses
2330 // the default scenario build
2331 if (os != 'Windows_NT') {
2334 if (architecture != 'x64') {
2340 if (os != 'Windows_NT' && os != 'Ubuntu' && os != 'OSX') {
2343 if (architecture != 'x64') {
2346 if (configuration != 'Release') {
2350 case 'standalone_gc':
2351 if (os != 'Windows_NT') {
2355 if (architecture != 'x64') {
2359 if (configuration != 'Release' && configuration != 'Checked') {
2363 // We need Windows x64 Release bits for the code coverage build
2365 if (os != 'Windows_NT') {
2368 if (architecture != 'x64') {
2371 if (configuration != 'Release') {
2375 // We only run Windows and Ubuntu x64 Checked for formatting right now
2377 if (os != 'Windows_NT' && os != 'Ubuntu') {
2380 if (architecture != 'x64') {
2383 if (configuration != 'Checked') {
2394 println("Unknown scenario: ${scenario}")
2401 def lowerConfiguration = configuration.toLowerCase()
2402 def jobName = getJobName(configuration, architecture, os, scenario, isBuildOnly, isLinuxEmulatorBuild)
2403 def folderName = isJITStressJob(scenario) ? 'jitstress' : '';
2405 // Create the new job
2406 def newJob = job(Utilities.getFullJobName(project, jobName, isPR, folderName)) {}
2408 setMachineAffinity(newJob, os, architecture)
2410 // Add all the standard options
2411 Utilities.standardJobSetup(newJob, project, isPR, "*/${branch}")
2412 addTriggers(newJob, branch, isPR, architecture, os, configuration, scenario, false, isBuildOnly, isLinuxEmulatorBuild)
2414 def buildCommands = calculateBuildCommands(newJob, scenario, branch, isPR, architecture, configuration, os, enableCorefxTesting, isBuildOnly, isLinuxEmulatorBuild)
2415 def osGroup = getOSGroup(os)
2419 if (os == 'Windows_NT') {
2420 buildCommands.each { buildCommand ->
2421 batchFile(buildCommand)
2425 // Setup corefx and Windows test binaries for Linux ARM Emulator Build
2426 if (isLinuxEmulatorBuild) {
2427 // Define the Windows Tests and Corefx build job names
2428 def WindowTestsName = projectFolder + '/' +
2429 Utilities.getFullJobName(project,
2430 getJobName(lowerConfiguration,
2436 def corefxFolder = Utilities.getFolderName('dotnet/corefx') + '/' +
2437 Utilities.getFolderName(branch)
2439 // Copy the Windows test binaries and the Corefx build binaries
2440 copyArtifacts(WindowTestsName) {
2441 excludePatterns('**/testResults.xml', '**/*.ni.dll')
2443 latestSuccessful(true)
2446 copyArtifacts("${corefxFolder}/linuxarmemulator_softfp_cross_${lowerConfiguration}") {
2447 includePatterns('bin/build.tar.gz')
2449 latestSuccessful(true)
2454 buildCommands.each { buildCommand ->
2468 // Create the Linux/OSX/CentOS coreclr test leg for debug and release and each scenario
2469 combinedScenarios.each { scenario ->
2470 [true, false].each { isPR ->
2471 // Architectures. x64 only at this point
2472 ['x64'].each { architecture ->
2473 // Put the OS's supported for coreclr cross testing here
2474 Constants.crossList.each { os ->
2475 Constants.configurationList.each { configuration ->
2477 if (Constants.jitStressModeScenarios.containsKey(scenario)) {
2478 if (configuration != 'Checked') {
2481 if (isCorefxTesting(scenario)) {
2484 //Skip stress modes for these scenarios
2485 if (os == 'RHEL7.2' || os == 'Debian8.4' || os == 'OpenSUSE13.2') {
2489 // If this is a r2r jitstress, jitstressregs, jitminopts or forcerelocs scenario
2490 // and configuration is not Checked, bail out.
2491 else if (configuration != 'Checked' && Constants.r2rJitStressScenarios.indexOf(scenario) != -1) {
2494 // For CentOS, we only want Checked/Release pri1 builds.
2495 else if (os == 'CentOS7.1') {
2496 if (scenario != 'pri1' &&
2497 scenario != 'r2r' &&
2498 scenario != 'pri1r2r' &&
2499 scenario != 'gcstress15_pri1r2r' &&
2500 Constants.r2rJitStressScenarios.indexOf(scenario) == -1) {
2503 if (configuration != 'Checked' && configuration != 'Release') {
2507 // For RedHat, Debian, and OpenSUSE, we only do Release pri1 builds.
2508 else if (os == 'RHEL7.2' || os == 'Debian8.4' || os == 'OpenSUSE13.2') {
2509 if (scenario != 'pri1') {
2512 if (configuration != 'Release') {
2524 if (configuration != 'Release') {
2529 if (configuration != 'Checked') {
2533 //Skip configs that aren't Checked or Release (so just Debug, for now)
2534 if (configuration != 'Checked' && configuration != 'Release') {
2539 //Skip configs that aren't Checked or Release (so just Debug, for now)
2540 if (configuration != 'Checked' && configuration != 'Release') {
2544 case 'gcstress15_pri1r2r':
2545 case 'r2r_jitstress1':
2546 case 'r2r_jitstress2':
2547 case 'r2r_jitstressregs1':
2548 case 'r2r_jitstressregs2':
2549 case 'r2r_jitstressregs3':
2550 case 'r2r_jitstressregs4':
2551 case 'r2r_jitstressregs8':
2552 case 'r2r_jitstressregsx10':
2553 case 'r2r_jitstressregsx80':
2554 case 'r2r_jitminopts':
2555 case 'r2r_jitforcerelocs':
2556 //Skip configs that aren't Checked or Release (so just Debug, for now)
2557 if (configuration != 'Checked' && configuration != 'Release') {
2563 // Long GC tests take a long time on non-Release builds
2564 if (configuration != 'Release') {
2568 case 'standalone_gc':
2569 if (configuration != 'Release' && configuration != 'Checked') {
2573 //We only want Ubuntu Release for coverage
2574 if (os != 'Ubuntu') {
2577 if (configuration != 'Release') {
2586 println("Unknown scenario: ${scenario}")
2592 def lowerConfiguration = configuration.toLowerCase()
2593 def osGroup = getOSGroup(os)
2594 def jobName = getJobName(configuration, architecture, os, scenario, false) + "_tst"
2596 // Unless this is a coverage test run, we want to copy over the default build of coreclr.
2597 def inputScenario = 'default'
2598 if (scenario == 'coverage') {
2599 inputScenario = 'coverage'
2601 def inputCoreCLRBuildName = projectFolder + '/' +
2602 Utilities.getFullJobName(project, getJobName(configuration, architecture, os, inputScenario, false), isPR)
2603 // If this is a stress scenario, there isn't any difference in the build job
2604 // so we didn't create a build only job for windows_nt specific to that stress mode. Just copy
2605 // from the default scenario
2606 def testBuildScenario = scenario
2607 if (testBuildScenario == 'coverage' || testBuildScenario == 'pri1r2r'|| testBuildScenario == 'gcstress15_pri1r2r') {
2608 testBuildScenario = 'pri1'
2610 else if ( testBuildScenario == 'r2r' || isLongGc(testBuildScenario)) {
2611 testBuildScenario = 'default'
2613 def inputWindowTestsBuildName = ''
2614 if (Constants.jitStressModeScenarios.containsKey(testBuildScenario)) {
2615 inputWindowTestsBuildName = projectFolder + '/' +
2616 Utilities.getFullJobName(project, getJobName(configuration, architecture, 'windows_nt', 'default', true), isPR)
2619 inputWindowTestsBuildName = projectFolder + '/' +
2620 Utilities.getFullJobName(project, getJobName(configuration, architecture, 'windows_nt', testBuildScenario, true), isPR)
2622 // Enable Server GC for Ubuntu PR builds
2623 def serverGCString = ''
2625 // Whether or not this test run should be run sequentially instead
2626 // of in parallel. Only used for long GC tests.
2627 def sequentialString = ''
2629 // Whether or not this test run should run a specific playlist.
2630 // Only used for long GC tests.
2632 // A note - runtest.sh does have "--long-gc" and "--gcsimulator" options
2633 // for running long GC and GCSimulator tests, respectively. We don't use them
2634 // here because using a playlist file produces much more readable output on the CI machines
2635 // and reduces running time.
2636 def playlistString = ''
2638 if (os == 'Ubuntu' && isPR){
2639 serverGCString = '--useServerGC'
2642 // pass --crossgen to runtest.sh for crossgen builds
2643 def crossgenStr = ''
2644 def runcrossgentestsStr = ''
2645 def runjitstressStr = ''
2646 def runjitstressregsStr = ''
2647 def runjitmioptsStr = ''
2648 def runjitforcerelocsStr = ''
2649 def runjitdisasmStr = ''
2650 def gcstressStr = ''
2652 if (scenario == 'r2r' ||
2653 scenario == 'pri1r2r' ||
2654 scenario == 'gcstress15_pri1r2r' ||
2655 Constants.r2rJitStressScenarios.indexOf(scenario) != -1) {
2656 crossgenStr = '--crossgen'
2657 runcrossgentestsStr = '--runcrossgentests'
2659 if (scenario == 'r2r_jitstress1'){
2660 runjitstressStr = '--jitstress=1'
2662 else if (scenario == 'r2r_jitstress2') {
2663 runjitstressStr = '--jitstress=2'
2665 else if (scenario == 'r2r_jitstressregs1'){
2666 runjitstressregsStr = '--jitstressregs=1'
2668 else if (scenario == 'r2r_jitstressregs2') {
2669 runjitstressregsStr = '--jitstressregs=2'
2671 else if (scenario == 'r2r_jitstressregs3') {
2672 runjitstressregsStr = '--jitstressregs=3'
2674 else if (scenario == 'r2r_jitstressregs4') {
2675 runjitstressregsStr = '--jitstressregs=4'
2677 else if (scenario == 'r2r_jitstressregs8') {
2678 runjitstressregsStr = '--jitstressregs=8'
2680 else if (scenario == 'r2r_jitstressregsx10') {
2681 runjitstressregsStr = '--jitstressregs=x10'
2683 else if (scenario == 'r2r_jitstressregsx80') {
2684 runjitstressregsStr = '--jitstressregs=x80'
2686 else if (scenario == 'r2r_jitminopts') {
2687 runjitmioptsStr = '--jitminopts'
2689 else if (scenario == 'r2r_jitforcerelocs') {
2690 runjitforcerelocsStr = '--jitforcerelocs'
2693 if (scenario == 'gcstress15_pri1r2r')
2695 gcstressStr = '--gcstresslevel=0xF'
2698 if (scenario == 'jitdiff')
2700 runjitdisasmStr = '--jitdisasm --crossgen'
2703 if (isLongGc(scenario)) {
2704 // Long GC tests behave very poorly when they are not
2705 // the only test running (many of them allocate until OOM).
2706 sequentialString = '--sequential'
2708 // The Long GC playlist contains all of the tests that are
2709 // going to be run. The GCSimulator playlist contains all of
2710 // the GC simulator tests.
2711 if (scenario == 'longgc') {
2712 playlistString = '--long-gc --playlist=./tests/longRunningGcTests.txt'
2714 else if (scenario == 'gcsimulator') {
2715 playlistString = '--gcsimulator --playlist=./tests/gcSimulatorTests.txt'
2719 def folder = isJITStressJob(scenario) ? 'jitstress' : ''
2720 def newJob = job(Utilities.getFullJobName(project, jobName, isPR, folder)) {
2721 // Add parameters for the inputs
2724 stringParam('CORECLR_WINDOWS_BUILD', '', 'Build number to copy CoreCLR windows test binaries from')
2725 stringParam('CORECLR_BUILD', '', "Build number to copy CoreCLR ${osGroup} binaries from")
2729 // Set up the copies
2731 // Coreclr build containing the tests and mscorlib
2733 copyArtifacts(inputWindowTestsBuildName) {
2734 excludePatterns('**/testResults.xml', '**/*.ni.dll')
2736 buildNumber('${CORECLR_WINDOWS_BUILD}')
2740 if (scenario == 'coverage') {
2742 // Move coreclr to clr directory
2743 shell("rm -rf .clr; mkdir .clr; mv * .clr; mv .git .clr; mv .clr clr")
2746 shell("./clr/build.sh coverage verbose ${lowerConfiguration} ${architecture}")
2748 // Remove folders from obj that we don't expect to be covered. May update this later.
2749 shell("rm -rf ./clr/bin/obj/Linux.x64.Release/src/ToolBox")
2750 shell("rm -rf ./clr/bin/obj/Linux.x64.Release/src/debug")
2751 shell("rm -rf ./clr/bin/obj/Linux.x64.Release/src/ilasm")
2752 shell("rm -rf ./clr/bin/obj/Linux.x64.Release/src/ildasm")
2753 shell("rm -rf ./clr/bin/obj/Linux.x64.Release/src/dlls/dbgshim")
2754 shell("rm -rf ./clr/bin/obj/Linux.x64.Release/src/dlls/mscordac")
2755 shell("rm -rf ./clr/bin/obj/Linux.x64.Release/src/dlls/mscordbi")
2758 shell("./clr/src/pal/tests/palsuite/runpaltests.sh \$(pwd)/clr/bin/obj/${osGroup}.${architecture}.${configuration} \$(pwd)/clr/bin/paltestout")
2760 // Remove obj files for PAL tests so they're not included in coverage results
2761 shell("rm -rf ./clr/bin/obj/Linux.x64.Release/src/pal/tests")
2763 // Unzip the tests first. Exit with 0
2764 shell("unzip -q -o ./clr/bin/tests/tests.zip -d ./clr/bin/tests/Windows_NT.${architecture}.${configuration} || exit 0")
2767 shell("git clone https://github.com/dotnet/corefx fx")
2769 // Build Linux corefx
2770 shell("./fx/build-native.sh -release -buildArch=x64 -os=Linux")
2771 shell("./fx/build-managed.sh -release -buildArch=x64 -osgroup=Linux -skiptests")
2774 def scriptFileName = "\$WORKSPACE/set_stress_test_env.sh"
2775 def createScriptCmds = genStressModeScriptStep(os, scenario, Constants.jitStressModeScenarios['heapverify1'], scriptFileName)
2776 shell("${createScriptCmds}")
2777 testEnvOpt = "--test-env=" + scriptFileName
2780 shell("""./fx/run-test.sh \\
2781 --coreclr-bins \$(pwd)/clr/bin/Product/${osGroup}.${architecture}.${configuration} \\
2782 --mscorlib-bins \$(pwd)/clr/bin/Product/${osGroup}.${architecture}.${configuration} \\
2783 --corefx-tests \$(pwd)/fx/bin/tests/${osGroup}.AnyCPU.${configuration} \\
2784 --corefx-native-bins \$(pwd)/fx/bin/${osGroup}.${architecture}.${configuration} \\
2785 --configurationGroup Release""")
2788 // Run coreclr tests w/ workstation GC
2789 shell("""./clr/tests/runtest.sh \\
2790 --testRootDir=\"\$(pwd)/clr/bin/tests/Windows_NT.${architecture}.${configuration}\" \\
2791 --testNativeBinDir=\"\$(pwd)/clr/bin/obj/${osGroup}.${architecture}.${configuration}/tests\" \\
2792 --coreClrBinDir=\"\$(pwd)/clr/bin/Product/${osGroup}.${architecture}.${configuration}\" \\
2793 --mscorlibDir=\"\$(pwd)/clr/bin/Product/${osGroup}.${architecture}.${configuration}\" \\
2794 --coreFxBinDir=\"\$(pwd)/fx/bin/${osGroup}.AnyCPU.Release;\$(pwd)/fx/bin/Unix.AnyCPU.Release;\$(pwd)/fx/bin/AnyOS.AnyCPU.Release\" \\
2795 --coreFxNativeBinDir=\"\$(pwd)/fx/bin/${osGroup}.${architecture}.Release\" \\
2796 --crossgen --runcrossgentests""")
2798 // Run coreclr tests w/ server GC & HeapVerify enabled
2799 shell("""./clr/tests/runtest.sh \\
2800 --testRootDir=\"\$(pwd)/clr/bin/tests/Windows_NT.${architecture}.${configuration}\" \\
2801 --testNativeBinDir=\"\$(pwd)/clr/bin/obj/${osGroup}.${architecture}.${configuration}/tests\" \\
2802 --coreOverlayDir=\"\$(pwd)/clr/bin/tests/Windows_NT.${architecture}.${configuration}/Tests/coreoverlay\" \\
2803 --useServerGC ${testEnvOpt}""")
2805 // Run long-running coreclr GC tests & produce coverage reports
2806 shell("""./clr/tests/runtest.sh \\
2807 --testRootDir=\"\$(pwd)/clr/bin/tests/Windows_NT.${architecture}.${configuration}\" \\
2808 --testNativeBinDir=\"\$(pwd)/clr/bin/obj/${osGroup}.${architecture}.${configuration}/tests\" \\
2809 --coreOverlayDir=\"\$(pwd)/clr/bin/tests/Windows_NT.${architecture}.${configuration}/Tests/coreoverlay\" \\
2810 --long-gc --playlist=\"\$(pwd)/clr/tests/longRunningGcTests.txt\" --coreclr-coverage\\
2811 --coreclr-objs=\"\$(pwd)/clr/bin/obj/${osGroup}.${architecture}.${configuration}\" \\
2812 --coreclr-src=\"\$(pwd)/clr/src\" \\
2813 --coverage-output-dir=\"\${WORKSPACE}/coverage\" """)
2818 // Coreclr build we are trying to test
2820 copyArtifacts(inputCoreCLRBuildName) {
2821 excludePatterns('**/testResults.xml', '**/*.ni.dll')
2823 buildNumber('${CORECLR_BUILD}')
2827 def corefxFolder = Utilities.getFolderName('dotnet/corefx') + '/' + Utilities.getFolderName(branch)
2829 // Corefx components. We now have full stack builds on all distros we test here, so we can copy straight from CoreFX jobs.
2830 def osJobName = (os == 'Ubuntu') ? 'ubuntu14.04' : os.toLowerCase()
2831 copyArtifacts("${corefxFolder}/${osJobName}_release") {
2832 includePatterns('bin/build.tar.gz')
2834 latestSuccessful(true)
2838 // Unpack the corefx binaries
2839 shell("tar -xf ./bin/build.tar.gz")
2841 // Unzip the tests first. Exit with 0
2842 shell("unzip -q -o ./bin/tests/tests.zip -d ./bin/tests/Windows_NT.${architecture}.${configuration} || exit 0")
2844 // Execute the tests
2845 // If we are running a stress mode, we'll set those variables first
2847 if (Constants.jitStressModeScenarios.containsKey(scenario)) {
2848 def scriptFileName = "\$WORKSPACE/set_stress_test_env.sh"
2849 def createScriptCmds = genStressModeScriptStep(os, scenario, Constants.jitStressModeScenarios[scenario], scriptFileName)
2850 shell("${createScriptCmds}")
2851 testEnvOpt = "--test-env=" + scriptFileName
2854 if (isGCStressRelatedTesting(scenario)) {
2855 shell('./init-tools.sh')
2858 shell("""./tests/runtest.sh \\
2859 --testRootDir=\"\${WORKSPACE}/bin/tests/Windows_NT.${architecture}.${configuration}\" \\
2860 --testNativeBinDir=\"\${WORKSPACE}/bin/obj/${osGroup}.${architecture}.${configuration}/tests\" \\
2861 --coreClrBinDir=\"\${WORKSPACE}/bin/Product/${osGroup}.${architecture}.${configuration}\" \\
2862 --mscorlibDir=\"\${WORKSPACE}/bin/Product/${osGroup}.${architecture}.${configuration}\" \\
2863 --coreFxBinDir=\"\${WORKSPACE}/bin/${osGroup}.AnyCPU.Release;\${WORKSPACE}/bin/Unix.AnyCPU.Release;\${WORKSPACE}/bin/AnyOS.AnyCPU.Release\" \\
2864 --coreFxNativeBinDir=\"\${WORKSPACE}/bin/${osGroup}.${architecture}.Release\" \\
2865 --limitedDumpGeneration \\
2866 ${testEnvOpt} ${serverGCString} ${gcstressStr} ${crossgenStr} ${runcrossgentestsStr} ${runjitstressStr} ${runjitstressregsStr} ${runjitmioptsStr} ${runjitforcerelocsStr} ${runjitdisasmStr} ${sequentialString} ${playlistString}""")
2871 if (scenario == 'coverage') {
2872 // Publish coverage reports
2873 Utilities.addHtmlPublisher(newJob, '${WORKSPACE}/coverage/Coverage/reports', 'Code Coverage Report', 'coreclr.html')
2874 // TODO: Add once external email sending is available again
2875 // addEmailPublisher(newJob, 'clrcoverage@microsoft.com')
2878 if (scenario == 'jitdiff') {
2879 Utilities.addArchival(newJob, "bin/tests/${osGroup}.${architecture}.${configuration}/dasm/**")
2882 // Experimental: If on Ubuntu 14.04, then attempt to pull in crash dump links
2883 if (os in ['Ubuntu']) {
2884 SummaryBuilder summaries = new SummaryBuilder()
2885 summaries.addLinksSummaryFromFile('Crash dumps from this run:', 'dumplings.txt')
2886 summaries.emit(newJob)
2889 setMachineAffinity(newJob, os, architecture)
2890 Utilities.standardJobSetup(newJob, project, isPR, "*/${branch}")
2891 // Set timeouts to 240.
2892 setTestJobTimeOut(newJob, scenario)
2893 Utilities.addXUnitDotNETResults(newJob, '**/coreclrtests.xml')
2895 // Create a build flow to join together the build and tests required to run this
2897 // Windows CoreCLR build and Linux CoreCLR build (in parallel) ->
2898 // Linux CoreCLR test
2899 def flowJobName = getJobName(configuration, architecture, os, scenario, false) + "_flow"
2900 def fullTestJobName = projectFolder + '/' + newJob.name
2901 // Add a reference to the input jobs for report purposes
2902 JobReport.Report.addReference(inputCoreCLRBuildName)
2903 JobReport.Report.addReference(inputWindowTestsBuildName)
2904 JobReport.Report.addReference(fullTestJobName)
2907 // If this is a coverage job, we don't copy any input coreCLR build - instead, we build it as part of the flow job,
2908 // so that coverage data can be preserved.
2909 if (scenario == 'coverage') {
2910 newFlowJob = buildFlowJob(Utilities.getFullJobName(project, flowJobName, isPR, folder)) {
2912 // Build the input Windows job
2913 windowsBuildJob = build(params, '${inputWindowTestsBuildName}')
2915 // And then build the test build
2916 build(params + [CORECLR_WINDOWS_BUILD: windowsBuildJob.build.number], '${fullTestJobName}')
2919 // Normal jobs copy a Windows build & a non-Windows build
2921 newFlowJob = buildFlowJob(Utilities.getFullJobName(project, flowJobName, isPR, folder)) {
2923 // Build the input jobs in parallel
2925 { coreclrBuildJob = build(params, '${inputCoreCLRBuildName}') },
2926 { windowsBuildJob = build(params, '${inputWindowTestsBuildName}') }
2929 // And then build the test build
2930 build(params + [CORECLR_BUILD: coreclrBuildJob.build.number,
2931 CORECLR_WINDOWS_BUILD: windowsBuildJob.build.number], '${fullTestJobName}')
2936 setMachineAffinity(newFlowJob, os, architecture)
2937 Utilities.standardJobSetup(newFlowJob, project, isPR, "*/${branch}")
2938 addTriggers(newFlowJob, branch, isPR, architecture, os, configuration, scenario, true, false, false)
2945 JobReport.Report.generateJobReport(out)
2947 // Make the call to generate the help job
2948 Utilities.createHelperJob(this, project, branch,
2949 "Welcome to the ${project} Repository", // This is prepended to the help message
2950 "Have a nice day!") // This is appended to the help message. You might put known issues here.