summaryrefslogtreecommitdiff
path: root/source4/lib
diff options
context:
space:
mode:
Diffstat (limited to 'source4/lib')
-rwxr-xr-xsource4/lib/ldb/tests/test-ldap.sh19
1 files changed, 19 insertions, 0 deletions
diff --git a/source4/lib/ldb/tests/test-ldap.sh b/source4/lib/ldb/tests/test-ldap.sh
index 29b40ff455..3e285a39a9 100755
--- a/source4/lib/ldb/tests/test-ldap.sh
+++ b/source4/lib/ldb/tests/test-ldap.sh
@@ -1,5 +1,24 @@
#!/bin/sh
+SCHEMA_NEEDED="core nis cosine inetorgperson openldap"
+
+# setup needed schema files
+for f in $SCHEMA_NEEDED; do
+ if [ ! -r tests/schema/$f.schema ]; then
+ mkdir -p tests/schema
+ if [ -r /etc/ldap/schema/$f.schema ]; then
+ ln -s /etc/ldap/schema/$f.schema tests/schema/$f.schema
+ continue;
+ fi
+
+ echo "ERROR: you need the following OpenLDAP schema files in tests/schema/"
+ for f in $SCHEMA_NEEDED; do
+ echo " $f.schema"
+ done
+ exit 1
+ fi
+done
+
tests/init_slapd.sh
tests/start_slapd.sh