From 7a41f5be8271341f4c410ab76a656f20111ccf73 Mon Sep 17 00:00:00 2001 From: Jim Menard Date: Thu, 5 Feb 2009 15:59:09 -0500 Subject: [PATCH] print nothing if tests does not exist --- bin/run_test_script | 4 ++++ tests/mongo-qa/circular | 20 -------------------- 2 files changed, 4 insertions(+), 20 deletions(-) delete mode 100755 tests/mongo-qa/circular diff --git a/bin/run_test_script b/bin/run_test_script index a583ba5..7d04609 100755 --- a/bin/run_test_script +++ b/bin/run_test_script @@ -5,6 +5,10 @@ HERE=`dirname $0` +if [ ! -f $HERE/../tests/mongo-qa/$1 ] ; then + exit 0 +fi + begintime=`date` ruby $HERE/../tests/mongo-qa/$1 >> $2 exitval=$? diff --git a/tests/mongo-qa/circular b/tests/mongo-qa/circular deleted file mode 100755 index 4c99ff6..0000000 --- a/tests/mongo-qa/circular +++ /dev/null @@ -1,20 +0,0 @@ -#!/usr/bin/env ruby - -require File.join(File.dirname(__FILE__), '_common.rb') -db = Mongo.new(DEFAULT_HOST, DEFAULT_PORT).db(DEFAULT_DB) - -if __FILE__ == $0 - %w(a b c).each { |name| db.drop_collection(name) } -end - -colla = db.collection('a') -collb = db.collection('b') -collc = db.collection('c') - -colla.insert('c' => 'b') -collb.insert('c' => 1) - -x_id = ObjectID.new -x_dbref = DBRef.new(nil, 'thiz', db, 'c', x_id) -x = {'_id' => x_id, 'that' => 2, 'thiz' => x_dbref} -collc.insert(x)