build-system-specific-makefile-configuration-from-configure-20011031
[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 srcdir=@srcdir@
9 include @TOP_OBJDIR@/src/config/Makefile.config
10
11 INCDIRS= -I${DESTDIR}/include -I..
12 LDIRS= -L${DESTDIR}/lib -L${DESTDIR}/lib/afs -L..
13 LIBS= -llwp -ldes -lrxkad -lauth -lcmd -lubik -lprot -lsys -lrx -lcom_err -lkauth
14
15 CFLAGS = ${OPTIMIZE} ${INCDIRS} ${LDIRS} ${LIBS} ${XCFLAGS}
16
17
18 # the only tests _known_ to work are multiklog and the tcl scripts.
19
20 all test tests: multiklog 
21
22 install:
23 dest:
24
25 clean:
26         $(RM) -f *.o core
27
28 multiklog: multiklog.o
29         cc -o  multiklog ${CFLAGS} multiklog.o -lafsutil
30
31 test_date: ../kautils.o test_date.o ${utilib}
32         cc -o test_date ${CFLAGS} test_date.o ../kautils.o -lafsutil
33
34 test_badtix: test_badtix.o
35         cc -o test_badtix ${CFLAGS} test_badtix.o
36
37 decode_ticket: decode_ticket.o
38         cc -o decode_ticket ${CFLAGS} decode_ticket.o 
39
40 test_interim_ktc: test_interim_ktc.o
41         cc -o test_interim_ktc ${CFLAGS} test_interim_ktc.o
42
43 test_rxkad_free: test_rxkad_free.o 
44         cc -o test_rxkad_free  ${CFLAGS} test_rxkad_free.o 
45
46 test_getticket: test_getticket.o 
47         cc -o test_getticket  ${CFLAGS} test_getticket.o 
48
49 background: background.c
50         cc -o background background.c
51
52 # test_interim_ktc depends on normally running ka & pr servers.  Also on
53 # the current user having write access to the working directory.  Also
54 # on the user "tester" being defined with ViceId=1031.  The password
55 # must be specified on the make line the others can be overridden by
56 # specifying a value for TESTERVALUES.  To test remote authentication, a
57 # test account in another cell must be available.  The default is the
58 # cell "cellname" and the user tester with Vice Id 510, and the
59 # same password as in the local cell.  These can be over-ridden by
60 # specifying a difference value for REMOTETESTER.  An empty value for
61 # REMOTETESTER will disable testing of remote authentication.
62
63 TESTERNAME=xxx
64 TESTERPASSWORD=xxx
65 #TESTERVALUES=-tester tester -testId 1031
66 TESTERVALUES=
67 REMOTEPASSWORD=${TESTERPASSWORD}
68 REMOTETESTER=-remoteTester $(TESTERNAME) -remoteTestPassword ${REMOTEPASSWORD} -remoteTestId 510 -remoteCell cellname
69
70 # test_kaserver starts a server in the background and tests it.
71
72 # test_rxkad_free checks for rxkad object/connection usage and checks for
73 #   core leaks.  Normally it makes 100 calls to the kaserver, doing a GetEntry
74 #   call.  This requests an admin ticket 100 times and creates a ubik
75 #   connection 100 times.  With the -doauth switch specified it calls
76 #   ka_UserAuthenticate instead, which uses rxnull connections, but also
77 #   exercises the ptserver code, particularly, pr_Initialize, 100 times.
78
79 runtest: background multiklog test_badtix test_interim_ktc test_rxkad_free
80         test_interim_ktc ${TESTERVALUES} -testPassword ${TESTERPASSWORD} ${REMOTETESTER}
81         test_kaserver
82         test_rxkad_free -waitforreap -a $(TESTERNAME) -p $(TESTERPASSWORD)
83         test_rxkad_free -doauth -waitforreap -a $(TESTERNAME) -p $(TESTERPASSWORD)