diff options
-rw-r--r-- | buildscripts/burn_in_tests.py | 15 | ||||
-rw-r--r-- | buildscripts/resmokelib/config.py | 3 | ||||
-rw-r--r-- | buildscripts/resmokelib/parser.py | 53 | ||||
-rw-r--r-- | buildscripts/resmokelib/testing/testcases/interface.py | 9 | ||||
-rw-r--r-- | etc/evergreen.yml | 4 |
5 files changed, 30 insertions, 54 deletions
diff --git a/buildscripts/burn_in_tests.py b/buildscripts/burn_in_tests.py index 99a3bbe5e42..8eb87d4eda1 100644 --- a/buildscripts/burn_in_tests.py +++ b/buildscripts/burn_in_tests.py @@ -67,11 +67,10 @@ def parse_command_line(): check_evergreen=False, evergreen_file="etc/evergreen.yml", selector_file="etc/burn_in_tests.yml", - executor_file="with_server", max_revisions=25, no_exec=False, report_file="report.json", - suite_files=None, + suite_files="with_server", test_list_file=None, test_list_outfile=None) @@ -179,7 +178,7 @@ def find_changed_tests(branch_name, base_commit, max_revisions, buildvariant, ch # The lines with untracked files start with '?? '. for line in untracked_files: if line.startswith("?"): - (status, line) = line.split(" ") + (status, line) = line.split(" ", 1) changed_files.append(line) for line in changed_files: @@ -325,12 +324,11 @@ def create_task_list(evergreen_file, buildvariant, suites, exclude_tasks): # function. This allows the storage engine to be overridden. task_arg = "{} {}".format(task_arg, test_flags) # Find the resmoke_args for matching suite names. - # Change the --suites to --executor - if (re.compile('--suites=' + suite + '(?:\s+|$)').match(task_arg) or - re.compile('--executor=' + suite + '(?:\s+|$)').match(task_arg)): + if (re.compile('--suites=' + suite + '(?:\s+|$)').match(task_arg)): tasks_to_run[task_name] = { - "resmoke_args": task_arg.replace("--suites", "--executor"), - "tests": suites[suite]} + "resmoke_args": task_arg, + "tests": suites[suite] + } return tasks_to_run @@ -373,7 +371,6 @@ def _save_report_data(saved_data, pathname, task): def main(): - values = collections.defaultdict(list) values, args = parse_command_line() # If a resmoke.py command wasn't passed in, use a simple version. diff --git a/buildscripts/resmokelib/config.py b/buildscripts/resmokelib/config.py index b2fa727806c..7e81662ba68 100644 --- a/buildscripts/resmokelib/config.py +++ b/buildscripts/resmokelib/config.py @@ -198,6 +198,3 @@ EXTERNAL_SUITE_SELECTORS = [DEFAULT_UNIT_TEST_LIST, DEFAULT_INTEGRATION_TEST_LIST, DEFAULT_DBTEST_EXECUTABLE] -# This is used internally to store the executor name that is passed on the command line. -# Specifically it's used to record in the logs which executor a test is being run under. -INTERNAL_EXECUTOR_NAME = None diff --git a/buildscripts/resmokelib/parser.py b/buildscripts/resmokelib/parser.py index ded9c30ea73..3845ed92fe0 100644 --- a/buildscripts/resmokelib/parser.py +++ b/buildscripts/resmokelib/parser.py @@ -64,14 +64,9 @@ def parse_command_line(): help=("Comma separated list of YAML files that each specify the configuration" " of a suite. If the file is located in the resmokeconfig/suites/" " directory, then the basename without the .yml extension can be" - " specified, e.g. 'core'.")) - - parser.add_option("--executor", dest="executor_file", metavar="EXECUTOR", - help=("A YAML file that specifies the executor configuration. If the file is" - " located in the resmokeconfig/suites/ directory, then the basename" - " without the .yml extension can be specified, e.g. 'core_small_oplog'." - " If specified in combination with the --suites option, then the suite" - " configuration takes precedence.")) + " specified, e.g. 'core'. If a list of files is passed in as" + " positional arguments, they will be run using the suites'" + " configurations")) parser.add_option("--log", dest="logger_file", metavar="LOGGER", help=("A YAML file that specifies the logging configuration. If the file is" @@ -226,11 +221,15 @@ def parse_command_line(): parser.add_option("--wiredTigerIndexConfigString", dest="wt_index_config", metavar="CONFIG", help="Set the WiredTiger index configuration setting for all mongod's.") - parser.set_defaults(executor_file="with_server", - logger_file="console", + parser.add_option("--executor", dest="executor_file", + help="OBSOLETE: Superceded by --suites; specify --suites=SUITE path/to/test" + " to run a particular test under a particular suite configuration.") + + parser.set_defaults(logger_file="console", dry_run="off", find_suites=False, list_suites=False, + suite_files="with_server", prealloc_journal="off", shuffle="auto", stagger_jobs="off") @@ -333,34 +332,30 @@ def create_test_membership_map(fail_on_missing_selector=False, test_kind=None): def get_suites(values, args): - if (values.suite_files is None and not args) or (values.suite_files is not None and args): - raise optparse.OptionValueError("Must specify either --suites or a list of tests") - - _config.INTERNAL_EXECUTOR_NAME = values.executor_file + if values.executor_file: + raise optparse.OptionError( + "superceded by --suites; specify --suites={} {} to run the test(s) under those suite" + " configuration(s)".format(values.executor_file, " ".join(args)), "--executor") - # If there are no suites specified, but args, collect the specified files. + suite_roots = None if args: # Do not change the execution order of the tests passed as args, unless a tag option is # specified. If an option is specified, then sort the tests for consistent execution order. _config.ORDER_TESTS_BY_NAME = any(tag_filter is not None for tag_filter in (_config.EXCLUDE_WITH_ANY_TAGS, _config.INCLUDE_WITH_ANY_TAGS)) - # No specified config, just use the following, and default the logging and executor. - suite_config = _make_config(args) - _ensure_executor(suite_config, values.executor_file) - # The test_kind comes from the executor file. - _ensure_test_kind(suite_config, - _get_yaml_config("executor", values.executor_file), - values.executor_file) - suite = testing.suite.Suite("<%s>" % suite_config["test_kind"], suite_config) - return [suite] + # Build configuration for list of files to run. + suite_roots = _get_suite_roots(args) + suite_files = values.suite_files.split(",") suites = [] for suite_filename in suite_files: suite_config = _get_suite_config(suite_filename) - _ensure_executor(suite_config, values.executor_file) + if suite_roots: + # Override the suite's default test files with those passed in from the command line. + suite_config.update(suite_roots) suite = testing.suite.Suite(suite_filename, suite_config) suites.append(suite) return suites @@ -416,7 +411,7 @@ def _get_suite_config(pathname): return _get_yaml_config("suite", pathname) -def _make_config(files): +def _get_suite_roots(files): return {"selector": {"roots": files}} @@ -440,12 +435,6 @@ def _get_yaml_config(kind, pathname): return utils.load_yaml_file(pathname) -def _ensure_executor(suite_config, pathname): - if "executor" not in suite_config: - # Named executors are specified as the basename of the file, without the .yml extension. - suite_config["executor"] = _get_yaml_config("executor", pathname).pop("executor") - - def _expand_user(pathname): """ Wrapper around os.path.expanduser() to do nothing when given None. diff --git a/buildscripts/resmokelib/testing/testcases/interface.py b/buildscripts/resmokelib/testing/testcases/interface.py index 1408f13f56d..be7f14afd50 100644 --- a/buildscripts/resmokelib/testing/testcases/interface.py +++ b/buildscripts/resmokelib/testing/testcases/interface.py @@ -114,14 +114,7 @@ class TestCase(unittest.TestCase): """ Runs the specified process. """ - - if config.INTERNAL_EXECUTOR_NAME is not None: - self.logger.info("Starting %s under executor %s...\n%s", - self.shortDescription(), - config.INTERNAL_EXECUTOR_NAME, - process.as_command()) - else: - self.logger.info("Starting %s...\n%s", self.shortDescription(), process.as_command()) + self.logger.info("Starting %s...\n%s", self.shortDescription(), process.as_command()) process.start() self.logger.info("%s started with pid %s.", self.shortDescription(), process.pid) diff --git a/etc/evergreen.yml b/etc/evergreen.yml index dc3b79d9297..c663cb7f9bb 100644 --- a/etc/evergreen.yml +++ b/etc/evergreen.yml @@ -2851,7 +2851,7 @@ tasks: - func: "run tests" timeout_secs: 21600 # 6 hour timeout vars: - resmoke_args: --executor=concurrency jstests/concurrency/fsm_all_simultaneous.js --storageEngine=mmapv1 + resmoke_args: --suites=concurrency jstests/concurrency/fsm_all_simultaneous.js --storageEngine=mmapv1 - <<: *task_template name: concurrency_simultaneous_WT @@ -2860,7 +2860,7 @@ tasks: - func: "run tests" timeout_secs: 21600 # 6 hour timeout vars: - resmoke_args: --executor=concurrency jstests/concurrency/fsm_all_simultaneous.js --storageEngine=wiredTiger + resmoke_args: --suites=concurrency jstests/concurrency/fsm_all_simultaneous.js --storageEngine=wiredTiger - <<: *task_template name: rlp |