1 # tests to run as a port of the regression suite. Leave empty to run
5 include ../Makefile.local
7 .PHONY: all data clean regres
9 all: data puny-test iri_test fcgi-test
12 data: testdata cert.pem testca.pem valid.crt invalid.cert.pem
14 puny-test: puny-test.o ../puny.o ../utf8.o ../utils.o ../log.o ${COMPAT}
15 ${CC} puny-test.o ../puny.o ../utf8.o ../utils.o ../log.o ${COMPAT} \
16 -o puny-test ${LDFLAGS}
18 iri_test: iri_test.o ../iri.o ../utf8.o ${COMPAT}
19 ${CC} iri_test.o ../iri.o ../utf8.o ${COMPAT} -o $@ ${LDFLAGS}
21 fill-file: fill-file.o
22 ${CC} fill-file.o -o $@ ${LDFLAGS}
24 fcgi-test: fcgi-test.o
25 ${CC} fcgi-test.o ${COMPAT} -o fcgi-test ${LDFLAGS}
29 # XXX: key size is NOT GOOD. This is only for testing. Smaller keys
30 # are quicker to generate. DON'T DO THIS AT HOME.
32 openssl req -x509 -newkey rsa:2048 \
37 ln -s cert.pem localhost.cert.pem
38 ln -s key.pem localhost.key.pem
42 openssl genrsa -out testca.key 2048
43 openssl req -x509 -new -sha256 \
51 openssl genrsa -out valid.key 2048
52 openssl req -new -key valid.key \
56 openssl x509 -req -in valid.csr \
62 -sha256 -extfile valid.ext
64 invalid.cert.pem: cert.pem
65 cp cert.pem invalid.cert.pem
66 cp key.pem invalid.key.pem
69 rm -f *.o iri_test cert.pem key.pem
70 rm -f localhost.cert.pem localhost.key.pem
71 rm -f testca.* valid.csr valid.key valid.crt invalid.*pem
72 rm -rf testdata fill-file puny-test fcgi-test
77 ./fill-file testdata/bigfile
78 ./sha testdata/bigfile testdata/bigfile.sha
79 printf "# hello world\n" > testdata/index.gmi
80 ./sha testdata/index.gmi testdata/index.gmi.sha
81 cp hello slow err invalid serve-bigfile env testdata/
82 cp max-length-reply testdata
85 cp testdata/index.gmi testdata/dir/foo.gmi