1
// runs the toplevel jstests with --dur
3
// TODO(mathias) use paranoid mode (--durOptions 8) once we are reasonably sure it will pass
5
// DEBUG : set this variable to debug by skipping to a specific test to start with and go from there
6
//var skippingTo = /null.js/;
7
var skippingTo = false;
9
print("dur_passthrough.js starting mongod");
10
conn = startMongodEmpty("--port", 30100, "--dbpath", "/data/db/dur_passthrough", "--dur", "--smallfiles");
11
db = conn.getDB("test");
12
print("dur_passthrough.js 0");
16
function durPassThrough() {
18
var runnerStart = new Date()
22
/** run a test. won't run more than once. logs if fails and then throws.
26
if (/[\/\\]_/.test(x.name) ||
27
!/\.js$/.test(x.name) ||
28
/repair/.test(x.name) ||
29
// /numberlong/.test(x.name) ||
30
false // placeholder so all real tests end in ||
33
print("dur_passthrough.js >>>> skipping test " + x.name);
37
print("dur_passthrough.js run " + x.name);
38
print("dur_passthrough.js end " + x.name + ' ' + Date.timeFunc(function () { load(x.name); }, 1) + "ms");
50
print("\n\n\n\ndur_passthrough.js FAIL");
51
print("dur_passthrough.js failed test : " + x.name + "\n\n\n");
57
print("dur_passthrough.js 1");
58
var files = listFiles("jstests");
59
print("dur_passthrough.js 2");
62
// run something that will almost surely pass and is fast just to make sure our framework
63
// here is really working
65
runTest({ name: 'jstests/basic1.js' });
67
runTest({ name: 'jstests/update.js' });
69
// run "suspicious" tests early. these are tests that have ever failed in buildbot. we run them
70
// early and try to get a fail fast
71
runTest({ name: 'jstests/shellstartparallel.js' });
72
runTest({ name: 'jstests/cursora.js' });
74
// run the shell-oriented tests early. if the shell is broken the other tests aren't meaningful
75
runTest({ name: 'jstests/run_program1.js' });
76
runTest({ name: 'jstests/shellspawn.js' });
77
runTest({ name: 'jstests/shellkillop.js' });
80
print("dur_passthrough.js 3");
82
files = files.sort(compareOn('name'));
84
print("dur_passthrough.js 4");
88
if (skippingTo && !skippingTo.test(x.name)) {
89
print("dur_passthrough.js temp skip " + x.name);
94
// to keep memory usage low on 32 bit:
96
db.adminCommand("closeAllDatabases");
99
print("dur_passthrough.js ERROR exception calling closeAllDatabases between tests : " + e);
106
print("dur_passthrough.js ending, calling stopMongod");
108
var runnerEnd = new Date();
109
print("dur_passthrough.js total runner time: " + ((runnerEnd.getTime() - runnerStart.getTime()) / 1000) + "secs")
116
print("\n\n\ndur_passthrough.js error, exception in dur_passthrough.js : " + e);
117
print("dur_passthrough.js FAIL");
118
print("dur_passthrough.js lastRan :");
124
print("\n\n\ndur_passthrough.js SUCCESS\n\n\n");