note changes
[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
7 #       example.com stripped.example.com
8
9 EAPOL_TEST = /usr/bin/env eapol_test
10
11 EAP_TLS_TESTS = eap-ttls-pap.conf eap-ttls-mschapv2.conf peap-mschapv2.conf
12
13 SECRET  = testing123
14
15 .PHONY: all eap test.conf dictionary clean
16
17 #
18 #       Build the directory for testing the server
19 #
20 all: tests
21
22 clean:
23         @rm -f ../../raddb/test.conf test.conf dictionary
24
25 test.conf:
26         @echo "# test configuration file.  Do not install.  Delete at any time." > test.conf
27         @echo "libdir =" $(top_builddir)/src/modules/lib >> test.conf
28         @echo "dictionary =" $(top_builddir)/src/tests/ >> test.conf
29         @echo "testdir =" $(top_builddir)/src/tests/ >> test.conf
30         @echo '$$INCLUDE radiusd.conf' >> test.conf
31         @echo '$$INCLUDE $${testdir}/config/' >> test.conf
32         @[ -f ../../raddb/test.conf ] || ln -s ../src/tests/test.conf ../../raddb/
33
34 dictionary:
35         @echo '$$INCLUDE ' $(top_builddir)/share/dictionary > dictionary
36         @echo '$$INCLUDE ' $(top_builddir)/src/tests/dictionary.test >> dictionary
37
38 tests: test.conf dictionary
39         @chmod a+x runtests.sh
40         ./runtests.sh $(TESTS)
41
42 eap: $(EAP_TLS_TESTS)
43         $(EAPOL_TEST) -c eap-ttls-pap.conf -s $(SECRET) 
44         $(EAPOL_TEST) -c peap-mschapv2.conf -s $(SECRET)
45         $(EAPOL_TEST) -c eap-ttls-mschapv2.conf -s $(SECRET)
46
47 md5:
48         $(EAPOL_TEST) -c eap-md5.conf -s $(SECRET) 
49
50 tls:
51         $(EAPOL_TEST) -c eap-ttls-tls.conf -s $(SECRET)
52
53 ttls:
54         $(EAPOL_TEST) -c eap-ttls-pap.conf -s $(SECRET)
55
56 peap:
57         $(EAPOL_TEST) -c peap-mschapv2.conf -s $(SECRET)
58
59 leap:
60         $(EAPOL_TEST) -c leap.conf -s $(SECRET)