summaryrefslogtreecommitdiff
path: root/buildscripts
diff options
context:
space:
mode:
authorMax Hirschhorn <max.hirschhorn@mongodb.com>2015-09-21 09:06:22 -0400
committerMax Hirschhorn <max.hirschhorn@mongodb.com>2015-09-21 09:06:22 -0400
commit53f0b88ef943d5ec91bdc9958874e15c5973eead (patch)
treebb065f9effa4e88daf016b1f83f9f9c521376207 /buildscripts
parent418b19e1d3e82113156f9f9d4bd115ba420b49ab (diff)
downloadmongo-53f0b88ef943d5ec91bdc9958874e15c5973eead.tar.gz
SERVER-20475 Add --preallocJournal option to resmoke.py.
Defaults to off.
Diffstat (limited to 'buildscripts')
-rw-r--r--buildscripts/resmokeconfig/suites/aggregation.yml1
-rw-r--r--buildscripts/resmokeconfig/suites/aggregation_auth.yml1
-rw-r--r--buildscripts/resmokeconfig/suites/concurrency.yml1
-rw-r--r--buildscripts/resmokeconfig/suites/core.yml1
-rw-r--r--buildscripts/resmokeconfig/suites/core_auth.yml1
-rw-r--r--buildscripts/resmokeconfig/suites/core_ese.yml1
-rw-r--r--buildscripts/resmokeconfig/suites/core_op_query.yml1
-rw-r--r--buildscripts/resmokeconfig/suites/core_small_oplog.yml1
-rw-r--r--buildscripts/resmokeconfig/suites/core_small_oplog_rs.yml1
-rw-r--r--buildscripts/resmokeconfig/suites/decimal.yml1
-rw-r--r--buildscripts/resmokeconfig/suites/disk.yml1
-rw-r--r--buildscripts/resmokeconfig/suites/dur_jscore_passthrough.yml1
-rw-r--r--buildscripts/resmokeconfig/suites/gle_auth.yml1
-rw-r--r--buildscripts/resmokeconfig/suites/gle_auth_basics_passthrough.yml1
-rw-r--r--buildscripts/resmokeconfig/suites/integration_tests_replset.yml1
-rw-r--r--buildscripts/resmokeconfig/suites/integration_tests_standalone.yml1
-rw-r--r--buildscripts/resmokeconfig/suites/jstestfuzz.yml1
-rw-r--r--buildscripts/resmokeconfig/suites/mmap.yml1
-rw-r--r--buildscripts/resmokeconfig/suites/no_passthrough_with_mongod.yml1
-rw-r--r--buildscripts/resmokeconfig/suites/parallel.yml1
-rw-r--r--buildscripts/resmokeconfig/suites/read_concern_majority_passthrough.yml1
-rw-r--r--buildscripts/resmokeconfig/suites/rlp.yml1
-rw-r--r--buildscripts/resmokeconfig/suites/sharding_gle_auth_basics_passthrough.yml1
-rw-r--r--buildscripts/resmokeconfig/suites/sharding_jscore_passthrough.yml1
-rw-r--r--buildscripts/resmokeconfig/suites/slow1.yml1
-rw-r--r--buildscripts/resmokeconfig/suites/slow2.yml1
-rw-r--r--buildscripts/resmokeconfig/suites/with_server.yml1
-rw-r--r--buildscripts/resmokelib/config.py3
-rw-r--r--buildscripts/resmokelib/core/programs.py18
-rw-r--r--buildscripts/resmokelib/parser.py16
30 files changed, 24 insertions, 40 deletions
diff --git a/buildscripts/resmokeconfig/suites/aggregation.yml b/buildscripts/resmokeconfig/suites/aggregation.yml
index 2646f8e77dd..6bef7c88600 100644
--- a/buildscripts/resmokeconfig/suites/aggregation.yml
+++ b/buildscripts/resmokeconfig/suites/aggregation.yml
@@ -14,6 +14,5 @@ executor:
fixture:
class: MongoDFixture
mongod_options:
- nopreallocj: ''
set_parameters:
enableTestCommands: 1
diff --git a/buildscripts/resmokeconfig/suites/aggregation_auth.yml b/buildscripts/resmokeconfig/suites/aggregation_auth.yml
index 0898b582980..5b978cb342c 100644
--- a/buildscripts/resmokeconfig/suites/aggregation_auth.yml
+++ b/buildscripts/resmokeconfig/suites/aggregation_auth.yml
@@ -36,7 +36,6 @@ executor:
mongod_options:
auth: ''
keyFile: *keyFile
- nopreallocj: ''
set_parameters:
enableTestCommands: 1
enableLocalhostAuthBypass: false
diff --git a/buildscripts/resmokeconfig/suites/concurrency.yml b/buildscripts/resmokeconfig/suites/concurrency.yml
index 08c55bb954f..52af5e99fa6 100644
--- a/buildscripts/resmokeconfig/suites/concurrency.yml
+++ b/buildscripts/resmokeconfig/suites/concurrency.yml
@@ -18,6 +18,5 @@ executor:
fixture:
class: MongoDFixture
mongod_options:
- nopreallocj: ''
set_parameters:
enableTestCommands: 1
diff --git a/buildscripts/resmokeconfig/suites/core.yml b/buildscripts/resmokeconfig/suites/core.yml
index 5a59657dded..bc18986afe4 100644
--- a/buildscripts/resmokeconfig/suites/core.yml
+++ b/buildscripts/resmokeconfig/suites/core.yml
@@ -14,6 +14,5 @@ executor:
fixture:
class: MongoDFixture
mongod_options:
- nopreallocj: ''
set_parameters:
enableTestCommands: 1
diff --git a/buildscripts/resmokeconfig/suites/core_auth.yml b/buildscripts/resmokeconfig/suites/core_auth.yml
index 6a41f92ced3..a38c85048d7 100644
--- a/buildscripts/resmokeconfig/suites/core_auth.yml
+++ b/buildscripts/resmokeconfig/suites/core_auth.yml
@@ -37,7 +37,6 @@ executor:
mongod_options:
auth: ''
keyFile: *keyFile
- nopreallocj: ''
set_parameters:
enableTestCommands: 1
enableLocalhostAuthBypass: false
diff --git a/buildscripts/resmokeconfig/suites/core_ese.yml b/buildscripts/resmokeconfig/suites/core_ese.yml
index 6f649b8cbdb..993b8dc6a86 100644
--- a/buildscripts/resmokeconfig/suites/core_ese.yml
+++ b/buildscripts/resmokeconfig/suites/core_ese.yml
@@ -20,6 +20,5 @@ executor:
mongod_options:
enableEncryption: ''
encryptionKeyFile: *keyFile
- nopreallocj: ''
set_parameters:
enableTestCommands: 1
diff --git a/buildscripts/resmokeconfig/suites/core_op_query.yml b/buildscripts/resmokeconfig/suites/core_op_query.yml
index 60c12e45495..9e803201f28 100644
--- a/buildscripts/resmokeconfig/suites/core_op_query.yml
+++ b/buildscripts/resmokeconfig/suites/core_op_query.yml
@@ -15,6 +15,5 @@ executor:
fixture:
class: MongoDFixture
mongod_options:
- nopreallocj: ''
set_parameters:
enableTestCommands: 1
diff --git a/buildscripts/resmokeconfig/suites/core_small_oplog.yml b/buildscripts/resmokeconfig/suites/core_small_oplog.yml
index 3bd34dd540d..d3f52fa2158 100644
--- a/buildscripts/resmokeconfig/suites/core_small_oplog.yml
+++ b/buildscripts/resmokeconfig/suites/core_small_oplog.yml
@@ -19,6 +19,5 @@ executor:
class: MasterSlaveFixture
mongod_options:
oplogSize: 511
- nopreallocj: ''
set_parameters:
enableTestCommands: 1
diff --git a/buildscripts/resmokeconfig/suites/core_small_oplog_rs.yml b/buildscripts/resmokeconfig/suites/core_small_oplog_rs.yml
index 3e294ee43b4..a0171d528f6 100644
--- a/buildscripts/resmokeconfig/suites/core_small_oplog_rs.yml
+++ b/buildscripts/resmokeconfig/suites/core_small_oplog_rs.yml
@@ -21,7 +21,6 @@ executor:
class: ReplicaSetFixture
mongod_options:
oplogSize: 511
- nopreallocj: ''
set_parameters:
enableTestCommands: 1
num_nodes: 2
diff --git a/buildscripts/resmokeconfig/suites/decimal.yml b/buildscripts/resmokeconfig/suites/decimal.yml
index 727cbd261e1..3992d1568e2 100644
--- a/buildscripts/resmokeconfig/suites/decimal.yml
+++ b/buildscripts/resmokeconfig/suites/decimal.yml
@@ -11,6 +11,5 @@ executor:
fixture:
class: MongoDFixture
mongod_options:
- nopreallocj: ''
set_parameters:
enableTestCommands: 1
diff --git a/buildscripts/resmokeconfig/suites/disk.yml b/buildscripts/resmokeconfig/suites/disk.yml
index 8c75144f11b..ef09e190f3b 100644
--- a/buildscripts/resmokeconfig/suites/disk.yml
+++ b/buildscripts/resmokeconfig/suites/disk.yml
@@ -19,7 +19,6 @@ executor:
fixture:
class: MongoDFixture
mongod_options:
- nopreallocj: ''
set_parameters:
enableTestCommands: 1
storageEngine: mmapv1
diff --git a/buildscripts/resmokeconfig/suites/dur_jscore_passthrough.yml b/buildscripts/resmokeconfig/suites/dur_jscore_passthrough.yml
index f2b8dee8a4f..aff202f6a71 100644
--- a/buildscripts/resmokeconfig/suites/dur_jscore_passthrough.yml
+++ b/buildscripts/resmokeconfig/suites/dur_jscore_passthrough.yml
@@ -15,7 +15,6 @@ executor:
class: MongoDFixture
mongod_options:
journal: ''
- nopreallocj: ''
set_parameters:
enableTestCommands: 1
smallfiles: ''
diff --git a/buildscripts/resmokeconfig/suites/gle_auth.yml b/buildscripts/resmokeconfig/suites/gle_auth.yml
index 87338add167..00c1f2e8226 100644
--- a/buildscripts/resmokeconfig/suites/gle_auth.yml
+++ b/buildscripts/resmokeconfig/suites/gle_auth.yml
@@ -37,7 +37,6 @@ executor:
mongod_options:
auth: ''
keyFile: *keyFile
- nopreallocj: ''
set_parameters:
enableTestCommands: 1
enableLocalhostAuthBypass: false
diff --git a/buildscripts/resmokeconfig/suites/gle_auth_basics_passthrough.yml b/buildscripts/resmokeconfig/suites/gle_auth_basics_passthrough.yml
index 9ae9251843c..7f40eb75d1f 100644
--- a/buildscripts/resmokeconfig/suites/gle_auth_basics_passthrough.yml
+++ b/buildscripts/resmokeconfig/suites/gle_auth_basics_passthrough.yml
@@ -28,7 +28,6 @@ executor:
mongod_options:
auth: ''
keyFile: *keyFile
- nopreallocj: ''
set_parameters:
enableTestCommands: 1
enableLocalhostAuthBypass: false
diff --git a/buildscripts/resmokeconfig/suites/integration_tests_replset.yml b/buildscripts/resmokeconfig/suites/integration_tests_replset.yml
index 0b9b4afc7fd..2ea495ae116 100644
--- a/buildscripts/resmokeconfig/suites/integration_tests_replset.yml
+++ b/buildscripts/resmokeconfig/suites/integration_tests_replset.yml
@@ -10,7 +10,6 @@ executor:
fixture:
class: ReplicaSetFixture
mongod_options:
- nopreallocj: ''
set_parameters:
enableTestCommands: 1
num_nodes: 2
diff --git a/buildscripts/resmokeconfig/suites/integration_tests_standalone.yml b/buildscripts/resmokeconfig/suites/integration_tests_standalone.yml
index 926dc488221..5c83844a6e2 100644
--- a/buildscripts/resmokeconfig/suites/integration_tests_standalone.yml
+++ b/buildscripts/resmokeconfig/suites/integration_tests_standalone.yml
@@ -11,6 +11,5 @@ executor:
fixture:
class: MongoDFixture
mongod_options:
- nopreallocj: ''
set_parameters:
enableTestCommands: 1
diff --git a/buildscripts/resmokeconfig/suites/jstestfuzz.yml b/buildscripts/resmokeconfig/suites/jstestfuzz.yml
index 2b4c598285f..c58774c3160 100644
--- a/buildscripts/resmokeconfig/suites/jstestfuzz.yml
+++ b/buildscripts/resmokeconfig/suites/jstestfuzz.yml
@@ -8,7 +8,6 @@ executor:
fixture:
class: MongoDFixture
mongod_options:
- nopreallocj: ''
set_parameters:
enableTestCommands: 1
verbose: ''
diff --git a/buildscripts/resmokeconfig/suites/mmap.yml b/buildscripts/resmokeconfig/suites/mmap.yml
index e37066f2b5d..b7b59bed2dd 100644
--- a/buildscripts/resmokeconfig/suites/mmap.yml
+++ b/buildscripts/resmokeconfig/suites/mmap.yml
@@ -17,7 +17,6 @@ executor:
fixture:
class: MongoDFixture
mongod_options:
- nopreallocj: ''
set_parameters:
enableTestCommands: 1
storageEngine: mmapv1
diff --git a/buildscripts/resmokeconfig/suites/no_passthrough_with_mongod.yml b/buildscripts/resmokeconfig/suites/no_passthrough_with_mongod.yml
index 7095f79c9cd..61823628700 100644
--- a/buildscripts/resmokeconfig/suites/no_passthrough_with_mongod.yml
+++ b/buildscripts/resmokeconfig/suites/no_passthrough_with_mongod.yml
@@ -16,6 +16,5 @@ executor:
fixture:
class: MongoDFixture
mongod_options:
- nopreallocj: ''
set_parameters:
enableTestCommands: 1
diff --git a/buildscripts/resmokeconfig/suites/parallel.yml b/buildscripts/resmokeconfig/suites/parallel.yml
index 9068c6d32a2..43fcb5ab74c 100644
--- a/buildscripts/resmokeconfig/suites/parallel.yml
+++ b/buildscripts/resmokeconfig/suites/parallel.yml
@@ -14,6 +14,5 @@ executor:
fixture:
class: MongoDFixture
mongod_options:
- nopreallocj: ''
set_parameters:
enableTestCommands: 1
diff --git a/buildscripts/resmokeconfig/suites/read_concern_majority_passthrough.yml b/buildscripts/resmokeconfig/suites/read_concern_majority_passthrough.yml
index a2214516931..d8ab491018e 100644
--- a/buildscripts/resmokeconfig/suites/read_concern_majority_passthrough.yml
+++ b/buildscripts/resmokeconfig/suites/read_concern_majority_passthrough.yml
@@ -46,7 +46,6 @@ executor:
fixture:
class: ReplicaSetFixture
mongod_options:
- nopreallocj: ''
set_parameters:
enableTestCommands: 1
# Running with one node until SERVER-20260 in place. Allows us to use a much smaller sleep.
diff --git a/buildscripts/resmokeconfig/suites/rlp.yml b/buildscripts/resmokeconfig/suites/rlp.yml
index 432bdfa8ec3..feb3aaded27 100644
--- a/buildscripts/resmokeconfig/suites/rlp.yml
+++ b/buildscripts/resmokeconfig/suites/rlp.yml
@@ -11,7 +11,6 @@ executor:
fixture:
class: MongoDFixture
mongod_options:
- nopreallocj: ''
basisTechRootDirectory: /opt/basis
set_parameters:
enableTestCommands: 1
diff --git a/buildscripts/resmokeconfig/suites/sharding_gle_auth_basics_passthrough.yml b/buildscripts/resmokeconfig/suites/sharding_gle_auth_basics_passthrough.yml
index cd1add3e82f..d081d1a8eb9 100644
--- a/buildscripts/resmokeconfig/suites/sharding_gle_auth_basics_passthrough.yml
+++ b/buildscripts/resmokeconfig/suites/sharding_gle_auth_basics_passthrough.yml
@@ -38,7 +38,6 @@ executor:
mongod_options:
auth: ''
keyFile: *keyFile
- nopreallocj: ''
set_parameters:
enableTestCommands: 1
enableLocalhostAuthBypass: false
diff --git a/buildscripts/resmokeconfig/suites/sharding_jscore_passthrough.yml b/buildscripts/resmokeconfig/suites/sharding_jscore_passthrough.yml
index e9d9688ded2..2cd6fd2f52a 100644
--- a/buildscripts/resmokeconfig/suites/sharding_jscore_passthrough.yml
+++ b/buildscripts/resmokeconfig/suites/sharding_jscore_passthrough.yml
@@ -51,7 +51,6 @@ executor:
set_parameters:
enableTestCommands: 1
mongod_options:
- nopreallocj: ''
set_parameters:
enableTestCommands: 1
enable_sharding:
diff --git a/buildscripts/resmokeconfig/suites/slow1.yml b/buildscripts/resmokeconfig/suites/slow1.yml
index afc237320a2..3e7221ba135 100644
--- a/buildscripts/resmokeconfig/suites/slow1.yml
+++ b/buildscripts/resmokeconfig/suites/slow1.yml
@@ -14,6 +14,5 @@ executor:
fixture:
class: MongoDFixture
mongod_options:
- nopreallocj: ''
set_parameters:
enableTestCommands: 1
diff --git a/buildscripts/resmokeconfig/suites/slow2.yml b/buildscripts/resmokeconfig/suites/slow2.yml
index e0026561421..771e9d9a7ae 100644
--- a/buildscripts/resmokeconfig/suites/slow2.yml
+++ b/buildscripts/resmokeconfig/suites/slow2.yml
@@ -19,6 +19,5 @@ executor:
fixture:
class: MongoDFixture
mongod_options:
- nopreallocj: ''
set_parameters:
enableTestCommands: 1
diff --git a/buildscripts/resmokeconfig/suites/with_server.yml b/buildscripts/resmokeconfig/suites/with_server.yml
index 392af1d304a..c87cad9f8dd 100644
--- a/buildscripts/resmokeconfig/suites/with_server.yml
+++ b/buildscripts/resmokeconfig/suites/with_server.yml
@@ -3,6 +3,5 @@ executor:
fixture:
class: MongoDFixture
mongod_options:
- nopreallocj: ''
set_parameters:
enableTestCommands: 1
diff --git a/buildscripts/resmokelib/config.py b/buildscripts/resmokelib/config.py
index 16b9b79de14..4868e2edef4 100644
--- a/buildscripts/resmokelib/config.py
+++ b/buildscripts/resmokelib/config.py
@@ -45,8 +45,7 @@ DEFAULTS = {
"mongodSetParameters": None,
"mongos": None,
"mongosSetParameters": None,
- "nojournal": None,
- "nopreallocj": None,
+ "nojournal": False,
"repeat": 1,
"reportFile": None,
"seed": long(time.time() * 256), # Taken from random.py code in Python 2.7.
diff --git a/buildscripts/resmokelib/core/programs.py b/buildscripts/resmokelib/core/programs.py
index b019b57c6bf..9256517a8f5 100644
--- a/buildscripts/resmokelib/core/programs.py
+++ b/buildscripts/resmokelib/core/programs.py
@@ -47,16 +47,22 @@ def mongod_program(logger, executable=None, process_kwargs=None, **kwargs):
opts_without_vals = ("nojournal", "nopreallocj")
# Have the --nojournal command line argument to resmoke.py unset the journal option.
- if shortcut_opts["nojournal"] is not None and "journal" in kwargs:
+ if shortcut_opts["nojournal"] and "journal" in kwargs:
del kwargs["journal"]
+ # Command line options override the YAML configuration.
for opt_name in shortcut_opts:
- if shortcut_opts[opt_name] is not None:
- # Command line options override the YAML configuration.
- if opt_name in opts_without_vals:
+ opt_value = shortcut_opts[opt_name]
+ if opt_name in opts_without_vals:
+ # Options that are specified as --flag on the command line are represented by a boolean
+ # value where True indicates that the flag should be included in 'kwargs'.
+ if opt_value:
kwargs[opt_name] = ""
- else:
- kwargs[opt_name] = shortcut_opts[opt_name]
+ else:
+ # Options that are specified as --key=value on the command line are represented by a
+ # value where None indicates that the key-value pair shouldn't be included in 'kwargs'.
+ if opt_value is not None:
+ kwargs[opt_name] = opt_value
# Override the storage engine specified on the command line with "wiredTiger" if running a
# config server replica set.
diff --git a/buildscripts/resmokelib/parser.py b/buildscripts/resmokelib/parser.py
index faf9b76eb9c..27d4772f705 100644
--- a/buildscripts/resmokelib/parser.py
+++ b/buildscripts/resmokelib/parser.py
@@ -30,7 +30,7 @@ DEST_TO_CONFIG = {
"mongos_executable": "mongos",
"mongos_parameters": "mongosSetParameters",
"no_journal": "nojournal",
- "no_prealloc_journal": "nopreallocj",
+ "prealloc_journal": "preallocJournal",
"repeat": "repeat",
"report_file": "reportFile",
"seed": "seed",
@@ -130,8 +130,13 @@ def parse_command_line():
parser.add_option("--nojournal", action="store_true", dest="no_journal",
help="Disable journaling for all mongod's.")
- parser.add_option("--nopreallocj", action="store_true", dest="no_prealloc_journal",
- help="Disable preallocation of journal files for all mongod's.")
+ parser.add_option("--nopreallocj", action="store_const", const="off", dest="prealloc_journal",
+ help="Disable preallocation of journal files for all mongod processes.")
+
+ parser.add_option("--preallocJournal", type="choice", action="store", dest="prealloc_journal",
+ choices=("on", "off"), metavar="ON|OFF",
+ help=("Enable or disable preallocation of journal files for all mongod"
+ " processes. Defaults to %default."))
parser.add_option("--repeat", type="int", dest="repeat", metavar="N",
help="Repeat the given suite(s) N times, or until one fails.")
@@ -169,7 +174,8 @@ def parse_command_line():
parser.set_defaults(executor_file="with_server",
logger_file="console",
dry_run="off",
- list_suites=False)
+ list_suites=False,
+ prealloc_journal="off")
return parser.parse_args()
@@ -205,7 +211,7 @@ def update_config_vars(values):
_config.MONGOS_EXECUTABLE = _expand_user(config.pop("mongos"))
_config.MONGOS_SET_PARAMETERS = config.pop("mongosSetParameters")
_config.NO_JOURNAL = config.pop("nojournal")
- _config.NO_PREALLOC_JOURNAL = config.pop("nopreallocj")
+ _config.NO_PREALLOC_JOURNAL = config.pop("preallocJournal") == "off"
_config.RANDOM_SEED = config.pop("seed")
_config.REPEAT = config.pop("repeat")
_config.REPORT_FILE = config.pop("reportFile")