diff options
author | Max Hirschhorn <max.hirschhorn@mongodb.com> | 2015-05-08 14:20:43 -0400 |
---|---|---|
committer | Max Hirschhorn <max.hirschhorn@mongodb.com> | 2015-05-08 14:49:42 -0400 |
commit | 424314f65e2e0bd9af8f2962260014d1adc7011b (patch) | |
tree | ad435d7ad8484bd2000a45bcfa54162256c27e7e /buildscripts/smoke.py | |
parent | c7ce2e2c56c5d39530456fbbb0554517afe9ab14 (diff) | |
download | mongo-424314f65e2e0bd9af8f2962260014d1adc7011b.tar.gz |
SERVER-1424 Rewrite smoke.py.
Split out the passthrough tests into separate suites. The MongoDB
deployment is started up by resmoke.py so that we can record the
success/failure of each individual test in MCI.
Added support for parallel execution of tests by dispatching to
multiple MongoDB deployments.
Added support for grouping different kinds of tests (e.g. C++ unit
tests, dbtests, and jstests) so that they can be run together. This
allows for customizability in specifying what tests to execute when
changes are made to a particular part of the code.
Diffstat (limited to 'buildscripts/smoke.py')
-rwxr-xr-x | buildscripts/smoke.py | 48 |
1 files changed, 0 insertions, 48 deletions
diff --git a/buildscripts/smoke.py b/buildscripts/smoke.py index 9a6d9d3e810..faa37622857 100755 --- a/buildscripts/smoke.py +++ b/buildscripts/smoke.py @@ -55,7 +55,6 @@ from pymongo.errors import OperationFailure from pymongo import ReadPreference import cleanbb -import smoke import utils try: @@ -1053,29 +1052,6 @@ 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" @@ -1341,14 +1317,6 @@ def main(): parser.add_option('--basisTechRootDirectory', dest='rlp_path', default=None, help='Basis Tech Rosette Linguistics Platform root directory') - 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() @@ -1403,22 +1371,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 |