summaryrefslogtreecommitdiff
path: root/buildscripts/burn_in_tests.py
diff options
context:
space:
mode:
authorJonathan Abrahams <jonathan@mongodb.com>2017-06-15 09:45:01 -0400
committerJonathan Abrahams <jonathan@mongodb.com>2017-06-15 09:45:01 -0400
commit75a15b5e7c195af9db19ae995867e63a8f89f861 (patch)
tree835ce51d108d9aaba2c4fb307462142c7ad3fe0d /buildscripts/burn_in_tests.py
parentcaa31b2d9ecdc725fc5cf872a656a3bf31900e79 (diff)
downloadmongo-75a15b5e7c195af9db19ae995867e63a8f89f861.tar.gz
SERVER-28786 Add buildscripts/update_test_lifecycle.py script for updating etc/test_lifecycle.yml
Diffstat (limited to 'buildscripts/burn_in_tests.py')
-rw-r--r--buildscripts/burn_in_tests.py18
1 files changed, 13 insertions, 5 deletions
diff --git a/buildscripts/burn_in_tests.py b/buildscripts/burn_in_tests.py
index 514a0cfeff4..99a3bbe5e42 100644
--- a/buildscripts/burn_in_tests.py
+++ b/buildscripts/burn_in_tests.py
@@ -24,7 +24,7 @@ API_SERVER_DEFAULT = "http://evergreen-api.mongodb.com:8080"
# Get relative imports to work when the package is not installed on the PYTHONPATH.
if __name__ == "__main__" and __package__ is None:
sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
- from buildscripts import resmokelib
+from buildscripts import resmokelib
def parse_command_line():
@@ -274,6 +274,17 @@ def create_buildvariant_list(evergreen_file):
return [li["name"] for li in evg["buildvariants"]]
+def get_resmoke_args(evg_task):
+ """
+ Returns the resmoke_args from a task in evergreen.
+ """
+ for command in evg_task["commands"]:
+ if ("func" in command and command["func"] == "run tests" and
+ "vars" in command and "resmoke_args" in command["vars"]):
+ return command["vars"]["resmoke_args"]
+ return None
+
+
def create_task_list(evergreen_file, buildvariant, suites, exclude_tasks):
"""
Parses etc/evergreen.yml to find associated tasks for the specified buildvariant
@@ -301,10 +312,7 @@ def create_task_list(evergreen_file, buildvariant, suites, exclude_tasks):
# Find all the buildvariant task's resmoke_args.
variant_task_args = {}
for task in [a for a in evg["tasks"] if a["name"] in set(variant_tasks) - set(exclude_tasks)]:
- for command in task["commands"]:
- if ("func" in command and command["func"] == "run tests" and
- "vars" in command and "resmoke_args" in command["vars"]):
- variant_task_args[task["name"]] = command["vars"]["resmoke_args"]
+ variant_task_args[task["name"]] = get_resmoke_args(task)
# Find if the buildvariant has a test_flags expansion, which will be passed onto resmoke.py.
test_flags = evg_buildvariant.get("expansions", {}).get("test_flags", "")