build: Try not build with LDAP if we do not have ldap.h
[Samba/gbeck.git] / lib / ldb / tests / test-tdb.sh
blob3310c81392615469b8bf12a0c913bbdc2d97a3dd
1 #!/bin/sh
3 BINDIR=$1
5 if [ -n "$TEST_DATA_PREFIX" ]; then
6 LDB_URL="$TEST_DATA_PREFIX/tdbtest.ldb"
7 else
8 LDB_URL="tdbtest.ldb"
9 fi
10 export LDB_URL
12 PATH=$BINDIR:$PATH
13 export PATH
15 if [ -z "$LDBDIR" ]; then
16 LDBDIR=`dirname $0`/..
17 export LDBDIR
20 cd $LDBDIR
22 rm -f $LDB_URL*
24 cat <<EOF | $VALGRIND ldbadd || exit 1
25 dn: @MODULES
26 @LIST: rdn_name
27 EOF
29 $VALGRIND ldbadd $LDBDIR/tests/init.ldif || exit 1
31 . $LDBDIR/tests/test-generic.sh
33 . $LDBDIR/tests/test-extended.sh
35 . $LDBDIR/tests/test-tdb-features.sh
37 . $LDBDIR/tests/test-controls.sh