@@ -386,7 +386,7 @@ def static isArmWindowsScenario(def scenario) {
386386 return Constants . validArmWindowsScenarios. containsKey(scenario)
387387}
388388
389- def static setTestJobTimeOut (newJob , scenario ) {
389+ def static setTestJobTimeOut (newJob , isPR , architecture , scenario ) {
390390 if (isGCStressRelatedTesting(scenario)) {
391391 Utilities . setJobTimeout(newJob, 4320 )
392392 }
@@ -408,6 +408,14 @@ def static setTestJobTimeOut(newJob, scenario) {
408408 else if (isGcReliabilityFramework(scenario)) {
409409 Utilities . setJobTimeout(newJob, 1440 )
410410 }
411+ else if (architecture == ' arm' || architecture == ' armlb' || architecture == ' arm64' ) {
412+ Utilities . setJobTimeout(newJob, 240 )
413+ }
414+ else if (! (scenario == ' default' && isPR == true )) {
415+ // Pri-1 test builds take a long time. Default PR jobs are Pri-0; everything else is Pri-1
416+ // (see calculateBuildCommands()). So up the Pri-1 build jobs timeout.
417+ Utilities . setJobTimeout(newJob, 180 )
418+ }
411419 // Non-test jobs use the default timeout value.
412420}
413421
@@ -1564,7 +1572,7 @@ def static calculateBuildCommands(def newJob, def scenario, def branch, def isPR
15641572
15651573 buildCommands + = " python -u %WORKSPACE%\\ tests\\ scripts\\ run-corefx-tests.py -arch ${ arch} -ci_arch ${ architecture} -build_type ${ configuration} -fx_root ${ absoluteFxRoot} -fx_branch ${ branch} -env_script ${ envScriptPath} "
15661574
1567- setTestJobTimeOut(newJob, scenario)
1575+ setTestJobTimeOut(newJob, isPR, architecture, scenario)
15681576
15691577 // Archive and process (only) the test results
15701578 Utilities . addArchival(newJob, " ${ workspaceRelativeFxRoot} /bin/**/testResults.xml" )
@@ -1613,7 +1621,7 @@ def static calculateBuildCommands(def newJob, def scenario, def branch, def isPR
16131621
16141622 if (! isBuildOnly) {
16151623 Utilities . addXUnitDotNETResults(newJob, ' bin/**/TestRun*.xml' , true )
1616- setTestJobTimeOut(newJob, scenario)
1624+ setTestJobTimeOut(newJob, isPR, architecture, scenario)
16171625 }
16181626 }
16191627 break
@@ -1624,15 +1632,7 @@ def static calculateBuildCommands(def newJob, def scenario, def branch, def isPR
16241632 def machineAffinityOptions = [' use_arm64_build_machine' : true ]
16251633 setMachineAffinity(newJob, os, architecture, machineAffinityOptions)
16261634
1627- // Set time out
1628- setTestJobTimeOut(newJob, scenario)
1629-
1630- if ((scenario != ' gcstress0x3' ) && (scenario != ' gcstress0xc' ))
1631- {
1632- // Up the timeout for arm checked testing only.
1633- // Keep the longer timeout for gcstress.
1634- Utilities . setJobTimeout(newJob, 240 )
1635- }
1635+ setTestJobTimeOut(newJob, isPR, architecture, scenario)
16361636
16371637 def buildArchitecture = ' arm'
16381638
@@ -1662,14 +1662,7 @@ def static calculateBuildCommands(def newJob, def scenario, def branch, def isPR
16621662 def machineAffinityOptions = [' use_arm64_build_machine' : true ]
16631663 setMachineAffinity(newJob, os, architecture, machineAffinityOptions)
16641664
1665- // Set time out
1666- setTestJobTimeOut(newJob, scenario)
1667- if ((scenario != ' gcstress0x3' ) && (scenario != ' gcstress0xc' ))
1668- {
1669- // Up the timeout for arm checked testing only.
1670- // Keep the longer timeout for gcstress.
1671- Utilities . setJobTimeout(newJob, 240 )
1672- }
1665+ setTestJobTimeOut(newJob, isPR, architecture, scenario)
16731666
16741667 // Hack: build pri1 tests for arm/armlb/arm64 build job, until we have separate pri0 and pri1 builds for the flow job to use.
16751668 priority = ' 1'
@@ -1733,8 +1726,8 @@ def static calculateBuildCommands(def newJob, def scenario, def branch, def isPR
17331726 buildCommands + = " ${ bootstrapRidEnv} ./build.sh verbose ${ lowerConfiguration} ${ architecture} "
17341727 buildCommands + = " src/pal/tests/palsuite/runpaltests.sh \$ {WORKSPACE}/bin/obj/${ osGroup} .${ architecture} .${ configuration} \$ {WORKSPACE}/bin/paltestout"
17351728
1736- // Set time out
1737- setTestJobTimeOut(newJob, scenario)
1729+ setTestJobTimeOut(newJob, isPR, architecture, scenario)
1730+
17381731 // Basic archiving of the build
17391732 Utilities . addArchival(newJob, " bin/Product/**,bin/obj/*/tests/**/*.dylib,bin/obj/*/tests/**/*.so" , " bin/Product/**/.nuget/**" )
17401733 // And pal tests
@@ -1759,7 +1752,7 @@ def static calculateBuildCommands(def newJob, def scenario, def branch, def isPR
17591752
17601753 buildCommands + = " python -u \$ WORKSPACE/tests/scripts/run-corefx-tests.py -arch ${ architecture} -ci_arch ${ architecture} -build_type ${ configuration} -fx_root ${ absoluteFxRoot} -fx_branch ${ branch} -env_script ${ scriptFileName} "
17611754
1762- setTestJobTimeOut(newJob, scenario)
1755+ setTestJobTimeOut(newJob, isPR, architecture, scenario)
17631756
17641757 // Archive and process (only) the test results
17651758 Utilities . addArchival(newJob, " ${ workspaceRelativeFxRoot} /bin/**/testResults.xml" )
@@ -1776,7 +1769,7 @@ def static calculateBuildCommands(def newJob, def scenario, def branch, def isPR
17761769 buildCommands + = " mkdir ./bin/Product/Linux.arm64.${ configuration} /corefxNative"
17771770 buildCommands + = " cp fx/bin/Linux.arm64.Release/native/* ./bin/Product/Linux.arm64.${ configuration} /corefxNative"
17781771
1779- setTestJobTimeOut(newJob, scenario)
1772+ setTestJobTimeOut(newJob, isPR, architecture, scenario)
17801773 // Basic archiving of the build
17811774 Utilities . addArchival(newJob, " bin/Product/**,bin/obj/*/tests/**/*.dylib,bin/obj/*/tests/**/*.so" , " bin/Product/**/.nuget/**" )
17821775 }
@@ -2679,13 +2672,7 @@ Constants.allScenarios.each { scenario ->
26792672 setMachineAffinity(newJob, os, architecture, affinityOptions)
26802673 Utilities . standardJobSetup(newJob, project, isPR, " */${ branch} " )
26812674
2682- // REVIEW: Should the scenario-base timeout be set in the "else" clause of the "architecture==arm64"?
2683- // Should the "architecture==arm64" include arm/armlb?
2684- // Should we be overriding possibly higher timeouts that would be set by setTestJobTimeOut()?
2685- setTestJobTimeOut(newJob, scenario)
2686- if (architecture == ' arm64' ) {
2687- Utilities . setJobTimeout(newJob, 240 )
2688- }
2675+ setTestJobTimeOut(newJob, isPR, architecture, scenario)
26892676
26902677 if (windowsArmJob != true ) {
26912678 Utilities . addXUnitDotNETResults(newJob, ' **/coreclrtests.xml' )
0 commit comments