e05ae53f4511e4037dde8aee31a4e97551a2a3a2
[openafs.git] / src / kauth / test / Makefile.in
1 # Copyright 2000, International Business Machines Corporation and others.
2 # All Rights Reserved.
3
4 # This software has been released under the terms of the IBM Public
5 # License.  For details, see the LICENSE file in the top-level source
6 # directory or online at http://www.openafs.org/dl/license10.html
7
8 DESTDIR=@DESTDIR@
9 SRCDIR=@SRCDIR@
10 TOP_SRCDIR=@TOP_SRCDIR@
11 SYS_NAME=@AFS_SYSNAME@
12
13
14
15 BACKDIR=../../../../PARENT/dest/
16 OPTIMIZE=-O
17
18 INCDIRS= -I${DESTDIR}/include -I.. -I${BACKDIR}/include
19 LDIRS= -L${DESTDIR}/lib -L${DESTDIR}/lib/afs -L.. -L${BACKDIR}/lib -L${BACKDIR}/lib/afs
20 LIBS= -llwp -ldes -lrxkad -lauth -lcmd -lubik -lprot -lsys -lrx -lcom_err -lkauth
21
22 CFLAGS = ${OPTIMIZE} ${INCDIRS} ${LDIRS} ${LIBS} ${XCFLAGS}
23
24
25 # the only tests _known_ to work are multiklog and the tcl scripts.
26
27 all test tests: multiklog 
28
29 install:
30 dest:
31
32 clean:
33         $(RM) -f *.o core
34
35 multiklog: multiklog.o
36         cc -o  multiklog ${CFLAGS} multiklog.o -lafsutil
37
38 test_date: ../kautils.o test_date.o ${utilib}
39         cc -o test_date ${CFLAGS} test_date.o ../kautils.o -lafsutil
40
41 test_badtix: test_badtix.o
42         cc -o test_badtix ${CFLAGS} test_badtix.o
43
44 decode_ticket: decode_ticket.o
45         cc -o decode_ticket ${CFLAGS} decode_ticket.o 
46
47 test_interim_ktc: test_interim_ktc.o
48         cc -o test_interim_ktc ${CFLAGS} test_interim_ktc.o
49
50 test_rxkad_free: test_rxkad_free.o 
51         cc -o test_rxkad_free  ${CFLAGS} test_rxkad_free.o 
52
53 test_getticket: test_getticket.o 
54         cc -o test_getticket  ${CFLAGS} test_getticket.o 
55
56 background: background.c
57         cc -o background background.c
58
59 # test_interim_ktc depends on normally running ka & pr servers.  Also on
60 # the current user having write access to the working directory.  Also
61 # on the user "tester" being defined with ViceId=1031.  The password
62 # must be specified on the make line the others can be overridden by
63 # specifying a value for TESTERVALUES.  To test remote authentication, a
64 # test account in another cell must be available.  The default is the
65 # cell "cellname" and the user tester with Vice Id 510, and the
66 # same password as in the local cell.  These can be over-ridden by
67 # specifying a difference value for REMOTETESTER.  An empty value for
68 # REMOTETESTER will disable testing of remote authentication.
69
70 TESTERNAME=xxx
71 TESTERPASSWORD=xxx
72 #TESTERVALUES=-tester tester -testId 1031
73 TESTERVALUES=
74 REMOTEPASSWORD=${TESTERPASSWORD}
75 REMOTETESTER=-remoteTester $(TESTERNAME) -remoteTestPassword ${REMOTEPASSWORD} -remoteTestId 510 -remoteCell cellname
76
77 # test_kaserver starts a server in the background and tests it.
78
79 # test_rxkad_free checks for rxkad object/connection usage and checks for
80 #   core leaks.  Normally it makes 100 calls to the kaserver, doing a GetEntry
81 #   call.  This requests an admin ticket 100 times and creates a ubik
82 #   connection 100 times.  With the -doauth switch specified it calls
83 #   ka_UserAuthenticate instead, which uses rxnull connections, but also
84 #   exercises the ptserver code, particularly, pr_Initialize, 100 times.
85
86 runtest: background multiklog test_badtix test_interim_ktc test_rxkad_free
87         test_interim_ktc ${TESTERVALUES} -testPassword ${TESTERPASSWORD} ${REMOTETESTER}
88         test_kaserver
89         test_rxkad_free -waitforreap -a $(TESTERNAME) -p $(TESTERPASSWORD)
90         test_rxkad_free -doauth -waitforreap -a $(TESTERNAME) -p $(TESTERPASSWORD)