summaryrefslogtreecommitdiff
path: root/buildscripts
diff options
context:
space:
mode:
authorRandolph Tan <randolph@10gen.com>2013-11-01 13:02:54 -0400
committerRandolph Tan <randolph@10gen.com>2013-11-08 10:02:13 -0500
commitb8fd0b30946d0e1599cb730c155a01a25e572f24 (patch)
treeff007c5335c77fb98ed76ad384cd3e152e541ffe /buildscripts
parent05460998feedfc74bac1406ffc7431e7a17998a1 (diff)
downloadmongo-b8fd0b30946d0e1599cb730c155a01a25e572f24.tar.gz
SERVER-11627 Make the shell use write commands by default
Diffstat (limited to 'buildscripts')
-rwxr-xr-xbuildscripts/smoke.py15
1 files changed, 12 insertions, 3 deletions
diff --git a/buildscripts/smoke.py b/buildscripts/smoke.py
index 07891832782..b6d29ea88cf 100755
--- a/buildscripts/smoke.py
+++ b/buildscripts/smoke.py
@@ -452,6 +452,8 @@ def runTest(test, result):
path = argv[1]
elif ext == ".js":
argv = [shell_executable, "--port", mongod_port, '--authenticationMechanism', authMechanism]
+ if not use_write_commands:
+ argv += ["--useLegacyWriteOps"]
if not usedb:
argv += ["--nodb"]
if small_oplog or small_oplog_rs:
@@ -845,7 +847,7 @@ def set_globals(options, tests):
global no_journal, set_parameters, no_preallocj, auth, authMechanism, keyFile, smoke_db_prefix, test_path, start_mongod
global use_ssl, use_x509
global file_of_commands_mode
- global report_file
+ global report_file, use_write_commands
start_mongod = options.start_mongod
if hasattr(options, 'use_ssl'):
use_ssl = options.use_ssl
@@ -896,6 +898,8 @@ def set_globals(options, tests):
# generate json report
report_file = options.report_file
+ use_write_commands = options.use_write_commands
+
def file_version():
return md5(open(__file__, 'r').read()).hexdigest()
@@ -976,7 +980,10 @@ def add_to_failfile(tests, options):
def main():
- global mongod_executable, mongod_port, shell_executable, continue_on_failure, small_oplog, no_journal, set_parameters, no_preallocj, auth, keyFile, smoke_db_prefix, test_path
+ global mongod_executable, mongod_port, shell_executable, continue_on_failure, small_oplog
+ global no_journal, set_parameters, no_preallocj, auth, keyFile, smoke_db_prefix, test_path
+ global use_write_commands
+
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)')
@@ -1052,7 +1059,9 @@ def main():
parser.add_option('--report-file', dest='report_file', default=None,
action='store',
help='Path to generate detailed json report containing all test details')
-
+ parser.add_option('--use-write-commands', dest='use_write_commands', default=False,
+ action='store_true',
+ help='Sets the shell to use write commands by default')
global tests
(options, tests) = parser.parse_args()