1 # tests to run as a port of the regression suite. Leave empty to run
5 include ../Makefile.local
7 .PHONY: all data clean runtime
9 all: data gg puny-test fcgi-test
14 data: testdata iri_test cert.pem testca.pem valid.crt invalid.cert.pem
16 gg: gg.o ../iri.o ../utf8.o ${COMPAT}
17 ${CC} gg.o ../iri.o ../utf8.o ${COMPAT} -o $@ ${LDFLAGS}
19 puny-test: puny-test.o ../puny.o ../utf8.o ../utils.o ../log.o ${COMPAT}
20 ${CC} puny-test.o ../puny.o ../utf8.o ../utils.o ../log.o ${COMPAT} \
21 -o puny-test ${LDFLAGS}
23 iri_test: iri_test.o ../iri.o ../utf8.o ${COMPAT}
24 ${CC} iri_test.o ../iri.o ../utf8.o ${COMPAT} -o $@ ${LDFLAGS}
26 fill-file: fill-file.o
27 ${CC} fill-file.o -o $@ ${LDFLAGS}
29 fcgi-test: fcgi-test.o
30 ${CC} fcgi-test.o ${COMPAT} -o fcgi-test ${LDFLAGS}
34 # XXX: key size is NOT GOOD. This is only for testing. Smaller keys
35 # are quicker to generate. DON'T DO THIS AT HOME.
37 openssl req -x509 -newkey rsa:2048 \
42 ln -s cert.pem localhost.cert.pem
43 ln -s key.pem localhost.key.pem
47 openssl genrsa -out testca.key 2048
48 openssl req -x509 -new -sha256 \
56 openssl genrsa -out valid.key 2048
57 openssl req -new -key valid.key \
61 openssl x509 -req -in valid.csr \
67 -sha256 -extfile valid.ext
69 invalid.cert.pem: cert.pem
70 cp cert.pem invalid.cert.pem
71 cp key.pem invalid.key.pem
74 rm -f *.o iri_test cert.pem key.pem
75 rm -f localhost.cert.pem localhost.key.pem
76 rm -f testca.* valid.csr valid.key valid.crt invalid.*pem
77 rm -rf testdata fill-file puny-test gg fcgi-test
82 ./fill-file testdata/bigfile
83 ./sha testdata/bigfile testdata/bigfile.sha
84 printf "# hello world\n" > testdata/index.gmi
85 ./sha testdata/index.gmi testdata/index.gmi.sha
86 cp hello slow err invalid serve-bigfile env testdata/
87 cp max-length-reply testdata
90 cp testdata/index.gmi testdata/dir/foo.gmi