summaryrefslogtreecommitdiff
path: root/netci.groovy
diff options
context:
space:
mode:
authorBruce Forstall <brucefo@microsoft.com>2017-12-20 13:37:02 -0800
committerBruce Forstall <brucefo@microsoft.com>2017-12-20 13:37:02 -0800
commit7a87eb21c63e8894d4c885594882b00d5da1c543 (patch)
treee52f77a810256964a960cdf79d7a2c0b9ecfb706 /netci.groovy
parent0500671ff7a6a9248771c25f9f9780858af6f6e4 (diff)
downloadcoreclr-7a87eb21c63e8894d4c885594882b00d5da1c543.tar.gz
coreclr-7a87eb21c63e8894d4c885594882b00d5da1c543.tar.bz2
coreclr-7a87eb21c63e8894d4c885594882b00d5da1c543.zip
Fix per-test timeout
1. Add "timeout" option to runtest.cmd to set the per-test timeout, in ms. 2. Change NETCI to use this new option. This should fix various random test failures that frequently occur in Debug test runs due to timeout (e.g., chaos and type generator tests).
Diffstat (limited to 'netci.groovy')
-rwxr-xr-xnetci.groovy16
1 files changed, 10 insertions, 6 deletions
diff --git a/netci.groovy b/netci.groovy
index 56cf9b01f8..9185d93cf1 100755
--- a/netci.groovy
+++ b/netci.groovy
@@ -473,12 +473,6 @@ def static getR2RDisplayName(def scenario) {
def static envScriptCreate(def os, def stepScriptLocation) {
def stepScript = ''
if (os == 'Windows_NT') {
- // Timeout in ms, default is 10 minutes. For stress modes up this to 30 minutes.
- // BUG?: it seems this is ignored, as this script will be run in an environment where
- // environment variables will be discarded before this is used.
- def timeout = 1800000
- stepScript += "set __TestTimeout=${timeout}\r\n"
-
stepScript += "echo Creating TestEnv script\r\n"
stepScript += "if exist ${stepScriptLocation} del ${stepScriptLocation}\r\n"
@@ -1528,6 +1522,16 @@ def static calculateBuildCommands(def newJob, def scenario, def branch, def isPR
testOpts += " link %WORKSPACE%\\linker\\linker\\bin\\netcore_Release\\netcoreapp2.0\\win10-${arch}\\publish\\illink.exe"
}
+ // Default per-test timeout is 10 minutes. For stress modes and Debug scenarios, increase this
+ // to 30 minutes (30 * 60 * 1000 = 180000). The "timeout" argument to runtest.cmd sets this, by
+ // taking a timeout value in milliseconds. (Note that it sets the __TestTimeout environment variable,
+ // which is read by the xunit harness.)
+ if (isJitStressScenario(scenario) || isR2RStressScenario(scenario) || (lowerConfiguration == 'debug'))
+ {
+ def timeout = 1800000
+ testOpts += " timeout ${timeout}"
+ }
+
// If we are running a stress mode, we should write out the set of key
// value env pairs to a file at this point and then we'll pass that to runtest.cmd