summaryrefslogtreecommitdiff
path: root/buildscripts/resmokelib/configure_resmoke.py
diff options
context:
space:
mode:
Diffstat (limited to 'buildscripts/resmokelib/configure_resmoke.py')
-rw-r--r--buildscripts/resmokelib/configure_resmoke.py15
1 files changed, 14 insertions, 1 deletions
diff --git a/buildscripts/resmokelib/configure_resmoke.py b/buildscripts/resmokelib/configure_resmoke.py
index 8dc953bb535..3707a0178db 100644
--- a/buildscripts/resmokelib/configure_resmoke.py
+++ b/buildscripts/resmokelib/configure_resmoke.py
@@ -8,11 +8,13 @@ import os.path
import distutils.spawn
import sys
import platform
+import random
import pymongo.uri_parser
from buildscripts.resmokelib import config as _config
from buildscripts.resmokelib import utils
+from buildscripts.resmokelib import mongod_fuzzer_configs
def validate_and_update_config(parser, args):
@@ -181,6 +183,15 @@ def _update_config_vars(values): # pylint: disable=too-many-statements,too-many
_config.MONGOD_EXECUTABLE = _expand_user(config.pop("mongod_executable"))
_config.MONGOD_SET_PARAMETERS = _merge_set_params(config.pop("mongod_set_parameters"))
+ _config.FUZZ_MONGOD_CONFIGS = config.pop("fuzz_mongod_configs")
+ _config.CONFIG_FUZZ_SEED = config.pop("config_fuzz_seed")
+
+ if _config.FUZZ_MONGOD_CONFIGS:
+ if not _config.CONFIG_FUZZ_SEED:
+ _config.CONFIG_FUZZ_SEED = random.randrange(sys.maxsize)
+ _config.MONGOD_SET_PARAMETERS, _config.WT_ENGINE_CONFIG = mongod_fuzzer_configs \
+ .fuzz_set_parameters(_config.CONFIG_FUZZ_SEED, _config.MONGOD_SET_PARAMETERS)
+
_config.MONGOS_EXECUTABLE = _expand_user(config.pop("mongos_executable"))
_config.MONGOS_SET_PARAMETERS = _merge_set_params(config.pop("mongos_set_parameters"))
@@ -236,7 +247,9 @@ def _update_config_vars(values): # pylint: disable=too-many-statements,too-many
# Wiredtiger options.
_config.WT_COLL_CONFIG = config.pop("wt_coll_config")
- _config.WT_ENGINE_CONFIG = config.pop("wt_engine_config")
+ wt_engine_config = config.pop("wt_engine_config")
+ if wt_engine_config: # prevents fuzzed wt_engine_config from being overwritten unless user specifies it
+ _config.WT_ENGINE_CONFIG = config.pop("wt_engine_config")
_config.WT_INDEX_CONFIG = config.pop("wt_index_config")
# Benchmark/Benchrun options.