diff options
author | gregs <greg@10gen.com> | 2011-08-03 17:11:43 -0400 |
---|---|---|
committer | gregs <greg@10gen.com> | 2011-08-03 17:11:43 -0400 |
commit | 5bd4f5885c6f920f1c5a3c0fd335cc8095c43ad2 (patch) | |
tree | 28bec1288169658755c4d4386260f7a56d239938 /buildscripts/smoke.py | |
parent | 5833aa3be3d20686fa8c9c129fae71c261d51b71 (diff) | |
download | mongo-5bd4f5885c6f920f1c5a3c0fd335cc8095c43ad2.tar.gz |
allow nopreallocj in smoke.py
Diffstat (limited to 'buildscripts/smoke.py')
-rwxr-xr-x | buildscripts/smoke.py | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/buildscripts/smoke.py b/buildscripts/smoke.py index 82763210be5..1078574b2c0 100755 --- a/buildscripts/smoke.py +++ b/buildscripts/smoke.py @@ -151,6 +151,8 @@ class mongod(object): argv += ['--slave', '--source', 'localhost:' + str(srcport)] if self.kwargs.get('no_journal'): argv += ['--nojournal'] + if self.kwargs.get('no_preallocj'): + argv += ['--nopreallocj'] print "running " + " ".join(argv) self.proc = Popen(argv) if not self.did_mongod_start(self.port): @@ -288,7 +290,8 @@ def runTest(test): 'TestData.testPath = "' + path + '";' + 'TestData.testFile = "' + os.path.basename( path ) + '";' + 'TestData.testName = "' + re.sub( ".js$", "", os.path.basename( path ) ) + '";' + - 'TestData.noJournal = ' + ( 'true' if no_journal else 'false' ) + ";" ] + 'TestData.noJournal = ' + ( 'true' if no_journal else 'false' ) + ";" + + 'TestData.noJournalPrealloc = ' + ( 'true' if no_preallocj else 'false' ) + ";" ] print argv r = call(argv, cwd=test_path) t2 = time.time() @@ -311,7 +314,7 @@ def run_tests(tests): # The reason we use with is so that we get __exit__ semantics - with mongod(small_oplog=small_oplog,no_journal=no_journal) as master: + with mongod(small_oplog=small_oplog,no_journal=no_journal,no_preallocj=no_preallocj) as master: with mongod(slave=True) if small_oplog else Nothing() as slave: if small_oplog: master.wait_for_repl() @@ -431,7 +434,7 @@ def add_exe(e): return e def main(): - global mongod_executable, mongod_port, shell_executable, continue_on_failure, small_oplog, no_journal, smoke_db_prefix, test_path + global mongod_executable, mongod_port, shell_executable, continue_on_failure, small_oplog, no_journal, no_preallocj, smoke_db_prefix, test_path parser = OptionParser(usage="usage: smoke.py [OPTIONS] ARGS*") parser.add_option('--mode', dest='mode', default='suite', help='If "files", ARGS are filenames; if "suite", ARGS are sets of tests (%default)') @@ -460,6 +463,9 @@ def main(): parser.add_option('--nojournal', dest='no_journal', default=False, action="store_true", help='Do not turn on journaling in tests') + parser.add_option('--nopreallocj', dest='no_preallocj', default=False, + action="store_true", + help='Do not preallocate journal files in tests') global tests (options, tests) = parser.parse_args() @@ -481,6 +487,7 @@ def main(): smoke_db_prefix = options.smoke_db_prefix small_oplog = options.small_oplog no_journal = options.no_journal + no_preallocj = options.no_preallocj if options.File: if options.File == '-': |