diff options
author | Sejong Oh <sejooh@microsoft.com> | 2016-03-07 14:28:07 -0800 |
---|---|---|
committer | Sejong Oh <sejooh@microsoft.com> | 2016-03-08 10:45:26 -0800 |
commit | 50242dc9cf55f710ae347cda448aa7f0362a9449 (patch) | |
tree | edacd3b5519df11c4b70864f9d20f2a6c6b72155 | |
parent | e454121ee731e35de9244596c4a5cd1563d455fe (diff) | |
download | coreclr-50242dc9cf55f710ae347cda448aa7f0362a9449.tar.gz coreclr-50242dc9cf55f710ae347cda448aa7f0362a9449.tar.bz2 coreclr-50242dc9cf55f710ae347cda448aa7f0362a9449.zip |
Fix GC stress setup failure on Unix-like OSes
-rw-r--r-- | netci.groovy | 44 |
1 files changed, 38 insertions, 6 deletions
diff --git a/netci.groovy b/netci.groovy index e8f9f4cc68..f64e9558a2 100644 --- a/netci.groovy +++ b/netci.groovy @@ -91,14 +91,39 @@ def static setMachineAffinity(def job, def os, def architecture) { } } +def static isGCStressRelatedTesting(def scenario) { + def gcStressTestEnvVars = [ 'COMPlus_GCStress', 'COMPlus_ZapDisable', 'COMPlus_HeapVerify'] + def scenarioName = scenario.toLowerCase() + def isGCStressTesting = false + Constants.jitStressModeScenarios[scenario].each{ k, v -> + if (k in gcStressTestEnvVars) { + isGCStressTesting = true; + } + } + return isGCStressTesting +} + def static isCorefxTesting(def scenario) { def corefx_prefix = 'corefx_' if (scenario.length() < corefx_prefix.length()) { - return + return false } return scenario.substring(0,corefx_prefix.length()) == corefx_prefix } +def static setTestJobTimeOut(newJob, scenario) { + if (isGCStressRelatedTesting(scenario)) { + Utilities.setJobTimeout(newJob, 720) + } + else if (isCorefxTesting(scenario)) { + Utilities.setJobTimeout(newJob, 360) + } + else if (Constants.jitStressModeScenarios.containsKey(scenario)) { + Utilities.setJobTimeout(newJob, 240) + } + // Non-test jobs use the default timeout value. +} + def static getStressModeDisplayName(def scenario) { def displayStr = '' Constants.jitStressModeScenarios[scenario].each{ k, v -> @@ -826,6 +851,7 @@ combinedScenarios.each { scenario -> if (architecture == 'x64' || !isPR) { Utilities.addXUnitDotNETResults(newJob, 'bin/**/TestRun*.xml') } + setTestJobTimeOut(newJob, scenario) } } else { @@ -833,8 +859,8 @@ combinedScenarios.each { scenario -> // For windows, pull full test results and test drops for x86/x64 Utilities.addArchival(newJob, "fx/bin/tests/**/testResults.xml") - // Set timeout to 240 - Utilities.setJobTimeout(newJob, 240) + // Set timeout + setTestJobTimeOut(newJob, scenario) if (architecture == 'x64' || !isPR) { Utilities.addXUnitDotNETResults(newJob, 'fx/bin/tests/**/testResults.xml') @@ -883,6 +909,8 @@ combinedScenarios.each { scenario -> } buildCommands += "src/pal/tests/palsuite/runpaltests.sh \${WORKSPACE}/bin/obj/${osGroup}.${architecture}.${configuration} \${WORKSPACE}/bin/paltestout" + // Set time out + setTestJobTimeOut(newJob, scenario) // Basic archiving of the build Utilities.addArchival(newJob, "bin/Product/**,bin/obj/*/tests/**") // And pal tests @@ -910,7 +938,7 @@ combinedScenarios.each { scenario -> // Archive and process test result Utilities.addArchival(newJob, "fx/bin/tests/**/testResults.xml") - Utilities.setJobTimeout(newJob, 360) + setTestJobTimeOut(newJob, scenario) Utilities.addXUnitDotNETResults(newJob, 'fx/bin/tests/**/testResults.xml') } break @@ -1096,6 +1124,10 @@ combinedScenarios.each { scenario -> stressModeString = genStressModeScriptStep(os, scenario, Constants.jitStressModeScenarios[scenario], null) } + if (isGCStressRelatedTesting(scenario)) { + shell('init-tools.sh') + } + shell("""${stressModeString} ./tests/runtest.sh \\ --testRootDir=\"\${WORKSPACE}/bin/tests/Windows_NT.${architecture}.${configuration}\" \\ @@ -1107,11 +1139,11 @@ combinedScenarios.each { scenario -> ${serverGCString}""") } } - + setMachineAffinity(newJob, os, architecture) Utilities.standardJobSetup(newJob, project, isPR, getFullBranchName(branchName)) // Set timeouts to 240. - Utilities.setJobTimeout(newJob, 240) + setTestJobTimeOut(newJob, scenario) Utilities.addXUnitDotNETResults(newJob, '**/coreclrtests.xml') // Create a build flow to join together the build and tests required to run this |