openldap/tests/scripts/all

68 lines
1.5 KiB
Plaintext
Raw Normal View History

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
TB="" TN=""
if test -t 1 ; then
TB=`$SHTOOL echo -e "%B" 2>/dev/null`
TN=`$SHTOOL echo -e "%b" 2>/dev/null`
fi
SLEEPTIME=10
2002-02-11 07:49:57 +08:00
echo ">>>>> Executing all LDAP tests for $BACKEND"
for CMD in $SRCDIR/scripts/test*; do
case "$CMD" in
*~) continue;;
*.bak) continue;;
2009-03-17 05:53:20 +08:00
*.orig) continue;;
*.sav) continue;;
*) test -x "$CMD" || continue;;
esac
# remove cruft from prior test
if test $PRESERVE = yes ; then
/bin/rm -rf $TESTDIR/db.*
else
/bin/rm -rf $TESTDIR
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
2002-02-11 07:49:57 +08:00
echo ">>>>> Starting ${TB}`basename $CMD`${TN} ..."
$CMD
1998-08-09 08:43:13 +08:00
RC=$?
1999-04-21 13:59:01 +08:00
if test $RC -eq 0 ; then
2002-02-11 07:49:57 +08:00
echo ">>>>> $CMD completed ${TB}OK${TN}."
1998-08-09 08:43:13 +08:00
else
2002-02-11 07:49:57 +08:00
echo ">>>>> $CMD ${TB}failed${TN} (exit $RC)"
1998-08-09 08:43:13 +08:00
exit $RC
fi
# 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