Added more EAP tests
[freeradius.git] / src / tests / Makefile
1 include ../../Make.inc
2
3 TESTS   = user_password chap mschapv1 digest-auth-MD5 digest-auth-int \
4         digest-auth-noalgo digest-md5-sess digest-auth-MD5_Sess \
5         digest-auth_int-MD5 digest-auth_int-MD5_Sess digest-auth_int-noalgo \
6         example.com stripped.example.com
7
8 EAPOL_TEST = eapol_test
9
10 EAP_TLS_TESTS = eap-ttls-pap.conf eap-ttls-mschapv2.conf peap-mschapv2.conf
11
12 SECRET  = testing123
13
14 .PHONY: all eap
15
16 #
17 #       Build the directory for testing the server
18 #
19 all: tests
20
21 #
22 #  Copy all of the files in a portable way
23 #
24 #  Then, over-write the radiusd.conf && dictionary files with
25 #  entries that point to this directory, and to the modules in
26 #  the local build directory.
27 #
28 raddb/.raddb:
29         rm -rf raddb
30         @(cd ../..; tar -cf - raddb) | tar -xf -
31         @echo '$$INCLUDE ' $(top_builddir)/src/tests/dictionary.test > raddb/dictionary
32         @echo '$$INCLUDE ' $(top_builddir)/share/dictionary >> raddb/dictionary
33         @echo "raddbdir = " $(top_builddir)/src/tests/raddb > raddb/radiusd.conf
34         @echo "libdir = " $(top_builddir)/src/modules/lib >> raddb/radiusd.conf
35         @echo '$$INCLUDE ' $(top_builddir)/raddb/radiusd.conf >> raddb/radiusd.conf
36         @cp proxy.conf raddb
37         @touch raddb/.raddb
38
39 tests: raddb/.raddb
40         @chmod a+x runtests.sh
41         ./runtests.sh $(TESTS)
42
43 eap: $(EAP_TLS_TESTS)
44         $(EAPOL_TEST) -c eap-ttls-pap.conf -s $(SECRET) 
45         $(EAPOL_TEST) -c peap-mschapv2.conf -s $(SECRET)
46         $(EAPOL_TEST) -c eap-ttls-mschapv2.conf -s $(SECRET)