Run RPC tests with one invocation of DejaGnu rather than two
authorKen Raeburn <raeburn@mit.edu>
Sat, 1 Jul 2000 04:52:51 +0000 (04:52 +0000)
committerKen Raeburn <raeburn@mit.edu>
Sat, 1 Jul 2000 04:52:51 +0000 (04:52 +0000)
* Makefile.in (unit-test-body): Combine -tcp and -udp versions, setting PASS
instead of PROT.
* configure.in: Set and substitute PASS instead of UDP_TEST.
* config/unix.exp: Don't invoke rpc_test_start.  Set MULTIPASS, including a
setting for PROT and a dummy to trigger rpc_test_start invocation.
(rpc_test_start): If a server has already been started, call rpc_test_exit to
verify that it's still running.

git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@12503 dc483132-0cff-0310-8789-dd5450dbe970

src/lib/rpc/unit-test/ChangeLog
src/lib/rpc/unit-test/Makefile.in
src/lib/rpc/unit-test/config/unix.exp
src/lib/rpc/unit-test/configure.in

index a4b859b08af35e1dd1795d6b487b06f3ee0bbb81..bd91605d79471557763c02a15e5ffbbaad147faf 100644 (file)
@@ -1,3 +1,14 @@
+2000-07-01  Ken Raeburn  <raeburn@mit.edu>
+
+       * Makefile.in (unit-test-body): Combine -tcp and -udp versions,
+       setting PASS instead of PROT.
+       * configure.in: Set and substitute PASS instead of UDP_TEST.
+       * config/unix.exp: Don't invoke rpc_test_start.  Set MULTIPASS,
+       including a setting for PROT and a dummy to trigger rpc_test_start
+       invocation.
+       (rpc_test_start): If a server has already been started, call
+       rpc_test_exit to verify that it's still running.
+
 2000-06-30  Tom Yu  <tlyu@mit.edu>
 
        * server.c: Include gssrpc/pmap_clnt.h in order to get renaming of
index 7e2651cf575200b94988ba447c7b897b4907e3af..df937cd1b26c69bb43f6e939b3c6a40088f89879 100644 (file)
@@ -44,21 +44,13 @@ unit-test-:
 
 unit-test-ok:: unit-test-setup unit-test-body unit-test-cleanup
 
-unit-test-body:: unit-test-body-tcp @UDP_TEST@
-
-unit-test-body-tcp:
-       RPC_TEST_SRVTAB=/tmp/rpc_test_v5srvtab $(ENV_SETUP) \
-               $(RUNTEST) SERVER=./server CLIENT=./client \
-               KINIT=$(BUILDTOP)/clients/kinit/kinit \
-               KDESTROY=$(BUILDTOP)/clients/kdestroy/kdestroy \
-               PROT=-t --tool rpc_test $(RUNTESTFLAGS)
-
-unit-test-body-udp:
+PASS=@PASS@
+unit-test-body:
        RPC_TEST_SRVTAB=/tmp/rpc_test_v5srvtab $(ENV_SETUP) \
                $(RUNTEST) SERVER=./server CLIENT=./client \
                KINIT=$(BUILDTOP)/clients/kinit/kinit \
                KDESTROY=$(BUILDTOP)/clients/kdestroy/kdestroy \
-               PROT=-u --tool rpc_test $(RUNTESTFLAGS)
+               PASS="$(PASS)" --tool rpc_test $(RUNTESTFLAGS)
 
 unit-test-setup::
        $(ENV_SETUP) $(START_SERVERS)
index fe6dd036b83694c59e41b0f0a0e3ecb91f19eadf..c880a6f55bfd95bf54817671343e698bd6127c04 100644 (file)
@@ -52,6 +52,8 @@ proc rpc_test_start { } {
        global server_started
        global env
 
+       if [info exists server_pid] { rpc_test_exit }
+
        set env(KRB5_KTNAME) FILE:$env(RPC_TEST_SRVTAB)
 
        verbose "% $SERVER" 1
@@ -76,4 +78,7 @@ proc rpc_test_start { } {
 
 }
 
-rpc_test_start
+set MULTIPASS {
+    {tcp PROT=-t dummy=[rpc_test_start]}
+    {udp PROT=-u dummy=[rpc_test_start]}
+}
index 70dec1213ffcaa7dc4c9bee5139b2d39b4c3f98f..f8ecf3541d4a5903aa274b61b633ffa2132618ec 100644 (file)
@@ -13,14 +13,14 @@ AC_SUBST(DO_TEST)
 changequote(<<, >>)
 case "$host" in
 *-*-solaris2.[012345]*)
-       UDP_TEST=
+       PASS=tcp
        ;;
 *)
-       UDP_TEST=unit-test-body-udp
+       PASS="tcp udp"
        ;;
 esac
 changequote([, ])
-AC_SUBST(UDP_TEST)
+AC_SUBST(PASS)
 dnl
 CHECK_SIGNALS
 KRB5_BUILD_PROGRAM