Blame


1 3096da4e 2021-10-07 op # tests to run as a port of the regression suite. Leave empty to run
2 3096da4e 2021-10-07 op # all.
3 3096da4e 2021-10-07 op TESTS=
4 3096da4e 2021-10-07 op
5 80745f04 2023-08-29 op GENCERT_FLAGS=
6 80745f04 2023-08-29 op
7 5a345722 2023-06-23 op # host to bind to during regress
8 5a345722 2023-06-23 op REGRESS_HOST = localhost
9 5a345722 2023-06-23 op
10 4b93be28 2022-10-31 op DISTFILES = Makefile \
11 4b93be28 2022-10-31 op env \
12 4b93be28 2022-10-31 op err \
13 4b93be28 2022-10-31 op example.mime.types \
14 4b93be28 2022-10-31 op fcgi-test.c \
15 4b93be28 2022-10-31 op fill-file.c \
16 4b93be28 2022-10-31 op hello \
17 4b93be28 2022-10-31 op invalid \
18 4b93be28 2022-10-31 op iri_test.c \
19 4b93be28 2022-10-31 op lib.sh \
20 4b93be28 2022-10-31 op max-length-reply \
21 4b93be28 2022-10-31 op puny-test.c \
22 4b93be28 2022-10-31 op regress \
23 4b93be28 2022-10-31 op serve-bigfile \
24 4b93be28 2022-10-31 op slow \
25 4b93be28 2022-10-31 op tests.sh \
26 4b93be28 2022-10-31 op valid.ext
27 4b93be28 2022-10-31 op
28 1610f954 2023-06-13 op include ../config.mk
29 5c2e310e 2021-01-22 op
30 1610f954 2023-06-13 op COBJS = ${COMPATS:.c=.o}
31 1610f954 2023-06-13 op REG_COMPATS = ${COBJS:%=../%}
32 96e3c013 2022-07-04 op
33 1610f954 2023-06-13 op PUNY_SRCS = puny-test.c ../puny.c ../utf8.c ../utils.c ../log.c
34 1610f954 2023-06-13 op PUNY_OBJS = ${PUNY_SRCS:.c=.o} ${REG_COMPATS}
35 1610f954 2023-06-13 op
36 f9ab77a8 2023-08-23 op IRI_SRCS = iri_test.c ../iri.c ../utf8.c ../log.c
37 1610f954 2023-06-13 op IRI_OBJS = ${IRI_SRCS:.c=.o} ${REG_COMPATS}
38 1610f954 2023-06-13 op
39 4b93be28 2022-10-31 op .PHONY: all data clean dist
40 5c2e310e 2021-01-22 op
41 a62c63f2 2021-12-29 op all: data puny-test iri_test fcgi-test
42 5a345722 2023-06-23 op env REGRESS_HOST="${REGRESS_HOST}" ./regress ${TESTS}
43 5c2e310e 2021-01-22 op
44 80745f04 2023-08-29 op data: testdata localhost.pem testca.pem valid.crt invalid.pem
45 0f2124e2 2021-06-12 op
46 1610f954 2023-06-13 op puny-test: ${PUNY_OBJS}
47 1610f954 2023-06-13 op ${CC} ${PUNY_OBJS} -o puny-test ${LIBS} ${LDFLAGS}
48 3300cbe0 2021-01-27 op
49 1610f954 2023-06-13 op iri_test: ${IRI_OBJS}
50 1610f954 2023-06-13 op ${CC} ${IRI_OBJS} -o $@ ${LIBS} ${LDFLAGS}
51 5c2e310e 2021-01-22 op
52 609fc9f9 2021-01-22 op fill-file: fill-file.o
53 1610f954 2023-06-13 op ${CC} fill-file.o -o $@ ${LIBS} ${LDFLAGS}
54 609fc9f9 2021-01-22 op
55 0f2124e2 2021-06-12 op fcgi-test: fcgi-test.o
56 f9ab77a8 2023-08-23 op ${CC} fcgi-test.o ../log.o ${REG_COMPATS} -o fcgi-test ${LIBS} ${LDFLAGS}
57 0f2124e2 2021-06-12 op
58 80745f04 2023-08-29 op localhost.key: localhost.pem
59 5c2e310e 2021-01-22 op
60 80745f04 2023-08-29 op localhost.pem:
61 80745f04 2023-08-29 op ./../contrib/gencert ${GENCERT_FLAGS} localhost >/dev/null
62 5c2e310e 2021-01-22 op
63 02be96c6 2021-02-09 op testca.pem:
64 02be96c6 2021-02-09 op openssl genrsa -out testca.key 2048
65 7322a054 2021-07-03 op openssl req -x509 -new -sha256 \
66 7322a054 2021-07-03 op -key testca.key \
67 7322a054 2021-07-03 op -days 365 -nodes \
68 7322a054 2021-07-03 op -out testca.pem \
69 7322a054 2021-07-03 op -subj "/CN=testca"
70 02be96c6 2021-02-09 op @echo
71 02be96c6 2021-02-09 op
72 02be96c6 2021-02-09 op valid.crt: testca.pem
73 02be96c6 2021-02-09 op openssl genrsa -out valid.key 2048
74 7322a054 2021-07-03 op openssl req -new -key valid.key \
75 7322a054 2021-07-03 op -out valid.csr \
76 7322a054 2021-07-03 op -subj "/CN=valid"
77 02be96c6 2021-02-09 op @echo
78 02be96c6 2021-02-09 op openssl x509 -req -in valid.csr \
79 02be96c6 2021-02-09 op -CA testca.pem \
80 02be96c6 2021-02-09 op -CAkey testca.key \
81 02be96c6 2021-02-09 op -CAcreateserial \
82 02be96c6 2021-02-09 op -out valid.crt \
83 02be96c6 2021-02-09 op -days 365 \
84 02be96c6 2021-02-09 op -sha256 -extfile valid.ext
85 02be96c6 2021-02-09 op
86 80745f04 2023-08-29 op invalid.pem: localhost.pem
87 80745f04 2023-08-29 op cp localhost.pem invalid.pem
88 80745f04 2023-08-29 op cp localhost.key invalid.key
89 02be96c6 2021-02-09 op
90 5c2e310e 2021-01-22 op clean:
91 80745f04 2023-08-29 op rm -f *.o iri_test localhost.pem localhost.key
92 80745f04 2023-08-29 op rm -f localhost.pem localhost.key
93 80745f04 2023-08-29 op rm -f testca.* valid.csr valid.key valid.crt invalid.pem invalid.key
94 a62c63f2 2021-12-29 op rm -rf testdata fill-file puny-test fcgi-test
95 d273c064 2023-06-09 op rm -f gmid.pid fcgi.sock
96 5c2e310e 2021-01-22 op
97 609fc9f9 2021-01-22 op testdata: fill-file
98 5c2e310e 2021-01-22 op mkdir testdata
99 609fc9f9 2021-01-22 op ./fill-file testdata/bigfile
100 5c2e310e 2021-01-22 op printf "# hello world\n" > testdata/index.gmi
101 e3ddf390 2021-02-06 op cp hello slow err invalid serve-bigfile env testdata/
102 c836cdfa 2021-03-29 op cp max-length-reply testdata
103 5c2e310e 2021-01-22 op mkdir testdata/dir
104 475205fa 2022-07-04 op date > 'testdata/dir/current date'
105 c8b74339 2021-01-24 op cp hello testdata/dir
106 5c2e310e 2021-01-22 op cp testdata/index.gmi testdata/dir/foo.gmi
107 fb121226 2022-02-26 op touch testdata/test.m3u8 testdata/foo.1
108 4b93be28 2022-10-31 op
109 4b93be28 2022-10-31 op dist: ${DISTFILES}
110 4b93be28 2022-10-31 op mkdir -p ${DESTDIR}/
111 4b93be28 2022-10-31 op ${INSTALL} -m 0644 ${DISTFILES} ${DESTDIR}/
112 4b93be28 2022-10-31 op cd ${DESTDIR}/ && chmod +x env err hello invalid \
113 611dffe8 2023-06-13 op max-length-reply regress slow