From: Kurt Zeilenga Date: Tue, 21 Oct 2003 03:08:08 +0000 (+0000) Subject: Rework test suite to use run script. X-Git-Tag: OPENLDAP_REL_ENG_2_1_MP~530 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=b8ff29abfd82b0968acfdbf6c1adae877b90c83f;p=openldap Rework test suite to use run script. A little rough around the edges still. --- diff --git a/tests/Makefile.in b/tests/Makefile.in index 9bf6b19659..be370a5540 100644 --- a/tests/Makefile.in +++ b/tests/Makefile.in @@ -3,79 +3,45 @@ ## COPYING RESTRICTIONS APPLY, see COPYRIGHT file ## ## tests Makefile.in for OpenLDAP +RUN=./run SUBDIRS= progs + BUILD_BDB=@BUILD_BDB@ BUILD_HDB=@BUILD_HDB@ BUILD_LDBM=@BUILD_LDBM@ -BUILD_MONITOR=@BUILD_MONITOR@ -BUILD_CACHE=@BUILD_CACHE@ -WITH_TLS=@WITH_TLS@ test tests: @$(MAKE) bdb @$(MAKE) hdb @$(MAKE) ldbm -links: data schema ucdata -data: - @-$(LN_S) $(srcdir)/data . -schema: - @-$(LN_S) $(top_srcdir)/servers/slapd/schema . -ucdata: - @-$(LN_S) ../libraries/liblunicode ucdata - -dirs: test-db test-repl -test-db test-repl: - @$(MKDIR) $@ - bdb test-bdb: bdb-$(BUILD_BDB) bdb-no: @echo "run configure with --enable-bdb" -bdb-yes bdb-mod: links dirs FORCE +bdb-yes bdb-mod: FORCE @echo "Initiating LDAP tests for BDB..." - @MONITORDB=$(BUILD_MONITOR) PROXYCACHE=$(BUILD_CACHE) WITHTLS=$(WITH_TLS) BACKENDTYPE=$(BUILD_BDB) $(srcdir)/scripts/all $(srcdir) bdb bdb + @$(RUN) -b bdb all hdb test-hdb: hdb-$(BUILD_HDB) hdb-no: @echo "run configure with --enable-hdb" -hdb-yes hdb-mod: links dirs FORCE +hdb-yes hdb-mod: FORCE @echo "Initiating LDAP tests for HDB..." - @MONITORDB=$(BUILD_MONITOR) PROXYCACHE=$(BUILD_CACHE) WITHTLS=$(WITH_TLS) BACKENDTYPE=$(BUILD_HDB) $(srcdir)/scripts/all $(srcdir) hdb hdb + @$(RUN) -b hdb all ldbm test-ldbm: ldbm-$(BUILD_LDBM) ldbm-no: @echo "run configure with --enable-ldbm" -ldbm-yes ldbm-mod: links dirs FORCE +ldbm-yes ldbm-mod: FORCE @echo "Initiating LDAP tests for LDBM..." - @MONITORDB=$(BUILD_MONITOR); PROXYCACHE=$(BUILD_CACHE); WITHTLS=$(WITH_TLS) \ - BACKENDTYPE=$(BUILD_LDBM); \ - export MONITORDB PROXYCACHE WITHTLS BACKENDTYPE; \ - if test "$(BUILD_BDB)" != "no"; then \ - $(srcdir)/scripts/all $(srcdir) ldbm bdb ; \ - else \ - if test "$(BUILD_HDB)" != "no"; then \ - $(srcdir)/scripts/all $(srcdir) ldbm hdb ; \ - else \ - $(srcdir)/scripts/all $(srcdir) ldbm no ; \ - fi ; \ - fi - -passwd test-passwd: links dirs FORCE - @echo "Initiating LDAP tests..." - @$(srcdir)/scripts/passwd-search $(srcdir) passwd - -test-nis-schema: test-nis-schema-ldbm -test-nis-schema-ldbm: links dirs FORCE - @echo "Initiating LDAP server with NIS schema & ldbm backend..."; \ - $(srcdir)/scripts/startup_nis_ldap_server.sh $(srcdir) ldbm + @$(RUN) -b ldbm all clean-local: FORCE - -$(RM) -r test-db/[!C]* test-repl/[!C]* test-cache/[!C]* *leak *gmon *core + -$(RM) -r test-db* test-repl* *leak *gmon *core veryclean-local: FORCE @-$(RM) data schema ucdata - -$(RM) -r test-db test-repl test-cache diff --git a/tests/README b/tests/README index e10fb9107d..2ede0e995f 100644 --- a/tests/README +++ b/tests/README @@ -3,6 +3,7 @@ verify basic functionality of the LDAP libraries, slapd, and slurpd. To run all of the tests, type "make test". To run BDB tests, type "make bdb". + To run HDB tests, type "make hdb". To run LDBM tests, type "make ldbm". The test scripts depends on a number of tools commonly available on diff --git a/tests/data/slapd-schema.conf b/tests/data/slapd-schema.conf index 78581775c7..e3d32010ae 100644 --- a/tests/data/slapd-schema.conf +++ b/tests/data/slapd-schema.conf @@ -22,7 +22,7 @@ pidfile ./test-db/slapd.pid argsfile ./test-db/slapd.args # -rootdse ./data/rootdse.ldif +rootdse ./testdata/rootdse.ldif modulepath ../servers/slapd/back-@BACKEND@/ @MODULELOAD@ diff --git a/tests/run.in b/tests/run.in index 1f73e284a9..424da60fc0 100644 --- a/tests/run.in +++ b/tests/run.in @@ -1,9 +1,14 @@ #!/bin/sh -USAGE="$0 [-d ]