summaryrefslogtreecommitdiff
path: root/jstests/_runner_sharding.js
blob: 761b9dfc2ff83bc4370c00dad901c92416e4b791 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
//
// simple runner to run toplevel tests in jstests
//
var files = listFiles("jstests/sharding");

var num = 0;

files.forEach(
    function(x) {
        
        if ( /_runner/.test(x.name) ||
             /_lodeRunner/.test(x.name) ||
             ! /\.js$/.test(x.name ) ){ 
            print(" >>>>>>>>>>>>>>> skipping " + x.name);
            return;
        }
        
        if ( num++ > 0 ){
            sleep( 1000 ); // let things fully come down
        }

        print(" *******************************************");
        print("         Test : " + x.name + " ...");
        try {
            print("                " + Date.timeFunc( function() { load(x.name); }, 1) + "ms");
        }
        catch ( e ){
            print( " ERROR on " + x.name + "!! " + e );
            throw e;
        }
        
    }
);