diff options
author | Dan Crosta <dcrosta@10gen.com> | 2012-07-13 12:38:49 -0400 |
---|---|---|
committer | Dan Crosta <dcrosta@10gen.com> | 2012-07-13 12:38:49 -0400 |
commit | fa1b2db53afc5e39e5c9e0b0fd31edc9f248b9ce (patch) | |
tree | b5bb30646d170e952f61803c068360343906a0bc /buildscripts | |
parent | eeb3a1226e2e38789f186a874a5cb2d91c028d48 (diff) | |
download | mongo-fa1b2db53afc5e39e5c9e0b0fd31edc9f248b9ce.tar.gz |
smoke.py: dont add extra command line args to explicit commands
Diffstat (limited to 'buildscripts')
-rwxr-xr-x | buildscripts/smoke.py | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/buildscripts/smoke.py b/buildscripts/smoke.py index 650ba4d8567..ec3cdabde1c 100755 --- a/buildscripts/smoke.py +++ b/buildscripts/smoke.py @@ -350,7 +350,15 @@ def runTest(test): if skipTest(path): print "skipping " + path return - if ext == ".js": + if file_of_commands_mode: + # smoke.py was invoked like "--mode files --from-file foo", + # so don't try to interpret the test path too much + argv = shlex.split(path) + path = argv[0] + # if the command is a python script, use the script name + if os.path.basename(path) in ('python', 'python.exe'): + path = argv[1] + elif ext == ".js": argv = [shell_executable, "--port", mongod_port] if not usedb: argv += ["--nodb"] @@ -367,14 +375,6 @@ def runTest(test): else: argv = [test_path and os.path.abspath(os.path.join(test_path, path)) or path, "--port", mongod_port] - elif file_of_commands_mode: - # smoke.py was invoked like "--mode files --from-file foo", - # so don't try to interpret the test path too much - argv = shlex.split(path) - path = argv[0] - # if the command is a python script, use the script name - if os.path.basename(path) in ('python', 'python.exe'): - path = argv[1] else: raise Bug("fell off in extenstion case: %s" % path) |