From: Howard Chu Date: Fri, 10 Oct 2003 12:11:22 +0000 (+0000) Subject: Push invariant args into environment, they were making the "WAIT" X-Git-Tag: OPENLDAP_REL_ENG_2_1_MP~601 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=61452ee9c7160f904ea5a865678fc469689457d8;p=openldap Push invariant args into environment, they were making the "WAIT" parameter too difficult to use. --- diff --git a/tests/Makefile.in b/tests/Makefile.in index 3184786344..4d5543d329 100644 --- a/tests/Makefile.in +++ b/tests/Makefile.in @@ -10,78 +10,68 @@ BUILD_LDBM=@BUILD_LDBM@ BUILD_MONITOR=@BUILD_MONITOR@ BUILD_CACHE=@BUILD_CACHE@ -test: tests -tests: int-bdb +test: tests +tests: ldbm +ldbm: hdb +hdb: bdb -int-bdb: test-bdb - @$(MAKE) int-hdb -int-hdb: test-hdb - @$(MAKE) int-ldbm -int-ldbm: test-ldbm - -bdb: test-bdb -test-bdb: FORCE +links: data schema ucdata +data: @-$(LN_S) $(srcdir)/data . +schema: @-$(LN_S) $(top_srcdir)/servers/slapd/schema . +ucdata: @-$(LN_S) ../libraries/liblunicode ucdata - @if test "$(BUILD_BDB)" != "no"; then \ - echo "Initiating LDAP tests for BDB..." ; \ - $(MKDIR) test-db test-repl || true; \ - $(srcdir)/scripts/all $(srcdir) bdb $(BUILD_BDB) $(BUILD_MONITOR) $(BUILD_CACHE) bdb ; \ - else \ - echo "run configure with --enable-bdb" ; \ - fi -hdb: test-hdb -test-hdb: FORCE - @-$(LN_S) $(srcdir)/data . - @-$(LN_S) $(top_srcdir)/servers/slapd/schema . - @-$(LN_S) ../libraries/liblunicode ucdata - @if test "$(BUILD_HDB)" != "no" ; then \ - echo "Initiating LDAP tests for HDB..." ; \ - $(MKDIR) test-db test-repl || true; \ - $(srcdir)/scripts/all $(srcdir) hdb $(BUILD_HDB) $(BUILD_MONITOR) $(BUILD_CACHE) hdb ; \ - else \ - echo "run configure with --enable-hdb" ; \ - fi +dirs: test-db test-repl +test-db test-repl: + @$(MKDIR) $@ -ldbm: test-ldbm -test-ldbm: FORCE - @-$(LN_S) $(srcdir)/data . - @-$(LN_S) $(top_srcdir)/servers/slapd/schema . - @-$(LN_S) ../libraries/liblunicode ucdata - @if test "$(BUILD_LDBM)" != "no" ; then \ - echo "Initiating LDAP tests for LDBM..." ; \ - $(MKDIR) test-db test-repl || true; \ - if test "$(BUILD_BDB)" != "no"; then \ - $(srcdir)/scripts/all $(srcdir) ldbm $(BUILD_LDBM) $(BUILD_MONITOR) $(BUILD_CACHE) bdb ; \ +test-bdb: bdb +bdb: bdb-$(BUILD_BDB) +bdb-no: + @echo "run configure with --enable-bdb" + +bdb-yes bdb-mod: links dirs FORCE + @echo "Initiating LDAP tests for BDB..." + @MONITORDB=$(BUILD_MONITOR) PROXYCACHE=$(BUILD_CACHE) BACKENDTYPE=$(BUILD_BDB) $(srcdir)/scripts/all $(srcdir) bdb bdb + +test-hdb: hdb +hdb: hdb-$(BUILD_HDB) +hdb-no: + @echo "run configure with --enable-hdb" + +hdb-yes hdb-mod: links dirs FORCE + @echo "Initiating LDAP tests for HDB..." + @MONITORDB=$(BUILD_MONITOR) PROXYCACHE=$(BUILD_CACHE) BACKENDTYPE=$(BUILD_HDB) $(srcdir)/scripts/all $(srcdir) hdb hdb + +test-ldbm: ldbm +ldbm: ldbm-$(BUILD_LDBM) +ldbm-no: + @echo "run configure with --enable-ldbm" + +ldbm-yes ldbm-mod: links dirs FORCE + @echo "Initiating LDAP tests for LDBM..." + @MONITORDB=$(BUILD_MONITOR); PROXYCACHE=$(BUILD_CACHE); \ + BACKENDTYPE=$(BUILD_LDBM); export MONITORDB PROXYCACHE 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 \ - if test "$(BUILD_HDB)" != "no"; then \ - $(srcdir)/scripts/all $(srcdir) ldbm $(BUILD_LDBM) $(BUILD_MONITOR) $(BUILD_CACHE) hdb ; \ - else \ - $(srcdir)/scripts/all $(srcdir) ldbm $(BUILD_LDBM) $(BUILD_MONITOR) $(BUILD_CACHE) no ; \ - fi ; \ + $(srcdir)/scripts/all $(srcdir) ldbm no ; \ fi ; \ - else \ - echo "run configure with --enable-ldbm" ; \ fi passwd: test-passwd -test-passwd: FORCE - @-$(LN_S) $(srcdir)/data . - @-$(LN_S) $(top_srcdir)/servers/slapd/schema . - @-$(LN_S) ../libraries/liblunicode ucdata +test-passwd: links dirs FORCE @echo "Initiating LDAP tests..." - @-$(MKDIR) test-db test-repl || true @$(srcdir)/scripts/passwd-search $(srcdir) passwd test-nis-schema: test-nis-schema-ldbm -test-nis-schema-ldbm: - @-$(LN_S) $(srcdir)/data . - @-$(LN_S) $(top_srcdir)/servers/slapd/schema . - @-$(LN_S) ../libraries/liblunicode ucdata +test-nis-schema-ldbm: links dirs FORCE @echo "Initiating LDAP server with NIS schema & ldbm backend..."; \ - $(MKDIR) test-db test-repl ; \ $(srcdir)/scripts/startup_nis_ldap_server.sh $(srcdir) ldbm clean-local: FORCE diff --git a/tests/scripts/all b/tests/scripts/all index 46257d3690..3d44e9fc63 100755 --- a/tests/scripts/all +++ b/tests/scripts/all @@ -22,27 +22,13 @@ fi echo ">>>>> Backend: $BACKEND" -if test $# -eq 0 ; then - BACKENDTYPE=yes -else - BACKENDTYPE=$1; shift -fi - -echo ">>>>> Backend Type: $BACKENDTYPE" - -if test $# -eq 0 ; then - MONITOR=no -else - MONITOR=$1; shift -fi +MONITORDB=${MONITORDB-no} +PROXYCACHE=${PROXYCACHE-no} +BACKENDTYPE=${BACKENDTYPE-yes} -SHTOOL="$SRCDIR/../build/shtool" +export MONITORDB PROXYCACHE BACKENDTYPE -if test $# -eq 0 ; then - PROXYCACHE=no -else - PROXYCACHE=$1; shift -fi +echo ">>>>> Backend Type: $BACKENDTYPE" if test $# -eq 0 ; then SYNCREPL=no @@ -50,12 +36,14 @@ else SYNCREPL=$1; shift fi +SHTOOL="$SRCDIR/../build/shtool" + TB=`$SHTOOL echo -e "%B"` TN=`$SHTOOL echo -e "%b"` for CMD in $SRCDIR/scripts/test*; do echo ">>>>> Starting ${TB}`basename $CMD`${TN} ..." - $CMD $SRCDIR $BACKEND $BACKENDTYPE $MONITOR $PROXYCACHE $SYNCREPL + $CMD $SRCDIR $BACKEND $SYNCREPL RC=$? if test $RC -eq 0 ; then echo ">>>>> $CMD completed ${TB}OK${TN}." diff --git a/tests/scripts/args.sh b/tests/scripts/args.sh index b13e8af097..d24023fb9e 100755 --- a/tests/scripts/args.sh +++ b/tests/scripts/args.sh @@ -5,21 +5,6 @@ if test $# -ge 1 ; then BACKEND=$1; shift fi -BACKENDTYPE=yes -if test $# -ge 1 ; then - BACKENDTYPE=$1; shift -fi - -MONITORDB=no -if test $# -ge 1 ; then - MONITORDB=$1; shift -fi - -PROXYCACHE=no -if test $# -ge 1 ; then - PROXYCACHE=$1; shift -fi - SYNCREPL=no if test $# -ge 1 ; then SYNCREPL=$1; shift