From 6d70c397703b15baaab08c742415147b5047d623 Mon Sep 17 00:00:00 2001 From: jashook Date: Wed, 10 Jan 2018 09:52:23 -0800 Subject: [PATCH] Add innerloop tag for pri0 jobs Everything that is not innerloop will run priority 1. --- netci.groovy | 134 ++++++++++++++++++++++++++++++++++++++++----------- 1 file changed, 105 insertions(+), 29 deletions(-) diff --git a/netci.groovy b/netci.groovy index 321d267f1041..0e6023f7addf 100755 --- a/netci.groovy +++ b/netci.groovy @@ -130,6 +130,7 @@ class Constants { // This is the basic set of scenarios def static basicScenarios = [ + 'innerloop', 'default', 'ilrt', 'r2r', @@ -524,8 +525,9 @@ def static isArmWindowsScenario(def scenario) { def static setJobTimeout(newJob, isPR, architecture, configuration, scenario, isBuildOnly) { // 2 hours (120 minutes) is the default timeout def timeout = 120 + def innerLoop = (scenario == "innerloop") - if (!(scenario == 'default' && isPR == true)) { + if (!innerLoop) { // Pri-1 test builds take a long time. Default PR jobs are Pri-0; everything else is Pri-1 // (see calculateBuildCommands()). So up the Pri-1 build jobs timeout. timeout = 240 @@ -744,14 +746,16 @@ def static getJobName(def configuration, def architecture, def os, def scenario, // Need to change around some systems and other builds to pick up the right builds // to do that. - def suffix = scenario != 'default' ? "_${scenario}" : ''; + def isDefaultOrInnerloop = (scenario == 'default' || scenario == 'innerloop') + + def suffix = !isDefaultOrInnerloop ? "_${scenario}" : ''; if (isBuildOnly) { suffix += '_bld' } def baseName = '' switch (architecture) { case 'x64': - if (scenario == 'default') { + if (scenario == 'default' || scenario == 'innerloop') { // For now we leave x64 off of the name for compatibility with other jobs baseName = configuration.toLowerCase() + '_' + os.toLowerCase() } @@ -1124,8 +1128,9 @@ def static addTriggers(def job, def branch, def isPR, def architecture, def os, if (scenario == 'formatting') { assert configuration == 'Checked' if (os == 'Windows_NT' || os == 'Ubuntu') { - Utilities.addGithubPRTriggerForBranch(job, branch, "${os} ${architecture} Innerloop Formatting") + Utilities.addGithubPRTriggerForBranch(job, branch, "${os} ${architecture} Formatting") } + break } @@ -1138,24 +1143,28 @@ def static addTriggers(def job, def branch, def isPR, def architecture, def os, Utilities.addGithubPRTriggerForBranch(job, branch, "${os} ${architecture} ${configuration} Build", "(?i).*test\\W+${os}.*") } break + case 'Ubuntu16.04': assert !isFlowJob assert scenario == 'default' // Distinguish with the other architectures (arm and x86) Utilities.addGithubPRTriggerForBranch(job, branch, "${os} ${architecture} ${configuration} Build", "(?i).*test\\W+${os}\\W+${architecture}.*") break + case 'Fedora24': case 'Ubuntu16.10': assert !isFlowJob assert scenario == 'default' Utilities.addGithubPRTriggerForBranch(job, branch, "${os} ${architecture} ${configuration} Build", "(?i).*test\\W+${os}\\W+.*") break + case 'Ubuntu': if (scenario == 'illink') { Utilities.addGithubPRTriggerForBranch(job, branch, "${os} ${architecture} ${configuration} via ILLink", "(?i).*test\\W+${os}\\W+${architecture}\\W+${configuration}\\W+${scenario}.*") break } // fall through + case 'OSX10.12': // Triggers on the non-flow jobs aren't necessary here // Corefx testing uses non-flow jobs. @@ -1163,44 +1172,58 @@ def static addTriggers(def job, def branch, def isPR, def architecture, def os, break } switch (scenario) { + case 'innerloop': + // PR Triggered jobs. These jobs will run pri0 tests. + if (configuration == 'Checked') { + Utilities.addGithubPRTriggerForBranch(job, branch, "${os} ${architecture} ${configuration} Innerloop Build and Test.*") + } + break + case 'default': // OSX uses checked for default PR tests if (configuration == 'Checked') { // Default trigger assert !job.name.contains("centos") - Utilities.addGithubPRTriggerForBranch(job, branch, "${os} ${architecture} ${configuration} Innerloop Build and Test") + Utilities.addGithubPRTriggerForBranch(job, branch, "${os} ${architecture} ${configuration} Build and Test", "(?i).*test\\W+${os}") } break + case 'jitdiff': if (configuration == 'Checked') { Utilities.addGithubPRTriggerForBranch(job, branch, "${os} ${architecture} ${configuration} Jit Diff Build and Test", "(?i).*test\\W+${os}\\W+${scenario}.*") } break + case 'ilrt': if (configuration == 'Release') { Utilities.addGithubPRTriggerForBranch(job, branch, "${os} ${architecture} ${configuration} IL RoundTrip Build and Test", "(?i).*test\\W+${os}\\W+${scenario}.*") } break + case 'longgc': if (configuration == 'Release') { Utilities.addGithubPRTriggerForBranch(job, branch, "${os} ${architecture} ${configuration} Long-Running GC Build & Test", "(?i).*test\\W+${os}\\W+${configuration}\\W+${scenario}.*") } break + case 'gcsimulator': if (configuration == 'Release') { Utilities.addGithubPRTriggerForBranch(job, branch, "${os} ${architecture} ${configuration} GC Simulator", "(?i).*test\\W+${os}\\W+${configuration}\\W+${scenario}.*") } break + case 'standalone_gc': if (configuration == 'Release' || configuration == 'Checked') { Utilities.addGithubPRTriggerForBranch(job, branch, "${os} ${architecture} ${configuration} Standalone GC", "(?i).*test\\W+${os}\\W+${configuration}\\W+${scenario}.*") } break + case 'gc_reliability_framework': if (configuration == 'Release' || configuration == 'Checked') { Utilities.addGithubPRTriggerForBranch(job, branch, "${os} ${architecture} ${configuration} GC Reliability Framework", "(?i).*test\\W+${os}\\W+${configuration}\\W+${scenario}.*") } break + default: if (isJitStressScenario(scenario)) { def displayStr = getStressModeDisplayName(scenario) @@ -1220,12 +1243,13 @@ def static addTriggers(def job, def branch, def isPR, def architecture, def os, assert false } break + } break case 'CentOS7.1': switch (scenario) { - case 'default': + case 'innerloop': // CentOS uses checked for default PR tests while debug is build only if (configuration == 'Debug') { // Default trigger @@ -1239,6 +1263,16 @@ def static addTriggers(def job, def branch, def isPR, def architecture, def os, Utilities.addGithubPRTriggerForBranch(job, branch, "${os} ${architecture} ${configuration} Innerloop Build and Test") } break + + case 'default': + // Make sure this is a flow job to get build and test. + if (configuration == 'Checked' && isFlowJob) { + assert job.name.contains("flow") + // Default trigger + Utilities.addGithubPRTriggerForBranch(job, branch, "${os} ${architecture} ${configuration} Build and Test", "(?i).*test\\W+${os}\\W+${architecture}.*") + } + break + default: if (isR2RScenario(scenario)) { if (configuration == 'Release' || configuration == 'Checked') { @@ -1248,50 +1282,65 @@ def static addTriggers(def job, def branch, def isPR, def architecture, def os, } } break + } break case 'Windows_NT': switch (scenario) { - case 'default': + case 'innerloop': // Default trigger if (configuration == 'Checked') { Utilities.addGithubPRTriggerForBranch(job, branch, "${os} ${architecture} ${configuration} Innerloop Build and Test") } break + + case 'default': + if (configuration == 'Checked') { + Utilities.addGithubPRTriggerForBranch(job, branch, "${os} ${architecture} ${configuration} Build and Test", "(?i).*test\\W+${os}.*") + } + break + case 'jitdiff': if (configuration == 'Checked') { Utilities.addGithubPRTriggerForBranch(job, branch, "${os} ${architecture} ${configuration} Jit Diff Build and Test", "(?i).*test\\W+${os}\\W+${scenario}.*") } break + case 'ilrt': if (configuration == 'Release') { Utilities.addGithubPRTriggerForBranch(job, branch, "${os} ${architecture} ${configuration} IL RoundTrip Build and Test", "(?i).*test\\W+${os}\\W+${scenario}.*") } break + case 'longgc': if (configuration == 'Release') { Utilities.addGithubPRTriggerForBranch(job, branch, "${os} ${architecture} ${configuration} Long-Running GC Build & Test", "(?i).*test\\W+${os}\\W+${configuration}\\W+${scenario}.*") } break + case 'gcsimulator': if (configuration == 'Release') { Utilities.addGithubPRTriggerForBranch(job, branch, "${os} ${architecture} ${configuration} GC Simulator", "(?i).*test\\W+${os}\\W+${configuration}\\W+${scenario}.*") } break + case 'standalone_gc': if (configuration == 'Release' || configuration == 'Checked') { Utilities.addGithubPRTriggerForBranch(job, branch, "${os} ${architecture} ${configuration} Standalone GC", "(?i).*test\\W+${os}\\W+${configuration}\\W+${scenario}.*") } break + case 'gc_reliability_framework': if (configuration == 'Release' || configuration == 'Checked') { Utilities.addGithubPRTriggerForBranch(job, branch, "${os} ${architecture} ${configuration} GC Reliability Framework", "(?i).*test\\W+${os}\\W+${configuration}\\W+${scenario}.*") } break + case 'illink': Utilities.addGithubPRTriggerForBranch(job, branch, "${os} ${architecture} ${configuration} via ILLink", "(?i).*test\\W+${os}\\W+${architecture}\\W+${configuration}\\W+${scenario}.*") break + default: if (isJitStressScenario(scenario)) { def displayStr = getStressModeDisplayName(scenario) @@ -1311,14 +1360,19 @@ def static addTriggers(def job, def branch, def isPR, def architecture, def os, assert false } break + } break + default: println("Unknown os: ${os}"); assert false break + } + break + // editor brace matching: } case 'armlb': case 'arm': // editor brace matching: { @@ -1328,7 +1382,8 @@ def static addTriggers(def job, def branch, def isPR, def architecture, def os, if (architecture == 'armlb') { // No arm legacy backend testing for Ubuntu break } - assert scenario == 'default' + + assert scenario == 'innerloop' job.with { publishers { azureVMAgentPostBuildAction { @@ -1336,6 +1391,7 @@ def static addTriggers(def job, def branch, def isPR, def architecture, def os, } } } + if (configuration == 'Debug') { Utilities.addGithubPRTriggerForBranch(job, branch, "${os} ${architecture} Cross ${configuration} Innerloop Build") } @@ -1344,11 +1400,13 @@ def static addTriggers(def job, def branch, def isPR, def architecture, def os, "(?i).*test\\W+${os}\\W+${architecture}\\W+Cross\\W+${configuration}\\W+Build.*") } break + case 'Tizen': if (architecture == 'armlb') { // No arm legacy backend testing for Tizen armel break } - architecture='armel' + + architecture = 'armel' job.with { publishers { azureVMAgentPostBuildAction { @@ -1356,6 +1414,9 @@ def static addTriggers(def job, def branch, def isPR, def architecture, def os, } } } + + assert scenario == 'innerloop' + if (configuration == 'Checked') { Utilities.addGithubPRTriggerForBranch(job, branch, "${os} ${architecture} Cross ${configuration} Innerloop Build and Test") } @@ -1364,6 +1425,7 @@ def static addTriggers(def job, def branch, def isPR, def architecture, def os, "(?i).*test\\W+${os}\\W+${architecture}\\W+Cross\\W+${configuration}\\W+Build.*") } break + case 'Windows_NT': // Triggers on the non-flow jobs aren't necessary here if (!isFlowJob) { @@ -1373,7 +1435,7 @@ def static addTriggers(def job, def branch, def isPR, def architecture, def os, // Set up a private trigger def contextString = "${os} ${architecture} Cross ${configuration}" def triggerString = "(?i).*test\\W+${os}\\W+${architecture}\\W+Cross\\W+${configuration}" - if (scenario == 'default') { + if (scenario == 'innerloop') { contextString += " Innerloop" triggerString += "\\W+Innerloop" } @@ -1393,8 +1455,8 @@ def static addTriggers(def job, def branch, def isPR, def architecture, def os, triggerString += ".*" switch (scenario) { - case 'default': - // Only Checked is a default trigger. + case 'innerloop': + // Only Checked is an innerloop trigger. if (configuration == 'Checked') { Utilities.addDefaultPrivateGithubPRTriggerForBranch(job, branch, contextString, null, arm64Users) @@ -1423,7 +1485,8 @@ def static addTriggers(def job, def branch, def isPR, def architecture, def os, // Set up a private trigger def contextString = "${os} ${architecture} Cross ${configuration}" def triggerString = "(?i).*test\\W+${os}\\W+${architecture}\\W+Cross\\W+${configuration}" - if (scenario == 'default') { + + if (scenario == 'innerloop') { contextString += " Innerloop" triggerString += "\\W+Innerloop" } @@ -1446,7 +1509,7 @@ def static addTriggers(def job, def branch, def isPR, def architecture, def os, case 'Ubuntu': case 'Ubuntu16.04': switch (scenario) { - case 'default': + case 'innerloop': if (configuration == 'Debug' && !isFlowJob) { Utilities.addGithubPRTriggerForBranch(job, branch, "${os} ${architecture} Cross ${configuration} Innerloop Build") } @@ -1465,6 +1528,7 @@ def static addTriggers(def job, def branch, def isPR, def architecture, def os, break } break + case 'Windows_NT': // Triggers on the non-flow jobs aren't necessary here if (!isFlowJob) { @@ -1473,7 +1537,7 @@ def static addTriggers(def job, def branch, def isPR, def architecture, def os, assert isArmWindowsScenario(scenario) switch (scenario) { - case 'default': + case 'innerloop': if (configuration == 'Checked') { Utilities.addDefaultPrivateGithubPRTriggerForBranch(job, branch, contextString, null, arm64Users) } @@ -1495,23 +1559,25 @@ def static addTriggers(def job, def branch, def isPR, def architecture, def os, break } break + // editor brace matching: } case 'x86': // editor brace matching: { - assert ((os == 'Windows_NT') || ((os == 'Ubuntu') && (scenario == 'default'))) + assert ((os == 'Windows_NT') || ((os == 'Ubuntu') && (scenario == 'innerloop'))) if (os == 'Ubuntu') { // Triggers on the non-flow jobs aren't necessary here if (!isFlowJob) { break } + // on-demand only for ubuntu x86 Utilities.addGithubPRTriggerForBranch(job, branch, "${os} ${architecture} ${configuration} Build", "(?i).*test\\W+${os}\\W+${architecture}\\W+${configuration}.*") break + } switch (scenario) { - case 'default': + case 'innerloop': if (configuration == 'Checked') { - assert !job.name.contains("centos") Utilities.addGithubPRTriggerForBranch(job, branch, "${os} ${architecture} ${configuration} Innerloop Build and Test") } else { @@ -1519,33 +1585,46 @@ def static addTriggers(def job, def branch, def isPR, def architecture, def os, "(?i).*test\\W+${os}\\W+${architecture}\\W+${configuration}.*") } break + + case 'default': + if (configuration == 'Checked') { + Utilities.addGithubPRTriggerForBranch(job, branch, "${os} ${architecture} ${configuration} Build and Test", + "(?i).*test\\W+${os}\\W+${architecture}\\W+${configuration}.*") + } + break + case 'ilrt': if (configuration == 'Release') { Utilities.addGithubPRTriggerForBranch(job, branch, "${os} ${architecture} ${configuration} IL RoundTrip Build and Test", "(?i).*test\\W+${os}\\W+${architecture}\\W+${configuration}\\W+${scenario}.*") } break + case 'longgc': if (configuration == 'Release') { Utilities.addGithubPRTriggerForBranch(job, branch, "${os} ${architecture} ${configuration} Long-Running GC Build & Test", "(?i).*test\\W+${os}\\W+${architecture}\\W+${configuration}\\W+${scenario}.*") } break + case 'gcsimulator': if (configuration == 'Release') { Utilities.addGithubPRTriggerForBranch(job, branch, "${os} ${architecture} ${configuration} GC Simulator", "(?i).*test\\W+${os}\\W+${architecture}\\W+${configuration}\\W+${scenario}.*") } break + case 'standalone_gc': if (configuration == 'Release' || configuration == 'Checked') { Utilities.addGithubPRTriggerForBranch(job, branch, "${os} ${architecture} ${configuration} Standalone GC", "(?i).*test\\W+${os}\\W+${architecture}\\W+${configuration}\\W+${scenario}.*") } break + case 'illink': Utilities.addGithubPRTriggerForBranch(job, branch, "${os} ${architecture} ${configuration} via ILLink", "(?i).*test\\W+${os}\\W+${architecture}\\W+${configuration}\\W+${scenario}.*") break + default: if (isJitStressScenario(scenario)) { def displayStr = getStressModeDisplayName(scenario) @@ -1564,8 +1643,10 @@ def static addTriggers(def job, def branch, def isPR, def architecture, def os, assert false } break + } break + // editor brace matching: } case 'x64_arm64_altjit': case 'x86_arm_altjit': // editor brace matching: { @@ -1581,6 +1662,7 @@ def static addTriggers(def job, def branch, def isPR, def architecture, def os, break } break + // editor brace matching: } default: println("Unknown architecture: ${architecture}"); @@ -1595,7 +1677,7 @@ def static calculateBuildCommands(def newJob, def scenario, def branch, def isPR def lowerConfiguration = configuration.toLowerCase() def priority = '1' - if (scenario == 'default' && isPR == true) { + if (scenario == 'innerloop') { priority = '0' } @@ -1809,9 +1891,6 @@ def static calculateBuildCommands(def newJob, def scenario, def branch, def isPR armCrossgenOpt = '-crossgenaltjit legacyjit.dll' } - // Hack: build pri1 tests for arm/armlb/arm64 build job, until we have separate pri0 and pri1 builds for the flow job to use. - priority = '1' - // This is now a build only job. Do not run tests. Use the flow job. buildCommands += "set __TestIntermediateDir=int&&build.cmd ${lowerConfiguration} ${buildArchitecture} -priority=${priority} ${armCrossgenOpt}" @@ -1827,9 +1906,6 @@ def static calculateBuildCommands(def newJob, def scenario, def branch, def isPR def machineAffinityOptions = ['use_arm64_build_machine' : true] setMachineAffinity(newJob, os, architecture, machineAffinityOptions) - - // Hack: build pri1 tests for arm/armlb/arm64 build job, until we have separate pri0 and pri1 builds for the flow job to use. - priority = '1' // This is now a build only job. Do not run tests. Use the flow job. buildCommands += "set __TestIntermediateDir=int&&build.cmd ${lowerConfiguration} ${architecture} toolset_dir C:\\ats2 -priority=${priority}" @@ -2329,13 +2405,13 @@ Constants.allScenarios.each { scenario -> else { // Non-Windows if (architecture == 'arm64') { - if (scenario != 'default' && scenario != 'r2r' && scenario != 'gcstress0x3' && scenario != 'gcstress0xc') { + if (scenario != 'innerloop' && scenario != 'default' && scenario != 'r2r' && scenario != 'gcstress0x3' && scenario != 'gcstress0xc') { return } } else if (architecture == 'x86') { // Linux/x86 only want default test - if (scenario != 'default') { + if (scenario != 'innerloop') { return } } @@ -2346,7 +2422,7 @@ Constants.allScenarios.each { scenario -> if (configuration != 'Checked' && configuration != 'Release') { return } - if (scenario != 'default' && !isR2RScenario(scenario) && !isJitStressScenario(scenario)) { + if (scenario != 'innerloop' && !isR2RScenario(scenario) && !isJitStressScenario(scenario)) { return } } @@ -2356,7 +2432,7 @@ Constants.allScenarios.each { scenario -> if (configuration != 'Release') { return } - if (scenario != 'default') { + if (scenario != 'innerloop') { return } }