]> git.sur5r.net Git - openldap/blob - tests/scripts/all
Update copyright for next release
[openldap] / tests / scripts / all
1 #! /bin/sh
2 # $OpenLDAP$
3 ## This work is part of OpenLDAP Software <http://www.openldap.org/>.
4 ##
5 ## Copyright 1998-2009 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
18 TB="" TN=""
19 if test -t 1 ; then
20         TB=`$SHTOOL echo -e "%B" 2>/dev/null`
21         TN=`$SHTOOL echo -e "%b" 2>/dev/null`
22 fi
23
24 SLEEPTIME=10
25
26 echo ">>>>> Executing all LDAP tests for $BACKEND"
27
28 for CMD in $SRCDIR/scripts/test*; do
29         # remove cruft from prior test
30         if test $PRESERVE = yes ; then
31                 /bin/rm -rf $TESTDIR/db.*
32         else
33                 /bin/rm -rf $TESTDIR
34         fi
35         if test $BACKEND = ndb ; then
36                 mysql --user root <<EOF
37                 drop database if exists db_1;
38                 drop database if exists db_2;
39                 drop database if exists db_3;
40                 drop database if exists db_4;
41                 drop database if exists db_5;
42                 drop database if exists db_6;
43 EOF
44         fi
45
46         echo ">>>>> Starting ${TB}`basename $CMD`${TN} ..."
47         $CMD
48         RC=$?
49         if test $RC -eq 0 ; then
50                 echo ">>>>> $CMD completed ${TB}OK${TN}."
51         else
52                 echo ">>>>> $CMD ${TB}failed${TN} (exit $RC)"
53                 exit $RC
54         fi
55
56 #       echo ">>>>> waiting $SLEEPTIME seconds for things to exit"
57 #       sleep $SLEEPTIME
58         echo ""
59 done