From be5c5eb936844926384c53ca0b5be0cd83438dc9 Mon Sep 17 00:00:00 2001 From: Ernie Hershey Date: Tue, 11 Nov 2014 15:00:23 -0500 Subject: SERVER-16113 Add --wiredTigerEngineConfig option to smoke.py and jstests --- buildscripts/smoke.py | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) (limited to 'buildscripts/smoke.py') diff --git a/buildscripts/smoke.py b/buildscripts/smoke.py index 703a238afae..173d726cef5 100755 --- a/buildscripts/smoke.py +++ b/buildscripts/smoke.py @@ -226,6 +226,8 @@ class mongod(NullMongod): argv += ["--master", "--oplogSize", "511"] if self.kwargs.get('storage_engine'): argv += ["--storageEngine", self.kwargs.get('storage_engine')] + if self.kwargs.get('wiredtiger_engineconfig'): + argv += ["--wiredTigerEngineConfig", self.kwargs.get('wiredtiger_engineconfig')] params = self.kwargs.get('set_parameters', None) if params: for p in params.split(','): argv += ['--setParameter', p] @@ -532,6 +534,8 @@ def runTest(test, result): if storage_engine: argv.extend(["--storageEngine", storage_engine]) + if storage_engine: + argv.extend(["--wiredTigerEngineConfig", wiredtiger_engineconfig]) # more blech elif os.path.basename(path) in ['mongos', 'mongos.exe']: @@ -555,6 +559,7 @@ def runTest(test, result): if ( argv[0].endswith( 'mongo' ) or argv[0].endswith( 'mongo.exe' ) ) and not '--eval' in argv : evalString = 'TestData = new Object();' + \ 'TestData.storageEngine = "' + ternary( storage_engine, storage_engine, "" ) + '";' + \ + 'TestData.wiredTigerEngineConfig = "' + ternary( wiredtiger_engineconfig, wiredtiger_engineconfig, "" ) + '";' + \ 'TestData.testPath = "' + path + '";' + \ 'TestData.testFile = "' + os.path.basename( path ) + '";' + \ 'TestData.testName = "' + re.sub( ".js$", "", os.path.basename( path ) ) + '";' + \ @@ -672,6 +677,7 @@ def run_tests(tests): small_oplog=small_oplog, no_journal=no_journal, storage_engine=storage_engine, + wiredtiger_engineconfig=wiredtiger_engineconfig, set_parameters=set_parameters, no_preallocj=no_preallocj, auth=auth, @@ -684,6 +690,7 @@ def run_tests(tests): if small_oplog: slave = mongod(slave=True, storage_engine=storage_engine, + wiredtiger_engineconfig=wiredtiger_engineconfig, set_parameters=set_parameters) slave.start() elif small_oplog_rs: @@ -692,6 +699,7 @@ def run_tests(tests): small_oplog=small_oplog, no_journal=no_journal, storage_engine=storage_engine, + wiredtiger_engineconfig=wiredtiger_engineconfig, set_parameters=set_parameters, no_preallocj=no_preallocj, auth=auth, @@ -759,6 +767,7 @@ def run_tests(tests): small_oplog=small_oplog, no_journal=no_journal, storage_engine=storage_engine, + wiredtiger_engineconfig=wiredtiger_engineconfig, set_parameters=set_parameters, no_preallocj=no_preallocj, auth=auth, @@ -1044,7 +1053,7 @@ def add_exe(e): def set_globals(options, tests): global mongod_executable, mongod_port, shell_executable, continue_on_failure global small_oplog, small_oplog_rs - global no_journal, set_parameters, set_parameters_mongos, no_preallocj, storage_engine + global no_journal, set_parameters, set_parameters_mongos, no_preallocj, storage_engine, wiredtiger_engineconfig global auth, authMechanism, keyFile, keyFileData, smoke_db_prefix, test_path, start_mongod global use_ssl, use_x509 global file_of_commands_mode @@ -1079,6 +1088,7 @@ def set_globals(options, tests): small_oplog_rs = options.small_oplog_rs no_journal = options.no_journal storage_engine = options.storage_engine + wiredtiger_engineconfig = options.wiredtiger_engineconfig set_parameters = options.set_parameters set_parameters_mongos = options.set_parameters_mongos no_preallocj = options.no_preallocj @@ -1193,7 +1203,7 @@ def add_to_failfile(tests, options): def main(): global mongod_executable, mongod_port, shell_executable, continue_on_failure, small_oplog - global no_journal, set_parameters, set_parameters_mongos, no_preallocj, auth, storage_engine + global no_journal, set_parameters, set_parameters_mongos, no_preallocj, auth, storage_engine, wiredtiger_engineconfig global keyFile, smoke_db_prefix, test_path, use_write_commands try: @@ -1231,6 +1241,8 @@ def main(): help='Run tests with replica set replication & use a small oplog') parser.add_option('--storageEngine', dest='storage_engine', default=None, help='What storage engine to start mongod with') + parser.add_option('--wiredTigerEngineConfig', dest='wiredtiger_engineconfig', default=None, + help='Wired Tiger configuration to pass through to mongod') parser.add_option('--nojournal', dest='no_journal', default=False, action="store_true", help='Do not turn on journaling in tests') -- cgit v1.2.1