* Makefile.in (unit-test-body): Set RPC_TEST_SRVTAB based on process-id. Set
authorKen Raeburn <raeburn@mit.edu>
Mon, 11 Nov 2002 20:23:43 +0000 (20:23 +0000)
committerKen Raeburn <raeburn@mit.edu>
Mon, 11 Nov 2002 20:23:43 +0000 (20:23 +0000)
trap handler to delete it before returning an exit status.
(unit-test-cleanup): Don't delete files here.

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

src/lib/rpc/unit-test/ChangeLog
src/lib/rpc/unit-test/Makefile.in

index 06504cfbbf3ea80550b317ef8ff16f9828fbb0c2..f5b2759b96b83b471e1ea119408765ae79d74195 100644 (file)
@@ -1,3 +1,10 @@
+2002-11-11  Ken Raeburn  <raeburn@mit.edu>
+
+       * Makefile.in (unit-test-body): Set RPC_TEST_SRVTAB based on
+       process-id.  Set trap handler to delete it before returning an
+       exit status.
+       (unit-test-cleanup): Don't delete files here.
+
 2002-11-07  Tom Yu  <tlyu@mit.edu>
 
        * rpc_test.0/expire.exp (overlap): Add another call to
index 771bce4a989f6faee551034d26a59a429a2ee7b1..f223432b17f903fd90e859629fcab234b921387d 100644 (file)
@@ -46,11 +46,15 @@ unit-test-ok:: unit-test-setup unit-test-body unit-test-cleanup
 
 PASS=@PASS@
 unit-test-body:
-       RPC_TEST_SRVTAB=/tmp/rpc_test_v5srvtab $(ENV_SETUP) \
+       RPC_TEST_SRVTAB=/tmp/rpc_test_v5srvtab.$$$$ ; export RPC_TEST_SRVTAB ; \
+       trap "rm -f $$RPC_TEST_SRVTAB ; exit 1" 0 1 2 3 14 15 ; \
+       if $(ENV_SETUP) \
                $(RUNTEST) SERVER=./server CLIENT=./client \
                KINIT=$(BUILDTOP)/clients/kinit/kinit \
                KDESTROY=$(BUILDTOP)/clients/kdestroy/kdestroy \
-               PASS="$(PASS)" --tool rpc_test $(RUNTESTFLAGS)
+               PASS="$(PASS)" --tool rpc_test $(RUNTESTFLAGS) ; \
+       then rm -f $$RPC_TEST_SRVTAB ; trap 0 ; exit 0 ; \
+       else rm -f $$RPC_TEST_SRVTAB ; exit 1 ; fi
 
 unit-test-setup::
        $(ENV_SETUP) $(START_SERVERS)
@@ -58,7 +62,7 @@ unit-test-setup::
 
 unit-test-cleanup::
        $(ENV_SETUP) $(STOP_SERVERS)
-       -rm -f /tmp/rpc_test_v5srvtab /tmp/krb5cc_rpc_test_fullrun
+#      -rm -f /tmp/rpc_test_v5srvtab /tmp/krb5cc_rpc_test_fullrun
 
 clean::
        $(RM) server client