diff options
author | Greg Studer <greg@10gen.com> | 2014-09-15 19:41:53 -0400 |
---|---|---|
committer | Greg Studer <greg@10gen.com> | 2014-09-15 19:42:10 -0400 |
commit | 4677734e7a065141012c1b63140fd64c8ea3170b (patch) | |
tree | b4444167cd5c87674d47ae1011e2a638accfcfe6 /buildscripts/smoke.py | |
parent | d427859985fffb76278a104d46a1a913528dbc4a (diff) | |
download | mongo-4677734e7a065141012c1b63140fd64c8ea3170b.tar.gz |
Revert "SERVER-1424 (re)smoke tag parsing and new test library, v0"
This reverts commit fac5571f67e23a1339e20e0621bab0ba2a6b7163.
Diffstat (limited to 'buildscripts/smoke.py')
-rwxr-xr-x | buildscripts/smoke.py | 50 |
1 files changed, 0 insertions, 50 deletions
diff --git a/buildscripts/smoke.py b/buildscripts/smoke.py index 9c185079462..37b533f2cc5 100755 --- a/buildscripts/smoke.py +++ b/buildscripts/smoke.py @@ -54,7 +54,6 @@ from pymongo import Connection from pymongo.errors import OperationFailure import cleanbb -import smoke import utils try: @@ -1003,36 +1002,11 @@ def expand_suites(suites,expandUseDB=True): return tests - -def filter_tests_by_tag(tests, tag_query): - """Selects tests from a list based on a query over the tags in the tests.""" - - test_map = {} - roots = [] - for test in tests: - root = os.path.abspath(test[0]) - roots.append(root) - test_map[root] = test - - new_style_tests = smoke.tests.build_tests(roots, extract_metadata=True) - new_style_tests = smoke.suites.build_suite(new_style_tests, tag_query) - - print "\nTag query matches %s tests out of %s.\n" % (len(new_style_tests), - len(tests)) - - tests = [] - for new_style_test in new_style_tests: - tests.append(test_map[os.path.abspath(new_style_test.filename)]) - - return tests - - def add_exe(e): if os.sys.platform.startswith( "win" ) and not e.endswith( ".exe" ): e += ".exe" return e - def set_globals(options, tests): global mongod_executable, mongod_port, shell_executable, continue_on_failure global small_oplog, small_oplog_rs @@ -1285,14 +1259,6 @@ def main(): parser.add_option('--shell-write-mode', dest='shell_write_mode', default="commands", help='Sets the shell to use a specific write mode: commands/compatibility/legacy (default:legacy)') - parser.add_option('--include-tags', dest='include_tags', default="", action='store', - help='Filters jstests run by tag regex(es) - a tag in the test must match the regexes. ' + - 'Specify single regex string or JSON array.') - - parser.add_option('--exclude-tags', dest='exclude_tags', default="", action='store', - help='Filters jstests run by tag regex(es) - no tags in the test must match the regexes. ' + - 'Specify single regex string or JSON array.') - global tests (options, tests) = parser.parse_args() @@ -1347,22 +1313,6 @@ def main(): tests = filter( ignore_test, tests ) - if options.include_tags or options.exclude_tags: - - def to_regex_array(tags_option): - if not tags_option: - return [] - - tags_list = smoke.json_options.json_coerce(tags_option) - if isinstance(tags_list, basestring): - tags_list = [tags_list] - - return map(re.compile, tags_list) - - tests = filter_tests_by_tag(tests, - smoke.suites.RegexQuery(include_res=to_regex_array(options.include_tags), - exclude_res=to_regex_array(options.exclude_tags))) - if not tests: print "warning: no tests specified" return |