diff options
-rw-r--r-- | jstests/_runner.js | 19 | ||||
-rw-r--r-- | jstests/auth.js | 2 | ||||
-rw-r--r-- | jstests/jni3.js | 10 | ||||
-rw-r--r-- | jstests/sort1.js | 14 |
4 files changed, 29 insertions, 16 deletions
diff --git a/jstests/_runner.js b/jstests/_runner.js index 2952e8db81b..9ca086d6d8e 100644 --- a/jstests/_runner.js +++ b/jstests/_runner.js @@ -3,16 +3,21 @@ // var files = listFiles("jstests"); -files.forEach(function(x) { - - if (!/_runner/.test(x.name)) { +files.forEach( + function(x) { + + if ( /_runner/.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"); + } - else { - print(" >>>>>>>>>>>>>>> skipping " + x.name); - } -}); +); diff --git a/jstests/auth.js b/jstests/auth.js index 67687805740..8ffe87b56bd 100644 --- a/jstests/auth.js +++ b/jstests/auth.js @@ -4,7 +4,7 @@ users = db.getCollection( "system.users" ); users.remove( {} ); pass = "a" + Math.random(); -print( "password [" + pass + "]" ); +//print( "password [" + pass + "]" ); db.addUser( "eliot" , pass ); diff --git a/jstests/jni3.js b/jstests/jni3.js index 15eb0fa1252..f7df9acb99d 100644 --- a/jstests/jni3.js +++ b/jstests/jni3.js @@ -1,8 +1,12 @@ t = db.jni3; +debug = function( s ){ + //print( s ); +} + for( z = 0; z < 2; z++ ) { - print(z); + debug(z); t.drop(); @@ -35,8 +39,8 @@ for( z = 0; z < 2; z++ ) { asdf.asdf.f.s.s(); } } ); - print( x.length() ); - print( tojson( x ) ); + debug( x.length() ); + debug( tojson( x ) ); } catch(e) { ok = true; diff --git a/jstests/sort1.js b/jstests/sort1.js index 2b3d72d02dd..20dd1892f8c 100644 --- a/jstests/sort1.js +++ b/jstests/sort1.js @@ -1,5 +1,9 @@ // test sorting, mainly a test ver simple with no index +debug = function( s ){ + //print( s ); +} + t = db.sorrrt; t.drop(); @@ -9,7 +13,7 @@ t.save({x:2,z:33}); t.save({x:3,z:33}); t.save({x:1,z:33}); -print( "a" ) +debug( "a" ) for( var pass = 0; pass < 2; pass++ ) { assert( t.find().sort({x:1})[0].x == 1 ); assert( t.find().sort({x:1}).skip(1)[0].x == 2 ); @@ -21,7 +25,7 @@ for( var pass = 0; pass < 2; pass++ ) { } -print( "b" ) +debug( "b" ) assert(t.validate().valid); @@ -31,16 +35,16 @@ db.bar.save({x:'aba'}); db.bar.save({x:'zed'}); db.bar.save({x:'foo'}); -print( "c" ) +debug( "c" ) for( var pass = 0; pass < 2; pass++ ) { - print( tojson( db.bar.find().sort( { "x" : 1 } ).limit(1).next() ) ); + debug( tojson( db.bar.find().sort( { "x" : 1 } ).limit(1).next() ) ); assert.eq( "a" , db.bar.find().sort({'x': 1}).limit(1).next().x , "c.1" ); assert.eq( "a" , db.bar.find().sort({'x': 1}).next().x , "c.2" ); assert.eq( "zed" , db.bar.find().sort({'x': -1}).limit(1).next().x , "c.3" ); assert.eq( "zed" , db.bar.find().sort({'x': -1}).next().x , "c.4" ); } -print( "d" ) +debug( "d" ) assert(db.bar.validate().valid); |