summaryrefslogtreecommitdiff
path: root/source4/lib/ldb/tests
diff options
context:
space:
mode:
Diffstat (limited to 'source4/lib/ldb/tests')
-rwxr-xr-xsource4/lib/ldb/tests/init_slapd.sh8
-rwxr-xr-xsource4/lib/ldb/tests/test-generic.sh15
-rwxr-xr-xsource4/lib/ldb/tests/test-tdb.sh1
3 files changed, 19 insertions, 5 deletions
diff --git a/source4/lib/ldb/tests/init_slapd.sh b/source4/lib/ldb/tests/init_slapd.sh
index 67eecb031c..65700f6c18 100755
--- a/source4/lib/ldb/tests/init_slapd.sh
+++ b/source4/lib/ldb/tests/init_slapd.sh
@@ -5,7 +5,11 @@ export PATH=/usr/sbin:$PATH
rm -rf tests/tmp/db
mkdir -p tests/tmp/db
-killall slapd
+if pidof slapd > /dev/null; then
+ killall slapd
+fi
sleep 2
-killall -9 slapd
+if pidof slapd > /dev/null; then
+ killall -9 slapd
+fi
slapadd -f tests/slapd.conf < tests/init.ldif || exit 1
diff --git a/source4/lib/ldb/tests/test-generic.sh b/source4/lib/ldb/tests/test-generic.sh
index 79db49bb48..794b451074 100755
--- a/source4/lib/ldb/tests/test-generic.sh
+++ b/source4/lib/ldb/tests/test-generic.sh
@@ -1,8 +1,17 @@
echo "Adding base elements"
-bin/ldbadd tests/test.ldif
+bin/ldbadd tests/test.ldif || exit 1
echo "Modifying elements"
-bin/ldbmodify tests/test-modify.ldif
+bin/ldbmodify tests/test-modify.ldif || exit 1
echo "Showing modified record"
-bin/ldbsearch '(uid=uham)'
+bin/ldbsearch '(uid=uham)' || exit 1
+
+echo "Starting ldbtest"
+time bin/ldbtest -r 1000 -s 100 || exit 1
+
+echo "Adding index"
+bin/ldbadd tests/test-index.ldif || exit 1
+
+echo "Starting ldbtest indexed"
+time bin/ldbtest -r 1000 -s 5000 || exit 1
diff --git a/source4/lib/ldb/tests/test-tdb.sh b/source4/lib/ldb/tests/test-tdb.sh
index 1e21accac5..316828c31c 100755
--- a/source4/lib/ldb/tests/test-tdb.sh
+++ b/source4/lib/ldb/tests/test-tdb.sh
@@ -6,3 +6,4 @@ export LDB_URL="tdb://test.ldb"
rm -f test.ldb
. tests/test-generic.sh
+