## COPYING RESTRICTIONS APPLY, see COPYRIGHT file
##
## tests Makefile.in for OpenLDAP
-BUILD_BDB2 = @BUILD_BDB2@
-
-SRC = slapd-tester.c slapd-search.c
-PROGRAMS = slapd-tester slapd-search slapd-read slapd-addel
-
-LDAP_INCDIR= ../include
-LDAP_LIBDIR= ../libraries
+SUBDIRS= progs
-XLIBS = -lldap_r -llber -llutil
-
-build-tools: FORCE
- $(MAKE) $(MFLAGS) load-tools
+BUILD_BDB2 = @BUILD_BDB2@
-load-tools: $(PROGRAMS)
+test: tests
+tests: bdb2 ldbm
-slapd-tester: slapd-tester.o
- $(LTLINK) -o $@ slapd-tester.o
+bdb2: test-bdb2
+test-bdb2: FORCE
+ @-$(LN_S) $(srcdir)/data .
+ @if test "$(BUILD_BDB2)" = "yes" ; then \
+ echo "Initiating LDAP tests..." ; \
+ $(MKDIR) test-db test-repl || true; \
+ $(srcdir)/scripts/all $(srcdir) bdb2 ; \
+ else \
+ echo "run configure with --enable-bdb2" ; \
+ fi
-slapd-search: slapd-search.o $(LDAP_LIBLBER_DEPEND) $(LDAP_LIBLDAP_DEPEND)
- $(LTLINK) -o $@ slapd-search.o $(LIBS)
+ldbm: test-ldbm
+test-ldbm: FORCE
+ @-$(LN_S) $(srcdir)/data .
+ @echo "Initiating LDAP tests..."
+ @-$(MKDIR) test-db test-repl || true
+ @$(srcdir)/scripts/all $(srcdir) ldbm
-slapd-read: slapd-read.o $(LDAP_LIBLBER_DEPEND) $(LDAP_LIBLDAP_DEPEND)
- $(LTLINK) -o $@ slapd-read.o $(LIBS)
+passwd: test-passwd
+test-passwd: FORCE
+ @-$(LN_S) $(srcdir)/data .
+ @echo "Initiating LDAP tests..."
+ @-$(MKDIR) test-db test-repl || true
+ @$(srcdir)/scripts/passwd-search $(srcdir) passwd
-slapd-addel: slapd-addel.o $(LDAP_LIBLBER_DEPEND) $(LDAP_LIBLDAP_DEPEND)
- $(LTLINK) -o $@ slapd-addel.o $(LIBS)
+test-nis-schema: test-nis-schema-ldbm
+test-nis-schema-ldbm:
+ @-$(LN_S) $(srcdir)/data .
+ @echo "Initiating LDAP server with NIS schema & ldbm backend..."; \
+ $(MKDIR) test-db test-repl ; \
+ $(srcdir)/scripts/startup_nis_ldap_server.sh $(srcdir) ldbm
-bdb2-local: build-tools FORCE
+test-nis-schema-bdb2:
+ @-$(LN_S) $(srcdir)/data .
+ @echo "Initiating LDAP server with NIS schema & DB2 backend..."; \
@if test "$(BUILD_BDB2)" = "yes" ; then \
- $(LN_S) $(srcdir)/data . ; \
echo "Initiating LDAP tests..." ; \
$(MKDIR) test-db test-repl ; \
- $(srcdir)/scripts/all $(srcdir) bdb2 ; \
+ $(srcdir)/scripts/startup_nis_ldap_server.sh $(srcdir) bdb2 ; \
else \
echo "run configure with --enable-bdb2" ; \
fi
-all-local: build-tools FORCE
- @-$(LN_S) $(srcdir)/data .
- @echo "Initiating LDAP tests..."; \
- $(MKDIR) test-db test-repl ; \
- $(srcdir)/scripts/all $(srcdir) ldbm
-
clean-local: FORCE
- $(RM) test-db/[!C]* test-repl/[!C]* *core
- $(RM) $(PROGRAMS)
- $(RM) *.o
+ -$(RM) test-db/[!C]* test-repl/[!C]* *core
veryclean-local: FORCE
@-$(RM) data
$(RM) -r test-db test-repl
- $(RM) $(PROGRAMS)
- $(RM) *.o