summaryrefslogtreecommitdiff
path: root/buildscripts
diff options
context:
space:
mode:
authorRichard Samuels <richard.l.samuels@gmail.com>2020-09-22 16:51:56 -0400
committerEvergreen Agent <no-reply@evergreen.mongodb.com>2020-11-05 16:41:31 +0000
commit80caa45a40672a199cbe2b299208a29bcb7ce02c (patch)
tree3f998426632332e2bd0ca22de089ec3e09f26d7f /buildscripts
parent019fd64964b76b7c62ea68f29be61fb6be3e2680 (diff)
downloadmongo-80caa45a40672a199cbe2b299208a29bcb7ce02c.tar.gz
SERVER-51097 Reduce maximum runtime of unittests "run tests" phase
Diffstat (limited to 'buildscripts')
-rwxr-xr-xbuildscripts/evergreen_task_timeout.py23
1 files changed, 22 insertions, 1 deletions
diff --git a/buildscripts/evergreen_task_timeout.py b/buildscripts/evergreen_task_timeout.py
index cee647e609c..9b12199daf9 100755
--- a/buildscripts/evergreen_task_timeout.py
+++ b/buildscripts/evergreen_task_timeout.py
@@ -11,9 +11,23 @@ COMMIT_QUEUE_ALIAS = "__commit_queue"
COMMIT_QUEUE_TIMEOUT_SECS = 40 * 60
DEFAULT_REQUIRED_BUILD_TIMEOUT_SECS = 30 * 60
DEFAULT_NON_REQUIRED_BUILD_TIMEOUT_SECS = 2 * 60 * 60
+# 2x the longest "run tests" phase for unittests as of c9bf1dbc9cc46e497b2f12b2d6685ef7348b0726,
+# which is 5 mins 47 secs, excluding outliers below
+UNITTESTS_TIMEOUT_SECS = 12 * 60
SPECIFIC_TASK_OVERRIDES = {
"linux-64-debug": {"auth": 60 * 60, },
+
+ # unittests outliers
+ # repeated execution runs a suite 10 times
+ "linux-64-repeated-execution": {"unittests": 10 * UNITTESTS_TIMEOUT_SECS},
+ # some of the a/ub/t san variants need a little extra time
+ "enterprise-ubuntu2004-debug-tsan": {"unittests": 2 * UNITTESTS_TIMEOUT_SECS},
+ "ubuntu1804-asan": {"unittests": 2 * UNITTESTS_TIMEOUT_SECS},
+ "ubuntu1804-ubsan": {"unittests": 2 * UNITTESTS_TIMEOUT_SECS},
+ "ubuntu1804-debug-asan": {"unittests": 2 * UNITTESTS_TIMEOUT_SECS},
+ "ubuntu1804-debug-aubsan-lite": {"unittests": 2 * UNITTESTS_TIMEOUT_SECS},
+ "ubuntu1804-debug-ubsan": {"unittests": 2 * UNITTESTS_TIMEOUT_SECS},
}
REQUIRED_BUILD_VARIANTS = {
@@ -23,16 +37,23 @@ REQUIRED_BUILD_VARIANTS = {
}
+def _has_override(variant: str, task_name: str) -> bool:
+ return variant in SPECIFIC_TASK_OVERRIDES and task_name in SPECIFIC_TASK_OVERRIDES[variant]
+
+
def determine_timeout(task_name: str, variant: str, timeout: int = 0, evg_alias: str = '') -> int:
"""Determine what timeout should be used."""
if timeout and timeout != 0:
return timeout
+ if task_name == "unittests" and not _has_override(variant, task_name):
+ return UNITTESTS_TIMEOUT_SECS
+
if evg_alias == COMMIT_QUEUE_ALIAS:
return COMMIT_QUEUE_TIMEOUT_SECS
- if variant in SPECIFIC_TASK_OVERRIDES and task_name in SPECIFIC_TASK_OVERRIDES[variant]:
+ if _has_override(variant, task_name):
return SPECIFIC_TASK_OVERRIDES[variant][task_name]
if variant in REQUIRED_BUILD_VARIANTS: