summaryrefslogtreecommitdiff
path: root/jstests/dur/dur_passthrough.js
diff options
context:
space:
mode:
authorMathias Stearn <redbeard0531@gmail.com>2010-12-22 00:38:50 -0500
committerMathias Stearn <redbeard0531@gmail.com>2010-12-22 00:38:50 -0500
commit94094cf0d34764563cfa1b6035014b1ccc4e9d67 (patch)
tree1e42eb20628844e218958bd56e71939f3d5e81fe /jstests/dur/dur_passthrough.js
parent34c097a9b56425e8c141cba19edd31d86e73c81e (diff)
downloadmongo-94094cf0d34764563cfa1b6035014b1ccc4e9d67.tar.gz
test to run main jstests against a --dur mongod
Diffstat (limited to 'jstests/dur/dur_passthrough.js')
-rw-r--r--jstests/dur/dur_passthrough.js35
1 files changed, 35 insertions, 0 deletions
diff --git a/jstests/dur/dur_passthrough.js b/jstests/dur/dur_passthrough.js
new file mode 100644
index 00000000000..40cc8758ec6
--- /dev/null
+++ b/jstests/dur/dur_passthrough.js
@@ -0,0 +1,35 @@
+//
+// simple runner to run toplevel tests in jstests
+//
+
+//TODO(mathias) use paranoid mode once we are reasonably sure it will pass
+
+conn = startMongodEmpty("--port", 30000, "--dbpath", "/data/db/dur_passthrough", "--dur", "--smallfiles");
+db = conn.getDB("test");
+
+var files = listFiles("jstests");
+
+var runnerStart = new Date()
+
+files.forEach(
+ function(x) {
+
+ if ( /[\/\\]_/.test(x.name) ||
+ ! /\.js$/.test(x.name ) ){
+ print(" >>>>>>>>>>>>>>> skipping " + x.name);
+ return;
+ }
+
+
+ print(" *******************************************");
+ print(" Test : " + x.name + " ...");
+ print(" " + Date.timeFunc( function() { load(x.name); }, 1) + "ms");
+
+ }
+);
+
+stopMongod(30000);
+
+var runnerEnd = new Date()
+
+print( "total runner time: " + ( ( runnerEnd.getTime() - runnerStart.getTime() ) / 1000 ) + "secs" )