From b8ff29abfd82b0968acfdbf6c1adae877b90c83f Mon Sep 17 00:00:00 2001 From: Kurt Zeilenga Date: Tue, 21 Oct 2003 03:08:08 +0000 Subject: [PATCH] Rework test suite to use run script. A little rough around the edges still. --- tests/Makefile.in | 52 +++------------ tests/README | 1 + tests/data/slapd-schema.conf | 2 +- tests/run.in | 65 ++++++++++++++++--- tests/scripts/all | 46 +++---------- tests/scripts/args.sh | 16 ----- tests/scripts/conf.sh | 4 +- tests/scripts/defines.sh | 20 ++++-- tests/scripts/makeldbm.sh | 16 ----- tests/scripts/test000-rootdse | 14 +--- tests/scripts/test001-slapadd | 15 +---- tests/scripts/test002-populate | 13 +--- tests/scripts/test003-search | 13 +--- tests/scripts/test004-modify | 15 +---- tests/scripts/test005-modrdn | 12 +--- tests/scripts/test006-acls | 13 +--- tests/scripts/test007-replication | 16 +---- tests/scripts/test008-concurrency | 15 +---- tests/scripts/test009-referral | 15 +---- tests/scripts/test010-passwd | 12 +--- tests/scripts/test011-subtree-repl | 12 +--- tests/scripts/test012-glue | 16 +---- tests/scripts/test013-language | 13 +--- tests/scripts/test014-whoami | 12 +--- tests/scripts/test015-xsearch | 13 +--- tests/scripts/test016-subref | 12 +--- tests/scripts/test017-syncreplication-refresh | 29 ++------- tests/scripts/test018-syncreplication-persist | 26 +------- tests/scripts/test019-proxycaching | 43 +++--------- .../scripts/test020-syncreplication-cascading | 42 ++---------- tests/scripts/test021-certificate | 15 +---- 31 files changed, 131 insertions(+), 477 deletions(-) delete mode 100755 tests/scripts/args.sh delete mode 100755 tests/scripts/makeldbm.sh 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 ]