summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>2006-08-22 11:26:27 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 14:16:29 -0500
commitd8f2434296c12911df55989343d975beb9d4a656 (patch)
tree7475204226552b1155e6143bda181fb330f828d7
parentb2658f0dd6975758d7a3496e661c2e04f19bf36f (diff)
downloadsamba-d8f2434296c12911df55989343d975beb9d4a656.tar.gz
samba-d8f2434296c12911df55989343d975beb9d4a656.tar.bz2
samba-d8f2434296c12911df55989343d975beb9d4a656.zip
r17708: make the automated testing of the ldb ldap backend more portable
(This used to be commit bf88bc5de61c3c20d77e2d73e27e741031e9ec06)
-rwxr-xr-xsource4/lib/ldb/tests/init_slapd.sh12
-rwxr-xr-xsource4/lib/ldb/tests/test-ldap.sh4
2 files changed, 9 insertions, 7 deletions
diff --git a/source4/lib/ldb/tests/init_slapd.sh b/source4/lib/ldb/tests/init_slapd.sh
index c50ea0ecab..be3e99365c 100755
--- a/source4/lib/ldb/tests/init_slapd.sh
+++ b/source4/lib/ldb/tests/init_slapd.sh
@@ -8,11 +8,13 @@ fi
rm -rf tests/tmp/db
mkdir -p tests/tmp/db
-if pidof slapd > /dev/null; then
- killall slapd
+if [ -f tests/tmp/slapd.pid ]; then
+ kill `cat tests/tmp/slapd.pid`
+ sleep 1
fi
-sleep 2
-if pidof slapd > /dev/null; then
- killall -9 slapd
+if [ -f tests/tmp/slapd.pid ]; then
+ kill -9 `cat tests/tmp/slapd.pid`
+ rm -f tests/tmp/slapd.pid
fi
+
slapadd -f $LDBDIR/tests/slapd.conf < $LDBDIR/tests/init.ldif || exit 1
diff --git a/source4/lib/ldb/tests/test-ldap.sh b/source4/lib/ldb/tests/test-ldap.sh
index 592e09f408..e2ce81c99f 100755
--- a/source4/lib/ldb/tests/test-ldap.sh
+++ b/source4/lib/ldb/tests/test-ldap.sh
@@ -16,11 +16,11 @@ for f in $SCHEMA_NEEDED; do
continue;
fi
- echo "ERROR: you need the following OpenLDAP schema files in tests/schema/"
+ echo "SKIPPING TESTS: you need the following OpenLDAP schema files"
for f in $SCHEMA_NEEDED; do
echo " $f.schema"
done
- exit 1
+ exit 0
fi
done