From e36d99743a720973f0e4168e3d40796ad03152f5 Mon Sep 17 00:00:00 2001 From: Barry Jaspan Date: Fri, 20 Sep 1996 20:52:57 +0000 Subject: [PATCH] add unit-test directory to standard build system git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@9096 dc483132-0cff-0310-8789-dd5450dbe970 --- src/lib/kadm5/unit-test/ChangeLog | 4 + src/lib/kadm5/unit-test/Makefile.in | 126 +++++++++++++++++++++++++++ src/lib/kadm5/unit-test/configure.in | 14 +++ 3 files changed, 144 insertions(+) create mode 100644 src/lib/kadm5/unit-test/Makefile.in create mode 100644 src/lib/kadm5/unit-test/configure.in diff --git a/src/lib/kadm5/unit-test/ChangeLog b/src/lib/kadm5/unit-test/ChangeLog index d5eefcb4b..1e58383c1 100644 --- a/src/lib/kadm5/unit-test/ChangeLog +++ b/src/lib/kadm5/unit-test/ChangeLog @@ -1,3 +1,7 @@ +Fri Sep 20 16:51:26 1996 Barry Jaspan + + * created Makefile.in and configure.in + Wed Sep 11 17:03:22 1996 Barry Jaspan * api.2/init-v2.exp: make test100 only run on client diff --git a/src/lib/kadm5/unit-test/Makefile.in b/src/lib/kadm5/unit-test/Makefile.in new file mode 100644 index 000000000..3544beea7 --- /dev/null +++ b/src/lib/kadm5/unit-test/Makefile.in @@ -0,0 +1,126 @@ +CFLAGS = $(CCOPTS) $(DEFS) $(LOCALINCLUDE) -DUSE_KADM5_API_VERSION=1 + +all:: init-test destroy-test client-handle-test client-iter-test +all:: randkey-test server-handle-test lock-test server-iter-test sizes-test + +# +# The client-side test programs. +# + +init-test: init-test.o client_init.o $(CLNTDEPLIPS) + $(LD) $(LDFLAGS) $(LDARGS) -o init-test init-test.o client_init.o \ + $(CLNTLIBS) + +client_init.o: $(SRCTOP)/lib/kadm5/clnt/client_init.c + $(CC) $(CFLAGS) -DUSE_KADM5_API_VERSION=2 -DINIT_TEST -c -I$(SRCTOP)/lib/kadm5 $< + +destroy-test: destroy-test.o $(CLNTDEPLIBS) + $(LD) $(LDFLAGS) $(LDARGS) -o destroy-test destroy-test.o $(CLNTLIBS) + +client-handle-test: handle-test.o $(CLNTDEPLIBS) + $(LD) $(LDFLAGS) $(LDARGS) -o client-handle-test handle-test.o \ + $(CLNTLIBS) + +client-iter-test: iter-test.o $(CLNTDEPLIBS) + $(LD) $(LDFLAGS) $(LDARGS) -o client-iter-test iter-test.o \ + $(CLNTLIBS) + +# +# The server-side test programs. +# + +randkey-test: randkey-test.o $(SRVDEPLIBS) + $(LD) $(LDFLAGS) $(LDARGS) -o randkey-test randkey-test.o $(SRVLIBS) + +server-handle-test: handle-test.o $(SRVDEPLIBS) + $(LD) $(LDFLAGS) $(LDARGS) -o server-handle-test handle-test.o \ + $(SRVLIBS) + +lock-test: lock-test.o $(SRVDEPLIBS) + $(LD) $(LDFLAGS) $(LDARGS) -o lock-test lock-test.o $(SRVLIBS) + +server-iter-test: iter-test.o $(SRVDEPLIBS) + $(LD) $(LDFLAGS) $(LDARGS) -o server-iter-test iter-test.o $(SRVLIBS) + +sizes-test: sizes-test.o $(SRVDEPLIBS) + $(LD) $(LDFLAGS) $(LDARGS) -o sizes-test sizes-test.o $(SRVLIBS) + +# +# The unit-test targets +# + +check unit-test:: unit-test-client unit-test-server + +unit-test-client: unit-test-client-setup unit-test-client-body \ + unit-test-client-cleanup + +unit-test-server: unit-test-server-setup unit-test-server-body \ + unit-test-server-cleanup + +test-randkey:: randkey-test + $(ENV_SETUP) ./randkey-test + +test-handle-server:: server-handle-test + $(ENV_SETUP) ./server-handle-test + +test-handle-client:: client-handle-test + $(ENV_SETUP) ./client-handle-test + +test-noauth: init-test + $(ENV_SETUP) ./init-test + +test-destroy: destroy-test + $(ENV_SETUP) ./destroy-test + +test-sizes: sizes-test + $(ENV_SETUP) ./sizes-test + +unit-test-client-setup:: + $(ENV_SETUP) $(START_SERVERS) + +unit-test-client-cleanup:: + $(ENV_SETUP) $(STOP_SERVERS) + +unit-test-server-setup:: + $(ENV_SETUP) $(START_SERVERS_LOCAL) + +unit-test-server-cleanup:: + $(ENV_SETUP) $(STOP_SERVERS_LOCAL) + +capi.0: api.0 + -rm -f capi.0 + ln -s api.0 capi.0 + +capi.2: api.2 + -rm -f capi.2 + ln -s api.2 capi.2 + +unit-test-client-body: capi.0 capi.2 site.exp test-noauth test-destroy test-handle-client test-sizes + $(ENV_SETUP) $(RUNTEST) --tool capi API=$(CLNTTCL) KINIT=$(BUILDTOP)/clients/kinit/kinit KDESTROY=$(BUILDTOP)/clients/kdestroy/kdestroy KADMIN_LOCAL=$(BUILDTOP)/kadmin/cli/kadmin.local RPC=1 + +sapi.0: api.0 + -rm -f sapi.0 + ln -s api.0 sapi.0 + +sapi.1: api.1 + -rm -f sapi.1 + ln -s api.1 sapi.1 + +sapi.2: api.2 + -rm -f sapi.2 + ln -s api.2 sapi.2 + +unit-test-server-body: sapi.0 sapi.1 sapi.2 site.exp randkey-test test-handle-server lock-test test-sizes + $(ENV_SETUP) $(RUNTEST) --tool sapi API=$(SRVTCL) LOCKTEST=./lock-test KADMIN_LOCAL=$(BUILDTOP)/kadmin/cli/kadmin.local RPC=0 + +clean:: + $(RM) init-test client_init.o init-test.o + $(RM) destroy-test destroy-test.o + $(RM) client-handle-test handle-test.o + $(RM) client-iter-test iter-test.o + $(RM) randkey-test randkey-test.o + $(RM) server-handle-test handle-test.o + $(RM) lock-test lock-test.o + $(RM) server-iter-test iter-test.o + $(RM) sizes-test sizes-test.o + $(RM) *.log *.plog *.sum *.psum unit-test-log.* diff --git a/src/lib/kadm5/unit-test/configure.in b/src/lib/kadm5/unit-test/configure.in new file mode 100644 index 000000000..ce06b6506 --- /dev/null +++ b/src/lib/kadm5/unit-test/configure.in @@ -0,0 +1,14 @@ +AC_INIT(init-test.c) +WITH_CCOPTS +CONFIG_RULES +KRB_INCLUDE +USE_KADMCLNT_LIBRARY +USE_GSSAPI_LIBRARY +USE_KADMSRV_LIBRARY +USE_GSSRPC_LIBRARY +USE_DYN_LIBRARY +USE_KDB5_LIBRARY +USE_SS_LIBRARY +V5_USE_SHARED_LIB +KRB5_LIBRARIES +V5_AC_OUTPUT_MAKEFILE -- 2.26.2