Makefile revision 1.7
1# $OpenBSD: Makefile,v 1.7 2022/10/14 17:17:13 tb Exp $
2
3PROGS += test-http
4
5SRCS_test-http=   test-http.c http.c io.c encoding.c
6LDADD_test-http+= -ltls -lssl -lcrypto -lutil
7DPADD_test-http+= ${LIBTLS} ${LIBSSL} ${LIBCRYPTO} ${LIBUTIL}
8
9SERVER =	jigsaw.w3.org
10REACHABLE =
11.if make(run-regress-test-http)
12REACHABLE !=	! ping -n -c 1 -w 1 ${SERVER} >/dev/null || echo yes
13.endif
14
15run-regress-test-http: test-http
16.if ${REACHABLE:L} == "yes"
17	./test-http https://${SERVER}/HTTP/TE/foo.txt foo.txt
18	./test-http https://${SERVER}/HTTP/ChunkedScript chunk.out
19	./test-http https://${SERVER}/HTTP/300/307.html redir.out
20	sha256 -c ${.CURDIR}/test-http.sum
21.else
22	# server ${SERVER} not reachable
23	@echo SKIPPED
24.endif
25
26REGRESS_TARGETS+=		run-regress-test-http-redirectchain
27REGRESS_EXPECTED_FAILURES+=	run-regress-test-http-redirectchain
28run-regress-test-http-redirectchain: test-http
29	./test-http 'https://demo.cyotek.com/features/redirectchaintest.php?index=1' redirloop.out 2>&1 | grep -q 'Too many redirections requested'
30
31.PATH: ${.CURDIR}/..
32
33.include <bsd.regress.mk>
34