diff options
author | Eliot Horowitz <eliot@10gen.com> | 2012-01-23 23:27:06 -0500 |
---|---|---|
committer | Eliot Horowitz <eliot@10gen.com> | 2012-01-23 23:27:06 -0500 |
commit | 6c269ae42ae89ea2f2080a8b21105196f86e3a77 (patch) | |
tree | 1759e4be419e3e19a4c9f3ea1e6b5277f4d4866e /buildscripts | |
parent | b09709c7cce24ec72bfeb59cb0acd589eba98019 (diff) | |
download | mongo-6c269ae42ae89ea2f2080a8b21105196f86e3a77.tar.gz |
make smoke.py work on older versions
Diffstat (limited to 'buildscripts')
-rwxr-xr-x | buildscripts/smoke.py | 15 |
1 files changed, 10 insertions, 5 deletions
diff --git a/buildscripts/smoke.py b/buildscripts/smoke.py index a5b06d07f89..30c6c548127 100755 --- a/buildscripts/smoke.py +++ b/buildscripts/smoke.py @@ -265,6 +265,11 @@ def check_db_hashes(master, slave): lost_in_master.append(db) +def ternary( b , l="true", r="false" ): + if b: + return l + return r + # Blech. def skipTest(path): @@ -323,11 +328,11 @@ 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.noJournalPrealloc = ' + ( 'true' if no_preallocj else 'false' ) + ";" + \ - 'TestData.auth = ' + ( 'true' if auth else 'false' ) + ";" + \ - 'TestData.keyFile = ' + ( '"' + keyFile + '"' if keyFile else 'null' ) + ";" + \ - 'TestData.keyFileData = ' + ( '"' + keyFileData + '"' if keyFile else 'null' ) + ";" + 'TestData.noJournal = ' + ternary( no_journal ) + ";" + \ + 'TestData.noJournalPrealloc = ' + ternary( no_preallocj ) + ";" + \ + 'TestData.auth = ' + ternary( auth ) + ";" + \ + 'TestData.keyFile = ' + ternary( keyFile , '"' + keyFile + '"' , 'null' ) + ";" + \ + 'TestData.keyFileData = ' + ( keyFile , '"' + keyFileData + '"' , 'null' ) + ";" if auth and usedb: evalString += 'db.getSiblingDB("admin").addUser("admin","password");' evalString += 'jsTest.authenticate(db.getMongo());' |