summaryrefslogtreecommitdiff
path: root/buildscripts
diff options
context:
space:
mode:
authorJonathan Abrahams <jonathan@mongodb.com>2017-04-05 12:15:20 -0400
committerJonathan Abrahams <jonathan@mongodb.com>2017-04-05 12:15:20 -0400
commit97691221bcf43245ddfd906766abc93bb617d2aa (patch)
tree6aaf70ca35c9658a37a456123071510ad756fdac /buildscripts
parent83ea6f6274b6f5f525569e72e278872886a3d70c (diff)
downloadmongo-97691221bcf43245ddfd906766abc93bb617d2aa.tar.gz
Revert "SERVER-28440 Add support to parse resmoke.py tags from a separate YAML file"
This reverts commit e0c09edaf7f3c42b098823c977a72cd7901012cd.
Diffstat (limited to 'buildscripts')
-rw-r--r--buildscripts/resmokelib/config.py4
-rw-r--r--buildscripts/resmokelib/parser.py5
-rw-r--r--buildscripts/resmokelib/selector.py36
3 files changed, 0 insertions, 45 deletions
diff --git a/buildscripts/resmokelib/config.py b/buildscripts/resmokelib/config.py
index dece92c6c10..91d44bd0ad1 100644
--- a/buildscripts/resmokelib/config.py
+++ b/buildscripts/resmokelib/config.py
@@ -59,7 +59,6 @@ DEFAULTS = {
"staggerJobs": None,
"storageEngine": None,
"storageEngineCacheSizeGB": None,
- "tagFile": None,
"taskId": None,
"wiredTigerCollectionConfigString": None,
"wiredTigerEngineConfigString": None,
@@ -162,9 +161,6 @@ STORAGE_ENGINE = None
# storage engine cache size.
STORAGE_ENGINE_CACHE_SIZE = None
-# The tag file to use that associates tests with tags.
-TAG_FILE = None
-
# If set, then the Evergreen task Id value will be transmitted to logkeeper when creating builds and
# tests.
TASK_ID = None
diff --git a/buildscripts/resmokelib/parser.py b/buildscripts/resmokelib/parser.py
index 0bdaf4782af..8d9ce7fbf27 100644
--- a/buildscripts/resmokelib/parser.py
+++ b/buildscripts/resmokelib/parser.py
@@ -45,7 +45,6 @@ DEST_TO_CONFIG = {
"stagger_jobs": "staggerJobs",
"storage_engine": "storageEngine",
"storage_engine_cache_size": "storageEngineCacheSizeGB",
- "tag_file": "tagFile",
"task_id": "taskId",
"wt_coll_config": "wiredTigerCollectionConfigString",
"wt_engine_config": "wiredTigerEngineConfigString",
@@ -204,9 +203,6 @@ def parse_command_line():
metavar="CONFIG", help="Set the storage engine cache size configuration"
" setting for all mongod's.")
- parser.add_option("--tagFile", dest="tag_file", metavar="OPTIONS",
- help="A YAML file that associates tests and tags.")
-
parser.add_option("--taskId", dest="task_id", metavar="TASK_ID",
help="Set the Id of the Evergreen task running the tests.")
@@ -275,7 +271,6 @@ def update_config_vars(values):
_config.STAGGER_JOBS = config.pop("staggerJobs") == "on"
_config.STORAGE_ENGINE = config.pop("storageEngine")
_config.STORAGE_ENGINE_CACHE_SIZE = config.pop("storageEngineCacheSizeGB")
- _config.TAG_FILE = config.pop("tagFile")
_config.TASK_ID = config.pop("taskId")
_config.WT_COLL_CONFIG = config.pop("wiredTigerCollectionConfigString")
_config.WT_ENGINE_CONFIG = config.pop("wiredTigerEngineConfigString")
diff --git a/buildscripts/resmokelib/selector.py b/buildscripts/resmokelib/selector.py
index f1b53e9d877..2a73259107f 100644
--- a/buildscripts/resmokelib/selector.py
+++ b/buildscripts/resmokelib/selector.py
@@ -7,7 +7,6 @@ on whether they apply to C++ unit tests, dbtests, or JS tests.
from __future__ import absolute_import
-import collections
import errno
import fnmatch
import os.path
@@ -21,36 +20,6 @@ from .utils import globstar
from .utils import jscomment
-def _get_file_tags(pathname):
- """
- Attempts to read a YAML configuration from 'pathname' that describes
- the associations of files to tags.
- """
-
- if pathname is None:
- return {}
-
- return utils.load_yaml_file(pathname).pop("selector")
-
-
-def _parse_tag_file(test_kind):
- """
- Parse the tag file and return a dict of tagged tests, with the key the filename and
- a list of tags, i.e., {'file1.js': ['tag1', 'tag2'], 'file2.js': ['tag2', 'tag3']}
- """
- file_tag_selector = _get_file_tags(config.TAG_FILE)
- tagged_tests = collections.defaultdict(list)
- tagged_roots = utils.default_if_none(file_tag_selector.get(test_kind, None), [])
- for tagged_root in tagged_roots:
- # Multiple tests could be returned for a set of tags.
- tests = globstar.iglob(tagged_root)
- test_tags = tagged_roots[tagged_root]
- for test in tests:
- # A test could have a tag in more than one place, due to wildcards in the selector.
- tagged_tests[test].extend(test_tags)
- return tagged_tests
-
-
def _filter_cpp_tests(kind, root, include_files, exclude_files):
"""
Generic filtering logic for C++ tests that are sourced from a list
@@ -190,13 +159,8 @@ def filter_jstests(roots,
excluded = set()
- # Tags can also be specified in an external file.
- tagged_js_tests = _parse_tag_file("js_test")
-
for filename in jstests_set:
file_tags = set(jscomment.get_tags(filename))
- if filename in tagged_js_tests:
- file_tags.update(tagged_js_tests[filename])
if tags["include_with_any_tags"] and not tags["include_with_any_tags"] & file_tags:
excluded.add(filename)
if tags["exclude_with_any_tags"] and tags["exclude_with_any_tags"] & file_tags: