diff options
author | Andrew Tridgell <tridge@samba.org> | 2006-08-22 01:32:29 +0000 |
---|---|---|
committer | Gerald (Jerry) Carter <jerry@samba.org> | 2007-10-10 14:16:22 -0500 |
commit | 35817c01a87f4bda0f492144a56d39a99bc07eb1 (patch) | |
tree | 6495a245745b48a3b9fffb13934a0681aacfae1d /source4/lib/ldb/tests | |
parent | 862ba2617205832d4d5f0db07c54c4cc436a0f3d (diff) | |
download | samba-35817c01a87f4bda0f492144a56d39a99bc07eb1.tar.gz samba-35817c01a87f4bda0f492144a56d39a99bc07eb1.tar.bz2 samba-35817c01a87f4bda0f492144a56d39a99bc07eb1.zip |
r17679: - fix 'make test-ldap' to skip ldb specials
- allow ldb to be built in a separate build directory, using:
/some/path/to/ldb/configure
make
this will make it much easier to put ldb in the build farm without
interfering with the build farm builds of tdb and talloc
(This used to be commit 580ed6730d33bad62e9799a38377c40f2852ae89)
Diffstat (limited to 'source4/lib/ldb/tests')
-rwxr-xr-x | source4/lib/ldb/tests/init_slapd.sh | 7 | ||||
-rwxr-xr-x | source4/lib/ldb/tests/start_slapd.sh | 9 | ||||
-rwxr-xr-x | source4/lib/ldb/tests/test-generic.sh | 10 | ||||
-rwxr-xr-x | source4/lib/ldb/tests/test-ldap.sh | 13 | ||||
-rwxr-xr-x | source4/lib/ldb/tests/test-tdb.sh | 2 |
5 files changed, 29 insertions, 12 deletions
diff --git a/source4/lib/ldb/tests/init_slapd.sh b/source4/lib/ldb/tests/init_slapd.sh index fc1ed16a4c..c50ea0ecab 100755 --- a/source4/lib/ldb/tests/init_slapd.sh +++ b/source4/lib/ldb/tests/init_slapd.sh @@ -1,5 +1,10 @@ #!/bin/sh +if [ -z "$LDBDIR" ]; then + LDBDIR=`dirname $0`/.. + export LDBDIR +fi + rm -rf tests/tmp/db mkdir -p tests/tmp/db @@ -10,4 +15,4 @@ sleep 2 if pidof slapd > /dev/null; then killall -9 slapd fi -slapadd -f tests/slapd.conf < tests/init.ldif || exit 1 +slapadd -f $LDBDIR/tests/slapd.conf < $LDBDIR/tests/init.ldif || exit 1 diff --git a/source4/lib/ldb/tests/start_slapd.sh b/source4/lib/ldb/tests/start_slapd.sh index 6dd3eaa9b8..49ce5538f1 100755 --- a/source4/lib/ldb/tests/start_slapd.sh +++ b/source4/lib/ldb/tests/start_slapd.sh @@ -1,7 +1,12 @@ #!/bin/sh -mkdir -p tests/tmp/db +if [ -z "$LDBDIR" ]; then + LDBDIR=`dirname $0`/.. + export LDBDIR +fi -slapd -f tests/slapd.conf -h "`tests/ldapi_url.sh`" $* +mkdir -p $LDBDIR/tests/tmp/db + +slapd -f $LDBDIR/tests/slapd.conf -h "`$LDBDIR/tests/ldapi_url.sh`" $* sleep 2 diff --git a/source4/lib/ldb/tests/test-generic.sh b/source4/lib/ldb/tests/test-generic.sh index 3246b7138f..363bf89065 100755 --- a/source4/lib/ldb/tests/test-generic.sh +++ b/source4/lib/ldb/tests/test-generic.sh @@ -1,5 +1,9 @@ #!/bin/sh +if [ -z "$LDB_SPECIALS" ]; then + export LDB_SPECIALS=1 +fi + echo "LDB_URL: $LDB_URL" echo "Adding base elements" @@ -22,8 +26,10 @@ $VALGRIND ldbsearch '(uid=uham)' || exit 1 echo "Starting ldbtest" time $VALGRIND ldbtest --num-records 100 --num-searches 10 || exit 1 -echo "Adding index" -$VALGRIND ldbadd $LDBDIR/tests/test-index.ldif || exit 1 +if [ $LDB_SPECIALS = 1 ]; then + echo "Adding index" + $VALGRIND ldbadd $LDBDIR/tests/test-index.ldif || exit 1 +fi echo "Adding attributes" $VALGRIND ldbadd $LDBDIR/tests/test-wrong_attributes.ldif || exit 1 diff --git a/source4/lib/ldb/tests/test-ldap.sh b/source4/lib/ldb/tests/test-ldap.sh index d9fa73b641..592e09f408 100755 --- a/source4/lib/ldb/tests/test-ldap.sh +++ b/source4/lib/ldb/tests/test-ldap.sh @@ -24,17 +24,18 @@ for f in $SCHEMA_NEEDED; do fi done -export LDB_URL=`tests/ldapi_url.sh` - -PATH=bin:$PATH -export PATH - if [ -z "$LDBDIR" ]; then - LDBDIR="." + LDBDIR=`dirname $0`/.. export LDBDIR fi +export LDB_URL=`$LDBDIR/tests/ldapi_url.sh` + +PATH=bin:$PATH +export PATH + . $LDBDIR/tests/init_slapd.sh . $LDBDIR/tests/start_slapd.sh +export LDB_SPECIALS=0 . $LDBDIR/tests/test-generic.sh diff --git a/source4/lib/ldb/tests/test-tdb.sh b/source4/lib/ldb/tests/test-tdb.sh index c0f9d7b2de..e1052d1651 100755 --- a/source4/lib/ldb/tests/test-tdb.sh +++ b/source4/lib/ldb/tests/test-tdb.sh @@ -13,7 +13,7 @@ export PATH rm -f $LDB_URL* if [ -z "$LDBDIR" ]; then - LDBDIR="." + LDBDIR=`dirname $0`/.. export LDBDIR fi |