Makefile revision 1.10
1# $OpenBSD: Makefile,v 1.10 2023/06/13 11:41:36 claudio 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 -lz 7DPADD_test-http = ${LIBTLS} ${LIBSSL} ${LIBCRYPTO} ${LIBUTIL} ${LIBZ} 8 9SERVER = jigsaw.w3.org 10.if ! (make(clean) || make(cleandir) || make(obj)) 11REACHABLE !?= ! ping -n -c 1 -w 1 ${SERVER} >/dev/null || echo yes 12.MAKEFLAGS := REACHABLE=${REACHABLE} 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 27run-regress-test-http-redirectchain: test-http 28.if "${REACHABLE:L}" == "yes" 29 ./test-http \ 30 'https://demo.cyotek.com/features/redirectchaintest.php?index=1' \ 31 redirloop.out 2>&1 | tee redirloop.err 32 grep -q 'Too many redirections requested' redirloop.err 33.else 34 # server ${SERVER} not reachable 35 @echo SKIPPED 36.endif 37 38.PATH: ${.CURDIR}/.. 39 40.include <bsd.regress.mk> 41