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 == 'Ubuntu' || os == 'Windows_NT' || os == 'OSX')
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")
1219 else if (configuration == 'Release') {
1220 Utilities.addGithubPRTriggerForBranch(job, branch, "${os} ${architecture} ${configuration} Build and Test",
1221 "(?i).*test\\W+${os}\\W+${architecture}\\W+${configuration}.*")
1225 if (configuration == 'Release') {
1226 Utilities.addGithubPRTriggerForBranch(job, branch, "${os} ${architecture} ${configuration} Priority 1 Build and Test")
1230 if (configuration == 'Release') {
1231 Utilities.addGithubPRTriggerForBranch(job, branch, "${os} ${architecture} ${configuration} IL RoundTrip Build and Test",
1232 "(?i).*test\\W+${os}\\W+${architecture}\\W+${configuration}\\W+${scenario}.*")
1236 if (configuration == 'Checked' || configuration == 'Release') {
1237 Utilities.addGithubPRTriggerForBranch(job, branch, "${os} ${architecture} ${configuration} R2R pri0 Build & Test",
1238 "(?i).*test\\W+${os}\\W+${architecture}\\W+${configuration}\\W+${scenario}.*")
1242 if (configuration == 'Checked' || configuration == 'Release') {
1243 Utilities.addGithubPRTriggerForBranch(job, branch, "${os} ${architecture} ${configuration} R2R pri1 Build & Test",
1244 "(?i).*test\\W+${os}\\W+${architecture}\\W+${configuration}\\W+${scenario}.*")
1247 case 'gcstress15_pri1r2r':
1248 if (configuration == 'Release' || configuration == 'Checked') {
1249 Utilities.addGithubPRTriggerForBranch(job, branch, "${os} ${architecture} ${configuration} GCStress 15 R2R pri1 Build & Test",
1250 "(?i).*test\\W+${os}\\W+${architecture}\\W+${configuration}\\W+${scenario}.*")
1253 case 'r2r_jitstress1':
1254 if (configuration == 'Release' || configuration == 'Checked') {
1255 Utilities.addGithubPRTriggerForBranch(job, branch, "${os} ${architecture} ${configuration} jitstress1 R2R Build & Test",
1256 "(?i).*test\\W+${os}\\W+${architecture}\\W+${configuration}\\W+${scenario}.*")
1259 case 'r2r_jitstress2':
1260 if (configuration == 'Release' || configuration == 'Checked') {
1261 Utilities.addGithubPRTriggerForBranch(job, branch, "${os} ${architecture} ${configuration} jitstress2 R2R Build & Test",
1262 "(?i).*test\\W+${os}\\W+${architecture}\\W+${configuration}\\W+${scenario}.*")
1265 case 'r2r_jitstressregs1':
1266 if (configuration == 'Release' || configuration == 'Checked') {
1267 Utilities.addGithubPRTriggerForBranch(job, branch, "${os} ${architecture} ${configuration} jitstressregs1 R2R Build & Test",
1268 "(?i).*test\\W+${os}\\W+${architecture}\\W+${configuration}\\W+${scenario}.*")
1271 case 'r2r_jitstressregs2':
1272 if (configuration == 'Release' || configuration == 'Checked') {
1273 Utilities.addGithubPRTriggerForBranch(job, branch, "${os} ${architecture} ${configuration} jitstressregs2 R2R Build & Test",
1274 "(?i).*test\\W+${os}\\W+${architecture}\\W+${configuration}\\W+${scenario}.*")
1277 case 'r2r_jitstressregs3':
1278 if (configuration == 'Release' || configuration == 'Checked') {
1279 Utilities.addGithubPRTriggerForBranch(job, branch, "${os} ${architecture} ${configuration} jitstressregs3 R2R Build & Test",
1280 "(?i).*test\\W+${os}\\W+${architecture}\\W+${configuration}\\W+${scenario}.*")
1283 case 'r2r_jitstressregs4':
1284 if (configuration == 'Release' || configuration == 'Checked') {
1285 Utilities.addGithubPRTriggerForBranch(job, branch, "${os} ${architecture} ${configuration} jitstressregs4 R2R Build & Test",
1286 "(?i).*test\\W+${os}\\W+${architecture}\\W+${configuration}\\W+${scenario}.*")
1289 case 'r2r_jitstressregs8':
1290 if (configuration == 'Release' || configuration == 'Checked') {
1291 Utilities.addGithubPRTriggerForBranch(job, branch, "${os} ${architecture} ${configuration} jitstressregs8 R2R Build & Test",
1292 "(?i).*test\\W+${os}\\W+${architecture}\\W+${configuration}\\W+${scenario}.*")
1295 case 'r2r_jitstressregsx10':
1296 if (configuration == 'Release' || configuration == 'Checked') {
1297 Utilities.addGithubPRTriggerForBranch(job, branch, "${os} ${architecture} ${configuration} jitstressregsx10 R2R Build & Test",
1298 "(?i).*test\\W+${os}\\W+${architecture}\\W+${configuration}\\W+${scenario}.*")
1301 case 'r2r_jitstressregsx80':
1302 if (configuration == 'Release' || configuration == 'Checked') {
1303 Utilities.addGithubPRTriggerForBranch(job, branch, "${os} ${architecture} ${configuration} jitstressregsx80 R2R Build & Test",
1304 "(?i).*test\\W+${os}\\W+${architecture}\\W+${configuration}\\W+${scenario}.*")
1307 case 'r2r_jitminopts':
1308 if (configuration == 'Release' || configuration == 'Checked') {
1309 Utilities.addGithubPRTriggerForBranch(job, branch, "${os} ${architecture} ${configuration} JITMinOpts R2R Build & Test",
1310 "(?i).*test\\W+${os}\\W+${architecture}\\W+${configuration}\\W+${scenario}.*")
1313 case 'r2r_jitforcerelocs':
1314 if (configuration == 'Release' || configuration == 'Checked') {
1315 Utilities.addGithubPRTriggerForBranch(job, branch, "${os} ${architecture} ${configuration} ForceRelocs R2R Build & Test",
1316 "(?i).*test\\W+${os}\\W+${architecture}\\W+${configuration}\\W+${scenario}.*")
1320 if (configuration == 'Release') {
1321 Utilities.addGithubPRTriggerForBranch(job, branch, "${os} ${architecture} ${configuration} Long-Running GC Build & Test",
1322 "(?i).*test\\W+${os}\\W+${architecture}\\W+${configuration}\\W+${scenario}.*")
1326 if (configuration == 'Release') {
1327 Utilities.addGithubPRTriggerForBranch(job, branch, "${os} ${architecture} ${configuration} GC Simulator",
1328 "(?i).*test\\W+${os}\\W+${architecture}\\W+${configuration}\\W+${scenario}.*")
1331 case 'standalone_gc':
1332 if (configuration == 'Release' || configuration == 'Checked') {
1333 Utilities.addGithubPRTriggerForBranch(job, branch, "${os} ${architecture} ${configuration} Standalone GC",
1334 "(?i).*test\\W+${os}\\W+${architecture}\\W+${configuration}\\W+${scenario}.*")
1338 Utilities.addGithubPRTriggerForBranch(job, branch, "${os} ${architecture} ${configuration} Build and Test (Jit - MinOpts)",
1339 "(?i).*test\\W+${os}\\W+${architecture}\\W+${configuration}\\W+${scenario}.*")
1342 Utilities.addGithubPRTriggerForBranch(job, branch, "${os} ${architecture} ${configuration} Build and Test (Jit - ForceRelocs)",
1343 "(?i).*test\\W+${os}\\W+${architecture}\\W+${configuration}\\W+${scenario}.*")
1346 Utilities.addGithubPRTriggerForBranch(job, branch, "${os} ${architecture} ${configuration} Build and Test (Jit - JitStress=1)",
1347 "(?i).*test\\W+${os}\\W+${architecture}\\W+${configuration}\\W+${scenario}.*")
1350 Utilities.addGithubPRTriggerForBranch(job, branch, "${os} ${architecture} ${configuration} Build and Test (Jit - JitStress=2)",
1351 "(?i).*test\\W+${os}\\W+${architecture}\\W+${configuration}\\W+${scenario}.*")
1353 case 'jitstressregs1':
1354 Utilities.addGithubPRTriggerForBranch(job, branch, "${os} ${architecture} ${configuration} Build and Test (Jit - JitStressRegs=1)",
1355 "(?i).*test\\W+${os}\\W+${architecture}\\W+${configuration}\\W+${scenario}.*")
1357 case 'jitstressregs2':
1358 Utilities.addGithubPRTriggerForBranch(job, branch, "${os} ${architecture} ${configuration} Build and Test (Jit - JitStressRegs=2)",
1359 "(?i).*test\\W+${os}\\W+${architecture}\\W+${configuration}\\W+${scenario}.*")
1361 case 'jitstressregs3':
1362 Utilities.addGithubPRTriggerForBranch(job, branch, "${os} ${architecture} ${configuration} Build and Test (Jit - JitStressRegs=3)",
1363 "(?i).*test\\W+${os}\\W+${architecture}\\W+${configuration}\\W+${scenario}.*")
1365 case 'jitstressregs4':
1366 Utilities.addGithubPRTriggerForBranch(job, branch, "${os} ${architecture} ${configuration} Build and Test (Jit - JitStressRegs=4)",
1367 "(?i).*test\\W+${os}\\W+${architecture}\\W+${configuration}\\W+${scenario}.*")
1369 case 'jitstressregs8':
1370 Utilities.addGithubPRTriggerForBranch(job, branch, "${os} ${architecture} ${configuration} Build and Test (Jit - JitStressRegs=8)",
1371 "(?i).*test\\W+${os}\\W+${architecture}\\W+${configuration}\\W+${scenario}.*")
1373 case 'jitstressregs0x10':
1374 Utilities.addGithubPRTriggerForBranch(job, branch, "${os} ${architecture} ${configuration} Build and Test (Jit - JitStressRegs=0x10)",
1375 "(?i).*test\\W+${os}\\W+${architecture}\\W+${configuration}\\W+${scenario}.*")
1377 case 'jitstressregs0x80':
1378 Utilities.addGithubPRTriggerForBranch(job, branch, "${os} ${architecture} ${configuration} Build and Test (Jit - JitStressRegs=0x80)",
1379 "(?i).*test\\W+${os}\\W+${architecture}\\W+${configuration}\\W+${scenario}.*")
1381 case 'jitstress2_jitstressregs1':
1382 case 'jitstress2_jitstressregs2':
1383 case 'jitstress2_jitstressregs3':
1384 case 'jitstress2_jitstressregs4':
1385 case 'jitstress2_jitstressregs8':
1386 case 'jitstress2_jitstressregs0x10':
1387 case 'jitstress2_jitstressregs0x80':
1392 case 'gcstress0xc_zapdisable':
1393 case 'gcstress0xc_zapdisable_jitstress2':
1394 case 'gcstress0xc_zapdisable_heapverify1':
1395 case 'gcstress0xc_jitstress1':
1396 case 'gcstress0xc_jitstress2':
1397 case 'gcstress0xc_minopts_heapverify1':
1398 def displayStr = getStressModeDisplayName(scenario)
1399 Utilities.addGithubPRTriggerForBranch(job, branch, "${os} ${architecture} ${configuration} Build and Test (Jit - ${displayStr})",
1400 "(?i).*test\\W+${os}\\W+${architecture}\\W+${configuration}\\W+${scenario}.*")
1402 case 'corefx_baseline':
1403 case 'corefx_minopts':
1404 case 'corefx_jitstress1':
1405 case 'corefx_jitstress2':
1406 case 'corefx_jitstressregs1':
1407 case 'corefx_jitstressregs2':
1408 case 'corefx_jitstressregs3':
1409 case 'corefx_jitstressregs4':
1410 case 'corefx_jitstressregs8':
1411 case 'corefx_jitstressregs0x10':
1412 case 'corefx_jitstressregs0x80':
1413 def displayName = 'CoreFx ' + getStressModeDisplayName(scenario)
1414 assert (os == 'Windows_NT') || (os in Constants.crossList)
1415 Utilities.addGithubPRTriggerForBranch(job, branch, "${os} ${architecture} ${configuration} Build and Test (Jit - ${displayName})",
1416 "(?i).*test\\W+${os}\\W+${scenario}.*")
1419 println("Unknown scenario: ${os} ${architecture} ${scenario}");
1424 // editor brace matching: }
1425 case 'x86compatjit': // editor brace matching: {
1426 assert (os == 'Windows_NT')
1428 def jit = 'compatjit'
1431 if (configuration == 'Checked') {
1432 Utilities.addGithubPRTriggerForBranch(job, branch, "${os} ${arch} ${jit} ${configuration} Build and Test",
1433 "(?i).*test\\W+${os}\\W+${arch}\\W+${jit}\\W+${configuration}.*")
1437 if (configuration == 'Release') {
1438 Utilities.addGithubPRTriggerForBranch(job, branch, "${os} ${arch} ${jit} ${configuration} Priority 1 Build and Test",
1439 "(?i).*test\\W+${os}\\W+${arch}\\W+${jit}\\W+${configuration}\\W+Priority 1 Build and Test.*")
1443 if (configuration == 'Release') {
1444 Utilities.addGithubPRTriggerForBranch(job, branch, "${os} ${arch} ${jit} ${configuration} IL RoundTrip Build and Test",
1445 "(?i).*test\\W+${os}\\W+${arch}\\W+${jit}\\W+${configuration}\\W+${scenario}.*")
1449 if (configuration == 'Checked' || configuration == 'Release') {
1450 Utilities.addGithubPRTriggerForBranch(job, branch, "${os} ${arch} ${jit} ${configuration} R2R pri0 Build & Test",
1451 "(?i).*test\\W+${os}\\W+${arch}\\W+${jit}\\W+${configuration}\\W+${scenario}.*")
1455 if (configuration == 'Checked' || configuration == 'Release') {
1456 Utilities.addGithubPRTriggerForBranch(job, branch, "${os} ${arch} ${jit} ${configuration} R2R pri1 Build & Test",
1457 "(?i).*test\\W+${os}\\W+${arch}\\W+${jit}\\W+${configuration}\\W+${scenario}.*")
1460 case 'gcstress15_pri1r2r':
1461 if (configuration == 'Release' || configuration == 'Checked') {
1462 Utilities.addGithubPRTriggerForBranch(job, branch, "${os} ${arch} ${jit} ${configuration} GCStress 15 R2R pri1 Build & Test",
1463 "(?i).*test\\W+${os}\\W+${arch}\\W+${jit}\\W+${configuration}\\W+${scenario}.*")
1466 case 'r2r_jitstress1':
1467 if (configuration == 'Release' || configuration == 'Checked') {
1468 Utilities.addGithubPRTriggerForBranch(job, branch, "${os} ${arch} ${jit} ${configuration} jitstress1 R2R Build & Test",
1469 "(?i).*test\\W+${os}\\W+${arch}\\W+${jit}\\W+${configuration}\\W+${scenario}.*")
1472 case 'r2r_jitstress2':
1473 if (configuration == 'Release' || configuration == 'Checked') {
1474 Utilities.addGithubPRTriggerForBranch(job, branch, "${os} ${arch} ${jit} ${configuration} jitstress2 R2R Build & Test",
1475 "(?i).*test\\W+${os}\\W+${arch}\\W+${jit}\\W+${configuration}\\W+${scenario}.*")
1478 case 'r2r_jitstressregs1':
1479 if (configuration == 'Release' || configuration == 'Checked') {
1480 Utilities.addGithubPRTriggerForBranch(job, branch, "${os} ${arch} ${jit} ${configuration} jitstressregs1 R2R Build & Test",
1481 "(?i).*test\\W+${os}\\W+${arch}\\W+${jit}\\W+${configuration}\\W+${scenario}.*")
1484 case 'r2r_jitstressregs2':
1485 if (configuration == 'Release' || configuration == 'Checked') {
1486 Utilities.addGithubPRTriggerForBranch(job, branch, "${os} ${arch} ${jit} ${configuration} jitstressregs2 R2R Build & Test",
1487 "(?i).*test\\W+${os}\\W+${arch}\\W+${jit}\\W+${configuration}\\W+${scenario}.*")
1490 case 'r2r_jitstressregs3':
1491 if (configuration == 'Release' || configuration == 'Checked') {
1492 Utilities.addGithubPRTriggerForBranch(job, branch, "${os} ${arch} ${jit} ${configuration} jitstressregs3 R2R Build & Test",
1493 "(?i).*test\\W+${os}\\W+${arch}\\W+${jit}\\W+${configuration}\\W+${scenario}.*")
1496 case 'r2r_jitstressregs4':
1497 if (configuration == 'Release' || configuration == 'Checked') {
1498 Utilities.addGithubPRTriggerForBranch(job, branch, "${os} ${arch} ${jit} ${configuration} jitstressregs4 R2R Build & Test",
1499 "(?i).*test\\W+${os}\\W+${arch}\\W+${jit}\\W+${configuration}\\W+${scenario}.*")
1502 case 'r2r_jitstressregs8':
1503 if (configuration == 'Release' || configuration == 'Checked') {
1504 Utilities.addGithubPRTriggerForBranch(job, branch, "${os} ${arch} ${jit} ${configuration} jitstressregs8 R2R Build & Test",
1505 "(?i).*test\\W+${os}\\W+${arch}\\W+${jit}\\W+${configuration}\\W+${scenario}.*")
1508 case 'r2r_jitstressregsx10':
1509 if (configuration == 'Release' || configuration == 'Checked') {
1510 Utilities.addGithubPRTriggerForBranch(job, branch, "${os} ${arch} ${jit} ${configuration} jitstressregsx10 R2R Build & Test",
1511 "(?i).*test\\W+${os}\\W+${arch}\\W+${jit}\\W+${configuration}\\W+${scenario}.*")
1514 case 'r2r_jitstressregsx80':
1515 if (configuration == 'Release' || configuration == 'Checked') {
1516 Utilities.addGithubPRTriggerForBranch(job, branch, "${os} ${arch} ${jit} ${configuration} jitstressregsx80 R2R Build & Test",
1517 "(?i).*test\\W+${os}\\W+${arch}\\W+${jit}\\W+${configuration}\\W+${scenario}.*")
1520 case 'r2r_jitminopts':
1521 if (configuration == 'Release' || configuration == 'Checked') {
1522 Utilities.addGithubPRTriggerForBranch(job, branch, "${os} ${arch} ${jit} ${configuration} JITMinOpts R2R Build & Test",
1523 "(?i).*test\\W+${os}\\W+${arch}\\W+${jit}\\W+${configuration}\\W+${scenario}.*")
1526 case 'r2r_jitforcerelocs':
1527 if (configuration == 'Release' || configuration == 'Checked') {
1528 Utilities.addGithubPRTriggerForBranch(job, branch, "${os} ${arch} ${jit} ${configuration} ForceRelocs R2R Build & Test",
1529 "(?i).*test\\W+${os}\\W+${arch}\\W+${jit}\\W+${configuration}\\W+${scenario}.*")
1533 if (configuration == 'Release') {
1534 Utilities.addGithubPRTriggerForBranch(job, branch, "${os} ${arch} ${jit} ${configuration} Long-Running GC Build & Test",
1535 "(?i).*test\\W+${os}\\W+${arch}\\W+${jit}\\W+${configuration}\\W+${scenario}.*")
1539 if (configuration == 'Release') {
1540 Utilities.addGithubPRTriggerForBranch(job, branch, "${os} ${arch} ${jit} ${configuration} GC Simulator",
1541 "(?i).*test\\W+${os}\\W+${arch}\\W+${jit}\\W+${configuration}\\W+${scenario}.*")
1544 case 'standalone_gc':
1545 if (configuration == 'Release' || configuration == 'Checked') {
1546 Utilities.addGithubPRTriggerForBranch(job, branch, "${os} ${architecture} ${configuration} Standalone GC", "(?i).*test\\W+${os}\\W+${configuration}\\W+${scenario}.*")
1550 Utilities.addGithubPRTriggerForBranch(job, branch, "${os} ${arch} ${jit} ${configuration} Build and Test (Jit - MinOpts)",
1551 "(?i).*test\\W+${os}\\W+${arch}\\W+${jit}\\W+${configuration}\\W+${scenario}.*")
1554 Utilities.addGithubPRTriggerForBranch(job, branch, "${os} ${arch} ${jit} ${configuration} Build and Test (Jit - ForceRelocs)",
1555 "(?i).*test\\W+${os}\\W+${arch}\\W+${jit}\\W+${configuration}\\W+${scenario}.*")
1558 Utilities.addGithubPRTriggerForBranch(job, branch, "${os} ${arch} ${jit} ${configuration} Build and Test (Jit - JitStress=1)",
1559 "(?i).*test\\W+${os}\\W+${arch}\\W+${jit}\\W+${configuration}\\W+${scenario}.*")
1562 Utilities.addGithubPRTriggerForBranch(job, branch, "${os} ${arch} ${jit} ${configuration} Build and Test (Jit - JitStress=2)",
1563 "(?i).*test\\W+${os}\\W+${arch}\\W+${jit}\\W+${configuration}\\W+${scenario}.*")
1565 case 'jitstressregs1':
1566 Utilities.addGithubPRTriggerForBranch(job, branch, "${os} ${arch} ${jit} ${configuration} Build and Test (Jit - JitStressRegs=1)",
1567 "(?i).*test\\W+${os}\\W+${arch}\\W+${jit}\\W+${configuration}\\W+${scenario}.*")
1569 case 'jitstressregs2':
1570 Utilities.addGithubPRTriggerForBranch(job, branch, "${os} ${arch} ${jit} ${configuration} Build and Test (Jit - JitStressRegs=2)",
1571 "(?i).*test\\W+${os}\\W+${arch}\\W+${jit}\\W+${configuration}\\W+${scenario}.*")
1573 case 'jitstressregs3':
1574 Utilities.addGithubPRTriggerForBranch(job, branch, "${os} ${arch} ${jit} ${configuration} Build and Test (Jit - JitStressRegs=3)",
1575 "(?i).*test\\W+${os}\\W+${arch}\\W+${jit}\\W+${configuration}\\W+${scenario}.*")
1577 case 'jitstressregs4':
1578 Utilities.addGithubPRTriggerForBranch(job, branch, "${os} ${arch} ${jit} ${configuration} Build and Test (Jit - JitStressRegs=4)",
1579 "(?i).*test\\W+${os}\\W+${arch}\\W+${jit}\\W+${configuration}\\W+${scenario}.*")
1581 case 'jitstressregs8':
1582 Utilities.addGithubPRTriggerForBranch(job, branch, "${os} ${arch} ${jit} ${configuration} Build and Test (Jit - JitStressRegs=8)",
1583 "(?i).*test\\W+${os}\\W+${arch}\\W+${jit}\\W+${configuration}\\W+${scenario}.*")
1585 case 'jitstressregs0x10':
1586 Utilities.addGithubPRTriggerForBranch(job, branch, "${os} ${arch} ${jit} ${configuration} Build and Test (Jit - JitStressRegs=0x10)",
1587 "(?i).*test\\W+${os}\\W+${arch}\\W+${jit}\\W+${configuration}\\W+${scenario}.*")
1589 case 'jitstressregs0x80':
1590 Utilities.addGithubPRTriggerForBranch(job, branch, "${os} ${arch} ${jit} ${configuration} Build and Test (Jit - JitStressRegs=0x80)",
1591 "(?i).*test\\W+${os}\\W+${arch}\\W+${jit}\\W+${configuration}\\W+${scenario}.*")
1593 case 'jitstress2_jitstressregs1':
1594 case 'jitstress2_jitstressregs2':
1595 case 'jitstress2_jitstressregs3':
1596 case 'jitstress2_jitstressregs4':
1597 case 'jitstress2_jitstressregs8':
1598 case 'jitstress2_jitstressregs0x10':
1599 case 'jitstress2_jitstressregs0x80':
1604 case 'gcstress0xc_zapdisable':
1605 case 'gcstress0xc_zapdisable_jitstress2':
1606 case 'gcstress0xc_zapdisable_heapverify1':
1607 case 'gcstress0xc_jitstress1':
1608 case 'gcstress0xc_jitstress2':
1609 case 'gcstress0xc_minopts_heapverify1':
1610 def displayStr = getStressModeDisplayName(scenario)
1611 Utilities.addGithubPRTriggerForBranch(job, branch, "${os} ${arch} ${jit} ${configuration} Build and Test (Jit - ${displayStr})",
1612 "(?i).*test\\W+${os}\\W+${arch}\\W+${jit}\\W+${configuration}\\W+${scenario}.*")
1614 case 'corefx_baseline':
1615 case 'corefx_minopts':
1616 case 'corefx_jitstress1':
1617 case 'corefx_jitstress2':
1618 case 'corefx_jitstressregs1':
1619 case 'corefx_jitstressregs2':
1620 case 'corefx_jitstressregs3':
1621 case 'corefx_jitstressregs4':
1622 case 'corefx_jitstressregs8':
1623 case 'corefx_jitstressregs0x10':
1624 case 'corefx_jitstressregs0x80':
1625 def displayName = 'CoreFx ' + getStressModeDisplayName(scenario)
1626 assert (os == 'Windows_NT')
1627 Utilities.addGithubPRTriggerForBranch(job, branch, "${os} ${arch} ${jit} ${configuration} Build and Test (Jit - ${displayName})",
1628 "(?i).*test\\W+${os}\\W+${arch}\\W+${jit}\\W+${configuration}\\W+${scenario}.*")
1631 println("Unknown scenario: ${os} ${arch} ${jit} ${scenario}");
1636 // editor brace matching: }
1637 case 'x86lb': // editor brace matching: {
1638 assert (os == 'Windows_NT')
1639 assert (scenario == 'default' ||
1640 scenario == 'r2r' ||
1641 scenario == 'pri1r2r' ||
1642 scenario == 'gcstress15_pri1r2r' ||
1643 scenario == 'longgc' ||
1644 scenario == 'gcsimulator' ||
1645 Constants.r2rJitStressScenarios.indexOf(scenario) != -1)
1648 def jit = 'legacy_backend'
1651 if (configuration == 'Checked') {
1652 Utilities.addGithubPRTriggerForBranch(job, branch, "${os} ${arch} ${jit} ${configuration} Build and Test",
1653 "(?i).*test\\W+${os}\\W+${arch}\\W+${jit}\\W+${configuration}.*")
1657 if (configuration == 'Release') {
1658 Utilities.addGithubPRTriggerForBranch(job, branch, "${os} ${arch} ${jit} ${configuration} R2R pri0 Build & Test",
1659 "(?i).*test\\W+${os}\\W+${arch}\\W+${jit}\\W+${configuration}\\W+${scenario}.*")
1663 if (configuration == 'Release') {
1664 Utilities.addGithubPRTriggerForBranch(job, branch, "${os} ${arch} ${jit} ${configuration} R2R pri1 Build & Test",
1665 "(?i).*test\\W+${os}\\W+${arch}\\W+${jit}\\W+${configuration}\\W+${scenario}.*")
1668 case 'gcstress15_pri1r2r':
1669 if (configuration == 'Release') {
1670 Utilities.addGithubPRTriggerForBranch(job, branch, "${os} ${arch} ${jit} ${configuration} GCStress 15 R2R pri1 Build & Test",
1671 "(?i).*test\\W+${os}\\W+${arch}\\W+${jit}\\W+${configuration}\\W+${scenario}.*")
1674 case 'r2r_jitstress1':
1675 if (configuration == 'Release' || configuration == 'Checked') {
1676 Utilities.addGithubPRTriggerForBranch(job, branch, "${os} ${arch} ${jit} ${configuration} jitstress1 R2R Build & Test",
1677 "(?i).*test\\W+${os}\\W+${arch}\\W+${jit}\\W+${configuration}\\W+${scenario}.*")
1680 case 'r2r_jitstress2':
1681 if (configuration == 'Release' || configuration == 'Checked') {
1682 Utilities.addGithubPRTriggerForBranch(job, branch, "${os} ${arch} ${jit} ${configuration} jitstress2 R2R Build & Test",
1683 "(?i).*test\\W+${os}\\W+${arch}\\W+${jit}\\W+${configuration}\\W+${scenario}.*")
1686 case 'r2r_jitstressregs1':
1687 if (configuration == 'Release' || configuration == 'Checked') {
1688 Utilities.addGithubPRTriggerForBranch(job, branch, "${os} ${arch} ${jit} ${configuration} jitstressregs1 R2R Build & Test",
1689 "(?i).*test\\W+${os}\\W+${arch}\\W+${jit}\\W+${configuration}\\W+${scenario}.*")
1692 case 'r2r_jitstressregs2':
1693 if (configuration == 'Release' || configuration == 'Checked') {
1694 Utilities.addGithubPRTriggerForBranch(job, branch, "${os} ${arch} ${jit} ${configuration} jitstressregs2 R2R Build & Test",
1695 "(?i).*test\\W+${os}\\W+${arch}\\W+${jit}\\W+${configuration}\\W+${scenario}.*")
1698 case 'r2r_jitstressregs3':
1699 if (configuration == 'Release' || configuration == 'Checked') {
1700 Utilities.addGithubPRTriggerForBranch(job, branch, "${os} ${arch} ${jit} ${configuration} jitstressregs3 R2R Build & Test",
1701 "(?i).*test\\W+${os}\\W+${arch}\\W+${jit}\\W+${configuration}\\W+${scenario}.*")
1704 case 'r2r_jitstressregs4':
1705 if (configuration == 'Release' || configuration == 'Checked') {
1706 Utilities.addGithubPRTriggerForBranch(job, branch, "${os} ${arch} ${jit} ${configuration} jitstressregs4 R2R Build & Test",
1707 "(?i).*test\\W+${os}\\W+${arch}\\W+${jit}\\W+${configuration}\\W+${scenario}.*")
1710 case 'r2r_jitstressregs8':
1711 if (configuration == 'Release' || configuration == 'Checked') {
1712 Utilities.addGithubPRTriggerForBranch(job, branch, "${os} ${arch} ${jit} ${configuration} jitstressregs8 R2R Build & Test",
1713 "(?i).*test\\W+${os}\\W+${arch}\\W+${jit}\\W+${configuration}\\W+${scenario}.*")
1716 case 'r2r_jitstressregsx10':
1717 if (configuration == 'Release' || configuration == 'Checked') {
1718 Utilities.addGithubPRTriggerForBranch(job, branch, "${os} ${arch} ${jit} ${configuration} jitstressregsx10 R2R Build & Test",
1719 "(?i).*test\\W+${os}\\W+${arch}\\W+${jit}\\W+${configuration}\\W+${scenario}.*")
1722 case 'r2r_jitstressregsx80':
1723 if (configuration == 'Release' || configuration == 'Checked') {
1724 Utilities.addGithubPRTriggerForBranch(job, branch, "${os} ${arch} ${jit} ${configuration} jitstressregsx80 R2R Build & Test",
1725 "(?i).*test\\W+${os}\\W+${arch}\\W+${jit}\\W+${configuration}\\W+${scenario}.*")
1728 case 'r2r_jitminopts':
1729 if (configuration == 'Release' || configuration == 'Checked') {
1730 Utilities.addGithubPRTriggerForBranch(job, branch, "${os} ${arch} ${jit} ${configuration} jitminopts R2R Build & Test",
1731 "(?i).*test\\W+${os}\\W+${arch}\\W+${jit}\\W+${configuration}\\W+${scenario}.*")
1734 case 'r2r_jitforcerelocs':
1735 if (configuration == 'Release' || configuration == 'Checked') {
1736 Utilities.addGithubPRTriggerForBranch(job, branch, "${os} ${arch} ${jit} ${configuration} jitforcerelocs R2R Build & Test",
1737 "(?i).*test\\W+${os}\\W+${arch}\\W+${jit}\\W+${configuration}\\W+${scenario}.*")
1741 if (configuration == 'Release') {
1742 Utilities.addGithubPRTriggerForBranch(job, branch, "${os} ${arch} ${jit} ${configuration} Long-Running GC Build & Test",
1743 "(?i).*test\\W+${os}\\W+${arch}\\W+${jit}\\W+${configuration}\\W+${scenario}.*")
1747 if (configuration == 'Release') {
1748 Utilities.addGithubPRTriggerForBranch(job, branch, "${os} ${arch} ${jit} ${configuration} GC Simulator",
1749 "(?i).*test\\W+${os}\\W+${arch}\\W+${jit}\\W+${configuration}\\W+${scenario}.*")
1752 case 'standalone_gc':
1753 if (configuration == 'Release' || configuration == 'Checked') {
1754 Utilities.addGithubPRTriggerForBranch(job, branch, "${os} ${architecture} ${configuration} Standalone GC", "(?i).*test\\W+${os}\\W+${configuration}\\W+${scenario}.*")
1758 println("Unknown scenario: ${os} ${arch} ${jit} ${scenario}");
1763 // editor brace matching: }
1765 println("Unknown architecture: ${architecture}");
1771 def static calculateBuildCommands(def newJob, def scenario, def branch, def isPR, def architecture, def configuration, def os, def enableCorefxTesting, def isBuildOnly, def isLinuxEmulatorBuild) {
1772 def buildCommands = [];
1773 def osGroup = getOSGroup(os)
1774 def lowerConfiguration = configuration.toLowerCase()
1776 // Calculate the build steps, archival, and xunit results
1778 case 'Windows_NT': // editor brace matching: {
1779 switch (architecture) {
1782 case 'x86compatjit':
1784 def arch = architecture
1787 // We need to explicitly run build-test.cmd with Exclude for x86compatjit and x86lb, so skip tests.
1788 if (architecture == 'x86compatjit') {
1790 buildOpts = 'compatjitcrossgen skiptests'
1792 else if (architecture == 'x86lb') {
1794 buildOpts = 'legacyjitcrossgen skiptests'
1797 if (Constants.jitStressModeScenarios.containsKey(scenario) ||
1798 scenario == 'default' ||
1799 scenario == 'r2r' ||
1800 scenario == 'jitdiff' ||
1801 Constants.r2rJitStressScenarios.indexOf(scenario) != -1) {
1802 buildOpts += enableCorefxTesting ? ' skiptests' : ''
1803 buildCommands += "set __TestIntermediateDir=int&&build.cmd ${lowerConfiguration} ${arch} ${buildOpts}"
1806 // For Pri 1 tests, we must shorten the output test binary path names.
1807 // if __TestIntermediateDir is already set, build-test.cmd will
1808 // output test binaries to that directory. If it is not set, the
1809 // binaries are sent to a default directory whose name is about
1810 // 35 characters long.
1812 else if (scenario == 'pri1' || scenario == 'pri1r2r' || scenario == 'gcstress15_pri1r2r'|| scenario == 'coverage') {
1813 buildCommands += "set __TestIntermediateDir=int&&build.cmd ${lowerConfiguration} ${arch} ${buildOpts} -priority=1"
1815 else if (scenario == 'ilrt') {
1816 // First do the build with skiptests and then build the tests with ilasm roundtrip
1817 buildCommands += "build.cmd ${lowerConfiguration} ${arch} ${buildOpts} skiptests"
1818 buildCommands += "set __TestIntermediateDir=int&&build-test.cmd ${lowerConfiguration} ${arch} -ilasmroundtrip"
1820 else if (isLongGc(scenario)) {
1821 buildCommands += "build.cmd ${lowerConfiguration} ${arch} ${buildOpts} skiptests"
1822 buildCommands += "set __TestIntermediateDir=int&&build-test.cmd ${lowerConfiguration} ${arch}"
1824 else if (scenario == 'standalone_gc') {
1825 buildCommands += "build.cmd ${lowerConfiguration} ${arch} ${buildOpts} buildstandalonegc"
1827 else if (scenario == 'formatting') {
1828 buildCommands += "python -u tests\\scripts\\format.py -c %WORKSPACE% -o Windows_NT -a ${arch}"
1829 Utilities.addArchival(newJob, "format.patch", "", true, false)
1833 println("Unknown scenario: ${scenario}")
1837 // If we are running a stress mode, we should write out the set of key
1838 // value env pairs to a file at this point and then we'll pass that to runtest.cmd
1841 //If this is a crossgen build, pass 'crossgen' to runtest.cmd
1842 def crossgenStr = ''
1843 def runcrossgentestsStr = ''
1844 def runjitstressStr = ''
1845 def runjitstressregsStr = ''
1846 def runjitmioptsStr = ''
1847 def runjitforcerelocsStr = ''
1848 def runjitdisasmStr = ''
1849 def gcstressStr = ''
1850 def runtestArguments = ''
1851 def gcTestArguments = ''
1853 if (scenario == 'r2r' ||
1854 scenario == 'pri1r2r' ||
1855 scenario == 'gcstress15_pri1r2r' ||
1856 Constants.r2rJitStressScenarios.indexOf(scenario) != -1) {
1857 crossgenStr = 'crossgen'
1858 runcrossgentestsStr = 'runcrossgentests'
1860 if (scenario == 'r2r_jitstress1'){
1861 runjitstressStr = 'jitstress 1'
1863 else if (scenario == 'r2r_jitstress2') {
1864 runjitstressStr = 'jitstress 2'
1866 else if (scenario == 'r2r_jitstressregs1'){
1867 runjitstressregsStr = 'jitstressregs 1'
1869 else if (scenario == 'r2r_jitstressregs2') {
1870 runjitstressregsStr = 'jitstressregs 2'
1872 else if (scenario == 'r2r_jitstressregs3') {
1873 runjitstressregsStr = 'jitstressregs 3'
1875 else if (scenario == 'r2r_jitstressregs4') {
1876 runjitstressregsStr = 'jitstressregs 4'
1878 else if (scenario == 'r2r_jitstressregs8') {
1879 runjitstressregsStr = 'jitstressregs 8'
1881 else if (scenario == 'r2r_jitstressregsx10') {
1882 runjitstressregsStr = 'jitstressregs x10'
1884 else if (scenario == 'r2r_jitstressregsx80') {
1885 runjitstressregsStr = 'jitstressregs x80'
1887 else if (scenario == 'r2r_jitminopts') {
1888 runjitmioptsStr = 'jitminopts'
1890 else if (scenario == 'r2r_jitforcerelocs') {
1891 runjitforcerelocsStr = 'jitforcerelocs'
1894 if (scenario == 'gcstress15_pri1r2r')
1896 gcstressStr = 'gcstresslevel 0xF'
1899 if (scenario == 'jitdiff')
1901 runjitdisasmStr = 'jitdisasm crossgen'
1904 if (isLongGc(scenario)) {
1905 gcTestArguments = "${scenario} sequential"
1908 runtestArguments = "${lowerConfiguration} ${arch} ${gcstressStr} ${crossgenStr} ${runcrossgentestsStr} ${runjitstressStr} ${runjitstressregsStr} ${runjitmioptsStr} ${runjitforcerelocsStr} ${runjitdisasmStr} ${gcTestArguments}"
1910 if (Constants.jitStressModeScenarios.containsKey(scenario)) {
1911 def stepScriptLocation = "%WORKSPACE%\\SetStressModes.bat"
1912 buildCommands += genStressModeScriptStep(os, scenario, Constants.jitStressModeScenarios[scenario], stepScriptLocation)
1914 if (enableCorefxTesting) {
1915 def workspaceRelativeFxRoot = "_/fx"
1916 def absoluteFxRoot = "%WORKSPACE%\\_\\fx"
1918 buildCommands += "python %WORKSPACE%\\tests\\scripts\\run-corefx-tests.py -arch ${arch} -build_type ${configuration} -fx_root ${absoluteFxRoot} -fx_branch ${branch} -env_script ${stepScriptLocation}"
1920 setTestJobTimeOut(newJob, scenario)
1922 // Archive and process (only) the test results
1923 Utilities.addArchival(newJob, "${workspaceRelativeFxRoot}/bin/**/testResults.xml")
1924 Utilities.addXUnitDotNETResults(newJob, "${workspaceRelativeFxRoot}/bin/**/testResults.xml")
1927 buildCommands += "%WORKSPACE%\\tests\\runtest.cmd ${runtestArguments} TestEnv ${stepScriptLocation}"
1930 else if (architecture == 'x64' || architecture == 'x86') {
1931 buildCommands += "tests\\runtest.cmd ${runtestArguments}"
1933 else if (architecture == 'x86compatjit') {
1934 def testEnvLocation = "%WORKSPACE%\\tests\\x86\\compatjit_x86_testenv.cmd"
1935 def excludeLocation = "%WORKSPACE%\\tests\\x86_legacy_backend_issues.targets"
1936 buildCommands += "build-test.cmd ${runtestArguments} Exclude ${excludeLocation}"
1937 buildCommands += "tests\\runtest.cmd ${runtestArguments} TestEnv ${testEnvLocation}"
1939 else if (architecture == 'x86lb') {
1940 def testEnvLocation = "%WORKSPACE%\\tests\\x86\\legacyjit_x86_testenv.cmd"
1941 def excludeLocation = "%WORKSPACE%\\tests\\x86_legacy_backend_issues.targets"
1942 buildCommands += "build-test.cmd ${runtestArguments} Exclude ${excludeLocation}"
1943 buildCommands += "tests\\runtest.cmd ${runtestArguments} TestEnv ${testEnvLocation}"
1947 if (!enableCorefxTesting) {
1948 // Run the rest of the build
1949 // Build the mscorlib for the other OS's
1950 buildCommands += "build.cmd ${lowerConfiguration} ${arch} linuxmscorlib"
1951 buildCommands += "build.cmd ${lowerConfiguration} ${arch} freebsdmscorlib"
1952 buildCommands += "build.cmd ${lowerConfiguration} ${arch} osxmscorlib"
1954 // Zip up the tests directory so that we don't use so much space/time copying
1955 // 10s of thousands of files around.
1956 buildCommands += "powershell -Command \"Add-Type -Assembly 'System.IO.Compression.FileSystem'; [System.IO.Compression.ZipFile]::CreateFromDirectory('.\\bin\\tests\\${osGroup}.${arch}.${configuration}', '.\\bin\\tests\\tests.zip')\"";
1958 if (!Constants.jitStressModeScenarios.containsKey(scenario)) {
1959 // For windows, pull full test results and test drops for x86/x64.
1960 // No need to pull for stress mode scenarios (downstream builds use the default scenario)
1961 Utilities.addArchival(newJob, "bin/Product/**,bin/tests/tests.zip")
1964 if (scenario == 'jitdiff') {
1965 // retrive jit-dasm output for base commit, and run jit-diff
1967 // if this is a build only job, we want to keep the default (build) artifacts for the flow job
1968 Utilities.addArchival(newJob, "bin/tests/${osGroup}.${arch}.${configuration}/dasm/**")
1973 if (architecture == 'x64' || !isPR) {
1974 Utilities.addXUnitDotNETResults(newJob, 'bin/**/TestRun*.xml')
1976 setTestJobTimeOut(newJob, scenario)
1981 assert (scenario == 'default')
1984 setTestJobTimeOut(newJob, scenario)
1986 if ( lowerConfiguration == "debug" ) {
1987 // For Debug builds, we will do a P1 test build
1988 buildCommands += "set __TestIntermediateDir=int&&build.cmd ${lowerConfiguration} ${architecture} -priority=1"
1991 buildCommands += "set __TestIntermediateDir=int&&build.cmd ${lowerConfiguration} ${architecture}"
1994 Utilities.addArchival(newJob, "bin/Product/**")
1997 assert (scenario == 'default') || (scenario == 'pri1r2r') || (scenario == 'gcstress0x3') || (scenario == 'gcstress0xc')
1999 setTestJobTimeOut(newJob, scenario)
2001 // Debug runs take too long to run. So build job only.
2002 if (lowerConfiguration == "debug") {
2003 buildCommands += "set __TestIntermediateDir=int&&build.cmd ${lowerConfiguration} ${architecture} toolset_dir C:\\ats2"
2006 buildCommands += "set __TestIntermediateDir=int&&build.cmd skiptests ${lowerConfiguration} ${architecture} toolset_dir C:\\ats2"
2007 // Test build and run are launched together.
2008 buildCommands += "python tests\\scripts\\arm64_post_build.py -repo_root %WORKSPACE% -arch ${architecture} -build_type ${lowerConfiguration} -scenario ${scenario} -key_location C:\\tools\\key.txt"
2009 //Utilities.addXUnitDotNETResults(newJob, 'bin/tests/testResults.xml')
2013 Utilities.addArchival(newJob, "bin/Product/**")
2016 println("Unknown architecture: ${architecture}");
2021 // editor brace matching: }
2030 case 'OpenSUSE13.2':
2031 case 'OpenSUSE42.1':
2032 case 'Fedora23': // editor brace matching: {
2033 switch (architecture) {
2036 case 'x86compatjit':
2038 def arch = architecture
2039 if (architecture == 'x86compatjit' || architecture == 'x86lb') {
2043 if (scenario == 'formatting') {
2044 buildCommands += "python tests/scripts/format.py -c \${WORKSPACE} -o Linux -a ${arch}"
2045 Utilities.addArchival(newJob, "format.patch", "", true, false)
2049 def standaloneGc = ''
2050 if (scenario == 'standalone_gc') {
2051 standaloneGc = 'buildstandalonegc'
2054 if (!enableCorefxTesting) {
2055 // We run pal tests on all OS but generate mscorlib (and thus, nuget packages)
2056 // only on supported OS platforms.
2057 if ((os == 'FreeBSD') || (os == 'OpenSUSE13.2'))
2059 buildCommands += "./build.sh skipmscorlib verbose ${lowerConfiguration} ${arch} ${standaloneGc}"
2063 def bootstrapRid = Utilities.getBoostrapPublishRid(os)
2064 def bootstrapRidEnv = bootstrapRid != null ? "__PUBLISH_RID=${bootstrapRid} " : ''
2065 buildCommands += "${bootstrapRidEnv}./build.sh verbose ${lowerConfiguration} ${arch} ${standaloneGc}"
2067 buildCommands += "src/pal/tests/palsuite/runpaltests.sh \${WORKSPACE}/bin/obj/${osGroup}.${arch}.${configuration} \${WORKSPACE}/bin/paltestout"
2070 setTestJobTimeOut(newJob, scenario)
2071 // Basic archiving of the build
2072 Utilities.addArchival(newJob, "bin/Product/**,bin/obj/*/tests/**/*.dylib,bin/obj/*/tests/**/*.so")
2074 Utilities.addXUnitDotNETResults(newJob, '**/pal_tests.xml')
2077 // Corefx stress testing
2078 assert os == 'Ubuntu'
2079 assert architecture == 'x64'
2080 assert lowerConfiguration == 'checked'
2081 assert Constants.jitStressModeScenarios.containsKey(scenario)
2084 buildCommands += "./build.sh verbose ${lowerConfiguration} ${architecture}"
2086 def scriptFileName = "\$WORKSPACE/set_stress_test_env.sh"
2087 buildCommands += genStressModeScriptStep(os, scenario, Constants.jitStressModeScenarios[scenario], scriptFileName)
2089 // Build and text corefx
2090 def workspaceRelativeFxRoot = "_/fx"
2091 def absoluteFxRoot = "\$WORKSPACE/${workspaceRelativeFxRoot}"
2093 buildCommands += "python \$WORKSPACE/tests/scripts/run-corefx-tests.py -arch ${arch} -build_type ${configuration} -fx_root ${absoluteFxRoot} -fx_branch ${branch} -env_script ${scriptFileName}"
2095 setTestJobTimeOut(newJob, scenario)
2097 // Archive and process (only) the test results
2098 Utilities.addArchival(newJob, "${workspaceRelativeFxRoot}/bin/**/testResults.xml")
2099 Utilities.addXUnitDotNETResults(newJob, "${workspaceRelativeFxRoot}/bin/**/testResults.xml")
2103 // We don't run the cross build except on Ubuntu
2104 assert os == 'Ubuntu'
2106 buildCommands += """echo \"Using rootfs in /opt/aarch64-linux-gnu-root\"
2107 ROOTFS_DIR=/opt/aarch64-linux-gnu-root ./build.sh skipmscorlib arm64 cross verbose ${lowerConfiguration}"""
2109 // Basic archiving of the build, no pal tests
2110 Utilities.addArchival(newJob, "bin/Product/**")
2113 // All builds for ARM architecture are run on Ubuntu currently
2114 assert os == 'Ubuntu'
2115 if (isLinuxEmulatorBuild == false) {
2116 buildCommands += """echo \"Using rootfs in /opt/arm-liux-genueabihf-root\"
2117 ROOTFS_DIR=/opt/arm-linux-genueabihf-root ./build.sh skipmscorlib arm cross verbose ${lowerConfiguration}"""
2119 // Basic archiving of the build, no pal tests
2120 Utilities.addArchival(newJob, "bin/Product/**")
2124 // Make sure the build configuration is either of debug or release
2125 assert ( lowerConfiguration == 'debug' ) || ( lowerConfiguration == 'release' )
2127 // Setup variables to hold emulator folder path and the rootfs mount path
2128 def armemul_path = '/opt/linux-arm-emulator'
2129 def armrootfs_mountpath = '/opt/linux-arm-emulator-root'
2131 // Unzip the Windows test binaries first. Exit with 0
2132 buildCommands += "unzip -q -o ./bin/tests/tests.zip -d ./bin/tests/Windows_NT.x64.${configuration} || exit 0"
2134 // Unpack the corefx binaries
2135 buildCommands += "tar -xf ./bin/build.tar.gz"
2137 // Call the ARM emulator build script to cross build and test using the ARM emulator rootfs
2138 buildCommands += """./tests/scripts/arm32_ci_script.sh \\
2139 --emulatorPath=${armemul_path} \\
2140 --mountPath=${armrootfs_mountpath} \\
2141 --buildConfig=${lowerConfiguration} \\
2142 --testRootDir=./bin/tests/Windows_NT.x64.${configuration} \\
2143 --coreFxNativeBinDir=./bin/Linux.armel.${configuration} \\
2144 --coreFxBinDir=\"./bin/Linux.AnyCPU.${configuration};./bin/Unix.AnyCPU.${configuration};./bin/AnyOS.AnyCPU.${configuration}\" \\
2145 --testDirFile=./tests/testsRunningInsideARM.txt"""
2148 // Basic archiving of the build
2149 Utilities.addArchival(newJob, "bin/Product/**")
2153 println("Unknown architecture: ${architecture}");
2158 // editor brace matching: }
2160 println("Unknown os: ${os}");
2165 return buildCommands
2168 // Additional scenario which can alter behavior
2170 def combinedScenarios = Constants.basicScenarios + Constants.jitStressModeScenarios.keySet()
2171 combinedScenarios.each { scenario ->
2172 [true, false].each { isPR ->
2173 Constants.architectureList.each { architecture ->
2174 Constants.configurationList.each { configuration ->
2175 Constants.osList.each { os ->
2176 // If the OS is Windows_NT_BuildOnly, set the isBuildOnly flag to true
2177 // and reset the os to Windows_NT
2178 def isBuildOnly = false
2179 if (os == 'Windows_NT_BuildOnly') {
2184 // WinArm32 is only built for Debug and Release
2185 if (os == 'Windows_NT' && architecture == 'arm')
2187 if (configuration == 'Checked')
2192 // If the OS is LinuxARMEmulator and arch is arm, set the isLinuxEmulatorBuild
2193 // flag to true and reset the os to Ubuntu
2194 // The isLinuxEmulatorBuild flag will be used at a later time to execute the right
2195 // set of build commands
2196 // The tuples (LinuxARMEmulator, other architectures) are not handled and control returns
2197 def isLinuxEmulatorBuild = false
2198 if (os == 'LinuxARMEmulator' && architecture == 'arm') {
2199 // Cross Builds only in Debug and Release modes allowed
2200 if ( configuration == 'Checked' ) {
2204 isLinuxEmulatorBuild = true
2206 } else if (os == 'LinuxARMEmulator') {
2210 // Skip totally unimplemented (in CI) configurations.
2211 switch (architecture) {
2214 if (os != 'Windows_NT' || isBuildOnly) {
2219 if ((os != 'Ubuntu') && (os != 'Windows_NT')) {
2224 case 'x86compatjit':
2227 if (os != 'Windows_NT') {
2232 // Everything implemented
2235 println("Unknown architecture: ${architecture}")
2240 // Skip scenarios (blanket skipping for jit stress modes, which are good most everywhere
2241 // with checked builds
2242 def enableCorefxTesting = false
2243 if (Constants.jitStressModeScenarios.containsKey(scenario)) {
2244 if (configuration != 'Checked') {
2248 enableCorefxTesting = isCorefxTesting(scenario)
2250 // Since these are just execution time differences,
2251 // skip platforms that don't execute the tests here (Windows_NT only)
2252 def isEnabledOS = (os == 'Windows_NT') || (os == 'Ubuntu' && enableCorefxTesting)
2253 if (!isEnabledOS || isBuildOnly) {
2257 switch (architecture) {
2259 if ((scenario != 'gcstress0x3') && (scenario != 'gcstress0xc')) {
2265 // Everything implemented
2267 case 'x86compatjit':
2269 // No stress modes for compatjit.dll, legacyjit.dll.
2270 // (There's no technical reason we couldn't allow these.)
2277 // If this is a r2r jitstress, jitstressregs, jitminopts, or forcerelocs scenario
2278 // and configuration is not Checked, bail out.
2279 if (configuration != 'Checked' && Constants.r2rJitStressScenarios.indexOf(scenario) != -1) {
2286 // The pri1 build isn't necessary except for Windows_NT. Non-Windows NT uses
2287 // the default scenario build
2288 if (os != 'Windows_NT') {
2292 if (architecture != 'x64') {
2297 // The ilrt build isn't necessary except for Windows_NT. Non-Windows NT uses
2298 // the default scenario build
2299 if (os != 'Windows_NT') {
2303 if (architecture != 'x64') {
2307 if (configuration != 'Release') {
2312 if (os != 'Windows_NT' && os != 'Ubuntu' && os != 'OSX') {
2315 if (architecture != 'x64') {
2318 if (configuration != 'Checked') {
2323 // The r2r build isn't necessary except for Windows_NT. Non-Windows NT uses
2324 // the default scenario build
2325 if (os != 'Windows_NT') {
2328 if (architecture != 'x64') {
2333 // The pri1r2r build isn't necessary except for Windows_NT. Non-Windows NT uses
2334 // the default scenario build
2335 if (os != 'Windows_NT') {
2338 if (architecture != 'x64') {
2339 if (architecture != 'arm64' || configuration == 'Debug') {
2344 case 'gcstress15_pri1r2r':
2345 case 'r2r_jitstress1':
2346 case 'r2r_jitstress2':
2347 case 'r2r_jitstressregs1':
2348 case 'r2r_jitstressregs2':
2349 case 'r2r_jitstressregs3':
2350 case 'r2r_jitstressregs4':
2351 case 'r2r_jitstressregs8':
2352 case 'r2r_jitstressregsx10':
2353 case 'r2r_jitstressregsx80':
2354 case 'r2r_jitminopts':
2355 case 'r2r_jitforcerelocs':
2356 // The above builds are not necessary except for Windows_NT. Non-Windows NT uses
2357 // the default scenario build
2358 if (os != 'Windows_NT') {
2361 if (architecture != 'x64') {
2367 if (os != 'Windows_NT' && os != 'Ubuntu' && os != 'OSX') {
2370 if (architecture != 'x64') {
2373 if (configuration != 'Release') {
2377 case 'standalone_gc':
2378 if (os != 'Windows_NT' && os != 'Ubuntu' && os != 'OSX') {
2382 if (architecture != 'x64') {
2386 if (configuration != 'Release' && configuration != 'Checked') {
2390 // We need Windows x64 Release bits for the code coverage build
2392 if (os != 'Windows_NT') {
2395 if (architecture != 'x64') {
2398 if (configuration != 'Release') {
2402 // We only run Windows and Ubuntu x64 Checked for formatting right now
2404 if (os != 'Windows_NT' && os != 'Ubuntu') {
2407 if (architecture != 'x64') {
2410 if (configuration != 'Checked') {
2421 println("Unknown scenario: ${scenario}")
2428 def lowerConfiguration = configuration.toLowerCase()
2429 def jobName = getJobName(configuration, architecture, os, scenario, isBuildOnly, isLinuxEmulatorBuild)
2430 def folderName = isJITStressJob(scenario) ? 'jitstress' : '';
2432 // Create the new job
2433 def newJob = job(Utilities.getFullJobName(project, jobName, isPR, folderName)) {}
2435 setMachineAffinity(newJob, os, architecture)
2437 // Add all the standard options
2438 Utilities.standardJobSetup(newJob, project, isPR, "*/${branch}")
2439 addTriggers(newJob, branch, isPR, architecture, os, configuration, scenario, false, isBuildOnly, isLinuxEmulatorBuild)
2441 def buildCommands = calculateBuildCommands(newJob, scenario, branch, isPR, architecture, configuration, os, enableCorefxTesting, isBuildOnly, isLinuxEmulatorBuild)
2442 def osGroup = getOSGroup(os)
2446 if (os == 'Windows_NT') {
2447 buildCommands.each { buildCommand ->
2448 batchFile(buildCommand)
2452 // Setup corefx and Windows test binaries for Linux ARM Emulator Build
2453 if (isLinuxEmulatorBuild) {
2454 // Define the Windows Tests and Corefx build job names
2455 def WindowTestsName = projectFolder + '/' +
2456 Utilities.getFullJobName(project,
2457 getJobName(lowerConfiguration,
2463 def corefxFolder = Utilities.getFolderName('dotnet/corefx') + '/' +
2464 Utilities.getFolderName(branch)
2466 // Copy the Windows test binaries and the Corefx build binaries
2467 copyArtifacts(WindowTestsName) {
2468 excludePatterns('**/testResults.xml', '**/*.ni.dll')
2470 latestSuccessful(true)
2473 copyArtifacts("${corefxFolder}/linuxarmemulator_softfp_cross_${lowerConfiguration}") {
2474 includePatterns('bin/build.tar.gz')
2476 latestSuccessful(true)
2481 buildCommands.each { buildCommand ->
2495 // Create the Linux/OSX/CentOS coreclr test leg for debug and release and each scenario
2496 combinedScenarios.each { scenario ->
2497 [true, false].each { isPR ->
2498 // Architectures. x64 only at this point
2499 ['x64'].each { architecture ->
2500 // Put the OS's supported for coreclr cross testing here
2501 Constants.crossList.each { os ->
2502 Constants.configurationList.each { configuration ->
2504 if (Constants.jitStressModeScenarios.containsKey(scenario)) {
2505 if (configuration != 'Checked') {
2508 if (isCorefxTesting(scenario)) {
2511 //Skip stress modes for these scenarios
2512 if (os == 'RHEL7.2' || os == 'Debian8.4' || os == 'OpenSUSE13.2') {
2516 // If this is a r2r jitstress, jitstressregs, jitminopts or forcerelocs scenario
2517 // and configuration is not Checked, bail out.
2518 else if (configuration != 'Checked' && Constants.r2rJitStressScenarios.indexOf(scenario) != -1) {
2521 // For CentOS, we only want Checked/Release pri1 builds.
2522 else if (os == 'CentOS7.1') {
2523 if (scenario != 'pri1' &&
2524 scenario != 'r2r' &&
2525 scenario != 'pri1r2r' &&
2526 scenario != 'gcstress15_pri1r2r' &&
2527 Constants.r2rJitStressScenarios.indexOf(scenario) == -1) {
2530 if (configuration != 'Checked' && configuration != 'Release') {
2534 // For RedHat, Debian, and OpenSUSE, we only do Release pri1 builds.
2535 else if (os == 'RHEL7.2' || os == 'Debian8.4' || os == 'OpenSUSE13.2') {
2536 if (scenario != 'pri1') {
2539 if (configuration != 'Release') {
2551 if (configuration != 'Release') {
2556 if (configuration != 'Checked') {
2560 //Skip configs that aren't Checked or Release (so just Debug, for now)
2561 if (configuration != 'Checked' && configuration != 'Release') {
2566 //Skip configs that aren't Checked or Release (so just Debug, for now)
2567 if (configuration != 'Checked' && configuration != 'Release') {
2571 case 'gcstress15_pri1r2r':
2572 case 'r2r_jitstress1':
2573 case 'r2r_jitstress2':
2574 case 'r2r_jitstressregs1':
2575 case 'r2r_jitstressregs2':
2576 case 'r2r_jitstressregs3':
2577 case 'r2r_jitstressregs4':
2578 case 'r2r_jitstressregs8':
2579 case 'r2r_jitstressregsx10':
2580 case 'r2r_jitstressregsx80':
2581 case 'r2r_jitminopts':
2582 case 'r2r_jitforcerelocs':
2583 //Skip configs that aren't Checked or Release (so just Debug, for now)
2584 if (configuration != 'Checked' && configuration != 'Release') {
2590 // Long GC tests take a long time on non-Release builds
2591 if (configuration != 'Release') {
2595 case 'standalone_gc':
2596 if (configuration != 'Release' && configuration != 'Checked') {
2600 //We only want Ubuntu Release for coverage
2601 if (os != 'Ubuntu') {
2604 if (configuration != 'Release') {
2613 println("Unknown scenario: ${scenario}")
2619 def lowerConfiguration = configuration.toLowerCase()
2620 def osGroup = getOSGroup(os)
2621 def jobName = getJobName(configuration, architecture, os, scenario, false) + "_tst"
2623 // Unless this is a coverage test run, we want to copy over the default build of coreclr.
2624 def inputScenario = 'default'
2625 if (scenario == 'coverage') {
2626 inputScenario = 'coverage'
2628 def inputCoreCLRBuildName = projectFolder + '/' +
2629 Utilities.getFullJobName(project, getJobName(configuration, architecture, os, inputScenario, false), isPR)
2630 // If this is a stress scenario, there isn't any difference in the build job
2631 // so we didn't create a build only job for windows_nt specific to that stress mode. Just copy
2632 // from the default scenario
2633 def testBuildScenario = scenario
2634 if (testBuildScenario == 'coverage' || testBuildScenario == 'pri1r2r'|| testBuildScenario == 'gcstress15_pri1r2r') {
2635 testBuildScenario = 'pri1'
2637 else if ( testBuildScenario == 'r2r' || isLongGc(testBuildScenario)) {
2638 testBuildScenario = 'default'
2640 def inputWindowTestsBuildName = ''
2641 if (Constants.jitStressModeScenarios.containsKey(testBuildScenario)) {
2642 inputWindowTestsBuildName = projectFolder + '/' +
2643 Utilities.getFullJobName(project, getJobName(configuration, architecture, 'windows_nt', 'default', true), isPR)
2646 inputWindowTestsBuildName = projectFolder + '/' +
2647 Utilities.getFullJobName(project, getJobName(configuration, architecture, 'windows_nt', testBuildScenario, true), isPR)
2649 // Enable Server GC for Ubuntu PR builds
2650 def serverGCString = ''
2652 // Whether or not this test run should be run sequentially instead
2653 // of in parallel. Only used for long GC tests.
2654 def sequentialString = ''
2656 // Whether or not this test run should run a specific playlist.
2657 // Only used for long GC tests.
2659 // A note - runtest.sh does have "--long-gc" and "--gcsimulator" options
2660 // for running long GC and GCSimulator tests, respectively. We don't use them
2661 // here because using a playlist file produces much more readable output on the CI machines
2662 // and reduces running time.
2663 def playlistString = ''
2665 if (os == 'Ubuntu' && isPR){
2666 serverGCString = '--useServerGC'
2669 // pass --crossgen to runtest.sh for crossgen builds
2670 def crossgenStr = ''
2671 def runcrossgentestsStr = ''
2672 def runjitstressStr = ''
2673 def runjitstressregsStr = ''
2674 def runjitmioptsStr = ''
2675 def runjitforcerelocsStr = ''
2676 def runjitdisasmStr = ''
2677 def gcstressStr = ''
2679 if (scenario == 'r2r' ||
2680 scenario == 'pri1r2r' ||
2681 scenario == 'gcstress15_pri1r2r' ||
2682 Constants.r2rJitStressScenarios.indexOf(scenario) != -1) {
2683 crossgenStr = '--crossgen'
2684 runcrossgentestsStr = '--runcrossgentests'
2686 if (scenario == 'r2r_jitstress1'){
2687 runjitstressStr = '--jitstress=1'
2689 else if (scenario == 'r2r_jitstress2') {
2690 runjitstressStr = '--jitstress=2'
2692 else if (scenario == 'r2r_jitstressregs1'){
2693 runjitstressregsStr = '--jitstressregs=1'
2695 else if (scenario == 'r2r_jitstressregs2') {
2696 runjitstressregsStr = '--jitstressregs=2'
2698 else if (scenario == 'r2r_jitstressregs3') {
2699 runjitstressregsStr = '--jitstressregs=3'
2701 else if (scenario == 'r2r_jitstressregs4') {
2702 runjitstressregsStr = '--jitstressregs=4'
2704 else if (scenario == 'r2r_jitstressregs8') {
2705 runjitstressregsStr = '--jitstressregs=8'
2707 else if (scenario == 'r2r_jitstressregsx10') {
2708 runjitstressregsStr = '--jitstressregs=x10'
2710 else if (scenario == 'r2r_jitstressregsx80') {
2711 runjitstressregsStr = '--jitstressregs=x80'
2713 else if (scenario == 'r2r_jitminopts') {
2714 runjitmioptsStr = '--jitminopts'
2716 else if (scenario == 'r2r_jitforcerelocs') {
2717 runjitforcerelocsStr = '--jitforcerelocs'
2720 if (scenario == 'gcstress15_pri1r2r')
2722 gcstressStr = '--gcstresslevel=0xF'
2725 if (scenario == 'jitdiff')
2727 runjitdisasmStr = '--jitdisasm --crossgen'
2730 if (isLongGc(scenario)) {
2731 // Long GC tests behave very poorly when they are not
2732 // the only test running (many of them allocate until OOM).
2733 sequentialString = '--sequential'
2735 // The Long GC playlist contains all of the tests that are
2736 // going to be run. The GCSimulator playlist contains all of
2737 // the GC simulator tests.
2738 if (scenario == 'longgc') {
2739 playlistString = '--long-gc --playlist=./tests/longRunningGcTests.txt'
2741 else if (scenario == 'gcsimulator') {
2742 playlistString = '--gcsimulator --playlist=./tests/gcSimulatorTests.txt'
2746 def folder = isJITStressJob(scenario) ? 'jitstress' : ''
2747 def newJob = job(Utilities.getFullJobName(project, jobName, isPR, folder)) {
2748 // Add parameters for the inputs
2751 stringParam('CORECLR_WINDOWS_BUILD', '', 'Build number to copy CoreCLR windows test binaries from')
2752 stringParam('CORECLR_BUILD', '', "Build number to copy CoreCLR ${osGroup} binaries from")
2756 // Set up the copies
2758 // Coreclr build containing the tests and mscorlib
2760 copyArtifacts(inputWindowTestsBuildName) {
2761 excludePatterns('**/testResults.xml', '**/*.ni.dll')
2763 buildNumber('${CORECLR_WINDOWS_BUILD}')
2767 if (scenario == 'coverage') {
2769 // Move coreclr to clr directory
2770 shell("rm -rf .clr; mkdir .clr; mv * .clr; mv .git .clr; mv .clr clr")
2773 shell("./clr/build.sh coverage verbose ${lowerConfiguration} ${architecture}")
2775 // Remove folders from obj that we don't expect to be covered. May update this later.
2776 shell("rm -rf ./clr/bin/obj/Linux.x64.Release/src/ToolBox")
2777 shell("rm -rf ./clr/bin/obj/Linux.x64.Release/src/debug")
2778 shell("rm -rf ./clr/bin/obj/Linux.x64.Release/src/ilasm")
2779 shell("rm -rf ./clr/bin/obj/Linux.x64.Release/src/ildasm")
2780 shell("rm -rf ./clr/bin/obj/Linux.x64.Release/src/dlls/dbgshim")
2781 shell("rm -rf ./clr/bin/obj/Linux.x64.Release/src/dlls/mscordac")
2782 shell("rm -rf ./clr/bin/obj/Linux.x64.Release/src/dlls/mscordbi")
2785 shell("./clr/src/pal/tests/palsuite/runpaltests.sh \$(pwd)/clr/bin/obj/${osGroup}.${architecture}.${configuration} \$(pwd)/clr/bin/paltestout")
2787 // Remove obj files for PAL tests so they're not included in coverage results
2788 shell("rm -rf ./clr/bin/obj/Linux.x64.Release/src/pal/tests")
2790 // Unzip the tests first. Exit with 0
2791 shell("unzip -q -o ./clr/bin/tests/tests.zip -d ./clr/bin/tests/Windows_NT.${architecture}.${configuration} || exit 0")
2794 shell("git clone https://github.com/dotnet/corefx fx")
2796 // Build Linux corefx
2797 shell("./fx/build-native.sh -release -buildArch=x64 -os=Linux")
2798 shell("./fx/build-managed.sh -release -buildArch=x64 -osgroup=Linux -skiptests")
2801 def scriptFileName = "\$WORKSPACE/set_stress_test_env.sh"
2802 def createScriptCmds = genStressModeScriptStep(os, scenario, Constants.jitStressModeScenarios['heapverify1'], scriptFileName)
2803 shell("${createScriptCmds}")
2804 testEnvOpt = "--test-env=" + scriptFileName
2807 shell("""./fx/run-test.sh \\
2808 --coreclr-bins \$(pwd)/clr/bin/Product/${osGroup}.${architecture}.${configuration} \\
2809 --mscorlib-bins \$(pwd)/clr/bin/Product/${osGroup}.${architecture}.${configuration} \\
2810 --corefx-tests \$(pwd)/fx/bin/tests/${osGroup}.AnyCPU.${configuration} \\
2811 --corefx-native-bins \$(pwd)/fx/bin/${osGroup}.${architecture}.${configuration} \\
2812 --configurationGroup Release""")
2815 // Run coreclr tests w/ workstation GC
2816 shell("""./clr/tests/runtest.sh \\
2817 --testRootDir=\"\$(pwd)/clr/bin/tests/Windows_NT.${architecture}.${configuration}\" \\
2818 --testNativeBinDir=\"\$(pwd)/clr/bin/obj/${osGroup}.${architecture}.${configuration}/tests\" \\
2819 --coreClrBinDir=\"\$(pwd)/clr/bin/Product/${osGroup}.${architecture}.${configuration}\" \\
2820 --mscorlibDir=\"\$(pwd)/clr/bin/Product/${osGroup}.${architecture}.${configuration}\" \\
2821 --coreFxBinDir=\"\$(pwd)/fx/bin/runtime/netcoreapp-${osGroup}-Release-${architecture}\" \\
2822 --crossgen --runcrossgentests""")
2824 // Run coreclr tests w/ server GC & HeapVerify enabled
2825 shell("""./clr/tests/runtest.sh \\
2826 --testRootDir=\"\$(pwd)/clr/bin/tests/Windows_NT.${architecture}.${configuration}\" \\
2827 --testNativeBinDir=\"\$(pwd)/clr/bin/obj/${osGroup}.${architecture}.${configuration}/tests\" \\
2828 --coreOverlayDir=\"\$(pwd)/clr/bin/tests/Windows_NT.${architecture}.${configuration}/Tests/coreoverlay\" \\
2829 --useServerGC ${testEnvOpt}""")
2831 // Run long-running coreclr GC tests & produce coverage reports
2832 shell("""./clr/tests/runtest.sh \\
2833 --testRootDir=\"\$(pwd)/clr/bin/tests/Windows_NT.${architecture}.${configuration}\" \\
2834 --testNativeBinDir=\"\$(pwd)/clr/bin/obj/${osGroup}.${architecture}.${configuration}/tests\" \\
2835 --coreOverlayDir=\"\$(pwd)/clr/bin/tests/Windows_NT.${architecture}.${configuration}/Tests/coreoverlay\" \\
2836 --long-gc --playlist=\"\$(pwd)/clr/tests/longRunningGcTests.txt\" --coreclr-coverage\\
2837 --coreclr-objs=\"\$(pwd)/clr/bin/obj/${osGroup}.${architecture}.${configuration}\" \\
2838 --coreclr-src=\"\$(pwd)/clr/src\" \\
2839 --coverage-output-dir=\"\${WORKSPACE}/coverage\" """)
2844 // Coreclr build we are trying to test
2846 copyArtifacts(inputCoreCLRBuildName) {
2847 excludePatterns('**/testResults.xml', '**/*.ni.dll')
2849 buildNumber('${CORECLR_BUILD}')
2853 def corefxFolder = Utilities.getFolderName('dotnet/corefx') + '/' + Utilities.getFolderName(branch)
2855 // Corefx components. We now have full stack builds on all distros we test here, so we can copy straight from CoreFX jobs.
2856 def osJobName = (os == 'Ubuntu') ? 'ubuntu14.04' : os.toLowerCase()
2857 copyArtifacts("${corefxFolder}/${osJobName}_release") {
2858 includePatterns('bin/build.tar.gz')
2860 latestSuccessful(true)
2864 shell ("mkdir ./bin/CoreFxBinDir")
2865 // Unpack the corefx binaries
2866 shell("tar -xf ./bin/build.tar.gz -C ./bin/CoreFxBinDir")
2868 // Unzip the tests first. Exit with 0
2869 shell("unzip -q -o ./bin/tests/tests.zip -d ./bin/tests/Windows_NT.${architecture}.${configuration} || exit 0")
2871 // Execute the tests
2872 // If we are running a stress mode, we'll set those variables first
2874 if (Constants.jitStressModeScenarios.containsKey(scenario)) {
2875 def scriptFileName = "\$WORKSPACE/set_stress_test_env.sh"
2876 def createScriptCmds = genStressModeScriptStep(os, scenario, Constants.jitStressModeScenarios[scenario], scriptFileName)
2877 shell("${createScriptCmds}")
2878 testEnvOpt = "--test-env=" + scriptFileName
2881 if (isGCStressRelatedTesting(scenario)) {
2882 shell('./init-tools.sh')
2885 shell("""./tests/runtest.sh \\
2886 --testRootDir=\"\${WORKSPACE}/bin/tests/Windows_NT.${architecture}.${configuration}\" \\
2887 --testNativeBinDir=\"\${WORKSPACE}/bin/obj/${osGroup}.${architecture}.${configuration}/tests\" \\
2888 --coreClrBinDir=\"\${WORKSPACE}/bin/Product/${osGroup}.${architecture}.${configuration}\" \\
2889 --mscorlibDir=\"\${WORKSPACE}/bin/Product/${osGroup}.${architecture}.${configuration}\" \\
2890 --coreFxBinDir=\"\${WORKSPACE}/bin/CoreFxBinDir\" \\
2891 --limitedDumpGeneration \\
2892 ${testEnvOpt} ${serverGCString} ${gcstressStr} ${crossgenStr} ${runcrossgentestsStr} ${runjitstressStr} ${runjitstressregsStr} ${runjitmioptsStr} ${runjitforcerelocsStr} ${runjitdisasmStr} ${sequentialString} ${playlistString}""")
2897 if (scenario == 'coverage') {
2898 // Publish coverage reports
2899 Utilities.addHtmlPublisher(newJob, '${WORKSPACE}/coverage/Coverage/reports', 'Code Coverage Report', 'coreclr.html')
2900 // TODO: Add once external email sending is available again
2901 // addEmailPublisher(newJob, 'clrcoverage@microsoft.com')
2904 if (scenario == 'jitdiff') {
2905 Utilities.addArchival(newJob, "bin/tests/${osGroup}.${architecture}.${configuration}/dasm/**")
2908 // Experimental: If on Ubuntu 14.04, then attempt to pull in crash dump links
2909 if (os in ['Ubuntu']) {
2910 SummaryBuilder summaries = new SummaryBuilder()
2911 summaries.addLinksSummaryFromFile('Crash dumps from this run:', 'dumplings.txt')
2912 summaries.emit(newJob)
2915 setMachineAffinity(newJob, os, architecture)
2916 Utilities.standardJobSetup(newJob, project, isPR, "*/${branch}")
2917 // Set timeouts to 240.
2918 setTestJobTimeOut(newJob, scenario)
2919 Utilities.addXUnitDotNETResults(newJob, '**/coreclrtests.xml')
2921 // Create a build flow to join together the build and tests required to run this
2923 // Windows CoreCLR build and Linux CoreCLR build (in parallel) ->
2924 // Linux CoreCLR test
2925 def flowJobName = getJobName(configuration, architecture, os, scenario, false) + "_flow"
2926 def fullTestJobName = projectFolder + '/' + newJob.name
2927 // Add a reference to the input jobs for report purposes
2928 JobReport.Report.addReference(inputCoreCLRBuildName)
2929 JobReport.Report.addReference(inputWindowTestsBuildName)
2930 JobReport.Report.addReference(fullTestJobName)
2933 // If this is a coverage job, we don't copy any input coreCLR build - instead, we build it as part of the flow job,
2934 // so that coverage data can be preserved.
2935 if (scenario == 'coverage') {
2936 newFlowJob = buildFlowJob(Utilities.getFullJobName(project, flowJobName, isPR, folder)) {
2938 // Build the input Windows job
2939 windowsBuildJob = build(params, '${inputWindowTestsBuildName}')
2941 // And then build the test build
2942 build(params + [CORECLR_WINDOWS_BUILD: windowsBuildJob.build.number], '${fullTestJobName}')
2945 // Normal jobs copy a Windows build & a non-Windows build
2947 newFlowJob = buildFlowJob(Utilities.getFullJobName(project, flowJobName, isPR, folder)) {
2949 // Build the input jobs in parallel
2951 { coreclrBuildJob = build(params, '${inputCoreCLRBuildName}') },
2952 { windowsBuildJob = build(params, '${inputWindowTestsBuildName}') }
2955 // And then build the test build
2956 build(params + [CORECLR_BUILD: coreclrBuildJob.build.number,
2957 CORECLR_WINDOWS_BUILD: windowsBuildJob.build.number], '${fullTestJobName}')
2962 setMachineAffinity(newFlowJob, os, architecture)
2963 Utilities.standardJobSetup(newFlowJob, project, isPR, "*/${branch}")
2964 addTriggers(newFlowJob, branch, isPR, architecture, os, configuration, scenario, true, false, false)
2971 JobReport.Report.generateJobReport(out)
2973 // Make the call to generate the help job
2974 Utilities.createHelperJob(this, project, branch,
2975 "Welcome to the ${project} Repository", // This is prepended to the help message
2976 "Have a nice day!") // This is appended to the help message. You might put known issues here.