Makefile revision 1.11
1# $OpenBSD: Makefile,v 1.11 2024/03/12 16:03:56 job 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 -./test-http https://tinyurl.com/bd27n56t /dev/zero 21 sha256 -c ${.CURDIR}/test-http.sum 22.else 23 # server ${SERVER} not reachable 24 @echo SKIPPED 25.endif 26 27REGRESS_TARGETS+= run-regress-test-http-redirectchain 28run-regress-test-http-redirectchain: test-http 29.if "${REACHABLE:L}" == "yes" 30 ./test-http \ 31 'https://demo.cyotek.com/features/redirectchaintest.php?index=1' \ 32 redirloop.out 2>&1 | tee redirloop.err 33 grep -q 'Too many redirections requested' redirloop.err 34.else 35 # server ${SERVER} not reachable 36 @echo SKIPPED 37.endif 38 39.PATH: ${.CURDIR}/.. 40 41.include <bsd.regress.mk> 42