3 ## This work is part of OpenLDAP Software <http://www.openldap.org/>.
5 ## Copyright 1998-2015 The OpenLDAP Foundation.
6 ## All rights reserved.
8 ## Redistribution and use in source and binary forms, with or without
9 ## modification, are permitted only as authorized by the OpenLDAP
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>.
16 . $SRCDIR/scripts/defines.sh
20 TB=`$SHTOOL echo -e "%B" 2>/dev/null`
21 TN=`$SHTOOL echo -e "%b" 2>/dev/null`
28 echo ">>>>> Executing all LDAP tests for $BACKEND"
30 if [ -n "$NOEXIT" ]; then
31 echo "Result Test" > $TESTWD/results
34 for CMD in $SRCDIR/scripts/test*; do
40 *) test -f "$CMD" || continue;;
43 # remove cruft from prior test
44 if test $PRESERVE = yes ; then
45 /bin/rm -rf $TESTDIR/db.*
49 if test $BACKEND = ndb ; then
50 mysql --user root <<EOF
51 drop database if exists db_1;
52 drop database if exists db_2;
53 drop database if exists db_3;
54 drop database if exists db_4;
55 drop database if exists db_5;
56 drop database if exists db_6;
60 if [ -x "$CMD" ]; then
62 echo ">>>>> Starting ${TB}$BCMD${TN} for $BACKEND..."
65 if test $RC -eq 0 ; then
66 echo ">>>>> $BCMD completed ${TB}OK${TN} for $BACKEND."
68 echo ">>>>> $BCMD ${TB}failed${TN} for $BACKEND"
69 FAILCOUNT=`expr $FAILCOUNT + 1`
71 if [ -n "$NOEXIT" ]; then
79 echo ">>>>> Skipping ${TB}$BCMD${TN} for $BACKEND."
80 SKIPCOUNT=`expr $SKIPCOUNT + 1`
84 if [ -n "$NOEXIT" ]; then
85 echo "$RC $BCMD" >> $TESTWD/results
88 # echo ">>>>> waiting $SLEEPTIME seconds for things to exit"
93 if [ -n "$NOEXIT" ]; then
94 if [ "$FAILCOUNT" -gt 0 ]; then
96 echo "$FAILCOUNT tests for $BACKEND ${TB}failed${TN}. Please review the test log."
98 echo "All executed tests for $BACKEND ${TB}succeeded${TN}."
102 echo "$SKIPCOUNT tests for $BACKEND were ${TB}skipped${TN}."