1999-04-21 13:59:01 +08:00
|
|
|
#! /bin/sh
|
1999-09-02 08:52:43 +08:00
|
|
|
# $OpenLDAP$
|
2003-11-29 04:00:23 +08:00
|
|
|
## This work is part of OpenLDAP Software <http://www.openldap.org/>.
|
|
|
|
##
|
2009-01-22 08:40:04 +08:00
|
|
|
## Copyright 1998-2009 The OpenLDAP Foundation.
|
2003-11-29 04:00:23 +08:00
|
|
|
## All rights reserved.
|
|
|
|
##
|
|
|
|
## Redistribution and use in source and binary forms, with or without
|
|
|
|
## modification, are permitted only as authorized by the OpenLDAP
|
|
|
|
## Public License.
|
|
|
|
##
|
|
|
|
## A copy of this license is available in the file LICENSE in the
|
|
|
|
## top-level directory of the distribution or, alternatively, at
|
|
|
|
## <http://www.OpenLDAP.org/license.html>.
|
1998-08-09 08:43:13 +08:00
|
|
|
|
2007-03-13 05:17:44 +08:00
|
|
|
. $SRCDIR/scripts/defines.sh
|
2007-05-19 02:42:59 +08:00
|
|
|
|
|
|
|
TB="" TN=""
|
|
|
|
if test -t 1 ; then
|
|
|
|
TB=`$SHTOOL echo -e "%B" 2>/dev/null`
|
|
|
|
TN=`$SHTOOL echo -e "%b" 2>/dev/null`
|
|
|
|
fi
|
|
|
|
|
2004-08-24 17:26:39 +08:00
|
|
|
SLEEPTIME=10
|
2002-02-11 07:49:57 +08:00
|
|
|
|
2003-10-21 11:08:08 +08:00
|
|
|
echo ">>>>> Executing all LDAP tests for $BACKEND"
|
|
|
|
|
1999-01-10 10:25:41 +08:00
|
|
|
for CMD in $SRCDIR/scripts/test*; do
|
2009-03-16 18:17:16 +08:00
|
|
|
case "$CMD" in
|
|
|
|
*~) continue;;
|
|
|
|
*.bak) continue;;
|
2009-03-17 05:53:20 +08:00
|
|
|
*.orig) continue;;
|
2009-03-16 18:17:16 +08:00
|
|
|
*.sav) continue;;
|
2009-03-21 01:25:02 +08:00
|
|
|
*) test -f "$CMD" || continue;;
|
2009-03-16 18:17:16 +08:00
|
|
|
esac
|
|
|
|
|
2003-10-21 11:08:08 +08:00
|
|
|
# remove cruft from prior test
|
2003-10-22 13:14:08 +08:00
|
|
|
if test $PRESERVE = yes ; then
|
2007-03-09 17:34:41 +08:00
|
|
|
/bin/rm -rf $TESTDIR/db.*
|
2003-10-22 13:14:08 +08:00
|
|
|
else
|
2007-03-09 17:34:41 +08:00
|
|
|
/bin/rm -rf $TESTDIR
|
2003-10-22 13:14:08 +08:00
|
|
|
fi
|
2008-08-27 05:48:17 +08:00
|
|
|
if test $BACKEND = ndb ; then
|
|
|
|
mysql --user root <<EOF
|
|
|
|
drop database if exists db_1;
|
|
|
|
drop database if exists db_2;
|
|
|
|
drop database if exists db_3;
|
|
|
|
drop database if exists db_4;
|
|
|
|
drop database if exists db_5;
|
|
|
|
drop database if exists db_6;
|
|
|
|
EOF
|
|
|
|
fi
|
2003-10-21 11:08:08 +08:00
|
|
|
|
2009-07-09 00:20:53 +08:00
|
|
|
echo ">>>>> Starting ${TB}`basename $CMD`${TN} for $BACKEND..."
|
2003-10-21 11:08:08 +08:00
|
|
|
$CMD
|
1998-08-09 08:43:13 +08:00
|
|
|
RC=$?
|
1999-04-21 13:59:01 +08:00
|
|
|
if test $RC -eq 0 ; then
|
2009-07-09 00:20:53 +08:00
|
|
|
echo ">>>>> $CMD completed ${TB}OK${TN} for $BACKEND."
|
1998-08-09 08:43:13 +08:00
|
|
|
else
|
2009-07-09 00:20:53 +08:00
|
|
|
echo ">>>>> $CMD ${TB}failed${TN} for $BACKEND (exit $RC)"
|
1998-08-09 08:43:13 +08:00
|
|
|
exit $RC
|
|
|
|
fi
|
2003-10-21 11:08:08 +08:00
|
|
|
|
2006-01-11 13:25:09 +08:00
|
|
|
# echo ">>>>> waiting $SLEEPTIME seconds for things to exit"
|
|
|
|
# sleep $SLEEPTIME
|
2002-02-11 07:49:57 +08:00
|
|
|
echo ""
|
1998-08-09 08:43:13 +08:00
|
|
|
done
|