]> git.sur5r.net Git - openldap/commitdiff
Push invariant args into environment, they were making the "WAIT"
authorHoward Chu <hyc@openldap.org>
Fri, 10 Oct 2003 12:11:22 +0000 (12:11 +0000)
committerHoward Chu <hyc@openldap.org>
Fri, 10 Oct 2003 12:11:22 +0000 (12:11 +0000)
parameter too difficult to use.

tests/Makefile.in
tests/scripts/all
tests/scripts/args.sh

index 3184786344c92f0506fb447a67e9908e38cb69e1..4d5543d329730a5b572eaca1173cddc1f7daabcc 100644 (file)
@@ -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
index 46257d3690b0aa80d97289a74efd799b514d1470..3d44e9fc63bd5d0e88dc16ae1f7d36d8b998e096 100755 (executable)
@@ -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}."
index b13e8af097707c50d8f2447fe7c0e9e51e5c7037..d24023fb9eb3fa9266b3611d0ad16eb299101f27 100755 (executable)
@@ -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