1#! /bin/sh 2# OpenLDAP: pkg/ldap/tests/scripts/all,v 1.26.2.9 2010/04/13 20:23:59 kurt Exp 3## This work is part of OpenLDAP Software <http://www.openldap.org/>. 4## 5## Copyright 1998-2010 The OpenLDAP Foundation. 6## All rights reserved. 7## 8## Redistribution and use in source and binary forms, with or without 9## modification, are permitted only as authorized by the OpenLDAP 10## Public License. 11## 12## A copy of this license is available in the file LICENSE in the 13## top-level directory of the distribution or, alternatively, at 14## <http://www.OpenLDAP.org/license.html>. 15 16. $SRCDIR/scripts/defines.sh 17 18TB="" TN="" 19if test -t 1 ; then 20 TB=`$SHTOOL echo -e "%B" 2>/dev/null` 21 TN=`$SHTOOL echo -e "%b" 2>/dev/null` 22fi 23 24SLEEPTIME=10 25 26echo ">>>>> Executing all LDAP tests for $BACKEND" 27 28for CMD in $SRCDIR/scripts/test*; do 29 case "$CMD" in 30 *~) continue;; 31 *.bak) continue;; 32 *.orig) continue;; 33 *.sav) continue;; 34 *) test -f "$CMD" || continue;; 35 esac 36 37 # remove cruft from prior test 38 if test $PRESERVE = yes ; then 39 /bin/rm -rf $TESTDIR/db.* 40 else 41 /bin/rm -rf $TESTDIR 42 fi 43 if test $BACKEND = ndb ; then 44 mysql --user root <<EOF 45 drop database if exists db_1; 46 drop database if exists db_2; 47 drop database if exists db_3; 48 drop database if exists db_4; 49 drop database if exists db_5; 50 drop database if exists db_6; 51EOF 52 fi 53 54 echo ">>>>> Starting ${TB}`basename $CMD`${TN} for $BACKEND..." 55 $CMD 56 RC=$? 57 if test $RC -eq 0 ; then 58 echo ">>>>> $CMD completed ${TB}OK${TN} for $BACKEND." 59 else 60 echo ">>>>> $CMD ${TB}failed${TN} for $BACKEND (exit $RC)" 61 exit $RC 62 fi 63 64# echo ">>>>> waiting $SLEEPTIME seconds for things to exit" 65# sleep $SLEEPTIME 66 echo "" 67done 68