summaryrefslogtreecommitdiff
path: root/buildscripts/resmokelib/config.py
diff options
context:
space:
mode:
authorMax Hirschhorn <max.hirschhorn@mongodb.com>2015-05-08 14:20:43 -0400
committerMax Hirschhorn <max.hirschhorn@mongodb.com>2015-05-08 14:49:42 -0400
commit424314f65e2e0bd9af8f2962260014d1adc7011b (patch)
treead435d7ad8484bd2000a45bcfa54162256c27e7e /buildscripts/resmokelib/config.py
parentc7ce2e2c56c5d39530456fbbb0554517afe9ab14 (diff)
downloadmongo-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/resmokelib/config.py')
-rw-r--r--buildscripts/resmokelib/config.py131
1 files changed, 131 insertions, 0 deletions
diff --git a/buildscripts/resmokelib/config.py b/buildscripts/resmokelib/config.py
new file mode 100644
index 00000000000..15e83e5e7bf
--- /dev/null
+++ b/buildscripts/resmokelib/config.py
@@ -0,0 +1,131 @@
+"""
+Configuration options for resmoke.py.
+"""
+
+from __future__ import absolute_import
+
+import os
+import os.path
+import time
+
+
+##
+# Default values.
+##
+
+# Default path for where to look for executables.
+DEFAULT_DBTEST_EXECUTABLE = os.path.join(os.curdir, "dbtest")
+DEFAULT_MONGO_EXECUTABLE = os.path.join(os.curdir, "mongo")
+DEFAULT_MONGOD_EXECUTABLE = os.path.join(os.curdir, "mongod")
+DEFAULT_MONGOS_EXECUTABLE = os.path.join(os.curdir, "mongos")
+
+# Default root directory for where resmoke.py puts directories containing data files of mongod's it
+# starts, as well as those started by individual tests.
+DEFAULT_DBPATH_PREFIX = os.path.normpath("/data/db")
+
+# Subdirectory under the dbpath prefix that contains directories with data files of mongod's started
+# by resmoke.py.
+FIXTURE_SUBDIR = "resmoke"
+
+# Subdirectory under the dbpath prefix that contains directories with data files of mongod's started
+# by individual tests.
+MONGO_RUNNER_SUBDIR = "mongorunner"
+
+# Names below correspond to how they are specified via the command line or in the options YAML file.
+DEFAULTS = {
+ "buildloggerUrl": "https://logkeeper.mongodb.org",
+ "continueOnFailure": False,
+ "dbpathPrefix": None,
+ "dbtest": None,
+ "dryRun": None,
+ "jobs": 1,
+ "mongo": None,
+ "mongod": None,
+ "mongos": None,
+ "nojournal": None,
+ "nopreallocj": None,
+ "repeat": 1,
+ "reportFile": None,
+ "seed": long(time.time() * 256), # Taken from random.py code in Python 2.7.
+ "shellWriteMode": None,
+ "shuffle": False,
+ "storageEngine": None,
+ "wiredTigerCollectionConfigString": None,
+ "wiredTigerEngineConfigString": None,
+ "wiredTigerIndexConfigString": None
+}
+
+
+##
+# Variables that are set by the user at the command line or with --options.
+##
+
+# The root url of the buildlogger server.
+BUILDLOGGER_URL = None
+
+# Root directory for where resmoke.py puts directories containing data files of mongod's it starts,
+# as well as those started by individual tests.
+DBPATH_PREFIX = None
+
+# The path to the dbtest executable used by resmoke.py.
+DBTEST_EXECUTABLE = None
+
+# If set to "tests", then resmoke.py will output the tests that would be run by each suite (without
+# actually running them).
+DRY_RUN = None
+
+# If true, then a test failure or error will cause resmoke.py to exit and not run any more tests.
+FAIL_FAST = None
+
+# If set, then resmoke.py starts the specified number of Job instances to run tests.
+JOBS = None
+
+# The path to the mongo executable used by resmoke.py.
+MONGO_EXECUTABLE = None
+
+# The path to the mongod executable used by resmoke.py.
+MONGOD_EXECUTABLE = None
+
+# The path to the mongos executable used by resmoke.py.
+MONGOS_EXECUTABLE = None
+
+# If true, then all mongod's started by resmoke.py and by the mongo shell will not have journaling
+# enabled.
+NO_JOURNAL = None
+
+# If true, then all mongod's started by resmoke.py and by the mongo shell will not preallocate
+# journal files.
+NO_PREALLOC_JOURNAL = None
+
+# If set, then the RNG is seeded with the specified value. Otherwise uses a seed based on the time
+# this module was loaded.
+RANDOM_SEED = None
+
+# If set, then each suite is repeated the specified number of times.
+REPEAT = None
+
+# If set, then resmoke.py will write out a report file with the status of each test that ran.
+REPORT_FILE = None
+
+# If set, then mongo shells started by resmoke.py will use the specified write mode.
+SHELL_WRITE_MODE = None
+
+# If true, then the order the tests run in is randomized. Otherwise the tests will run in
+# alphabetical (case-insensitive) order.
+SHUFFLE = None
+
+# If set, then all mongod's started by resmoke.py and by the mongo shell will use the specified
+# storage engine.
+STORAGE_ENGINE = None
+
+# If set, then all mongod's started by resmoke.py and by the mongo shell will use the specified
+# WiredTiger collection configuration settings.
+WT_COLL_CONFIG = None
+
+# If set, then all mongod's started by resmoke.py and by the mongo shell will use the specified
+# WiredTiger storage engine configuration settings.
+WT_ENGINE_CONFIG = None
+
+# If set, then all mongod's started by resmoke.py and by the mongo shell will use the specified
+# WiredTiger index configuration settings.
+WT_INDEX_CONFIG = None