-# $OpenBSD: Makefile.inc,v 1.30 2023/03/12 11:55:34 job Exp $
+# $OpenBSD: Makefile.inc,v 1.31 2023/04/18 19:41:50 bluhm Exp $
.PATH: ${.CURDIR}/../../../../usr.sbin/rpki-client
LDADD+= -lcrypto -lutil
DPADD+= ${LIBCRYPTO} ${LIBUTIL}
+CLEANFILES+= *.out *.err *.txt
+
SRCS_test-ip += test-ip.c ip.c io.c encoding.c print.c x509.c \
log.c validate.c as.c cert.c cms.c crl.c mft.c
run-regress-test-ip: test-ip
./test-rrdp -S 8fe05c2e-047d-49e7-8398-cd4250a572b1 -N 50500 \
-n < ${.CURDIR}/../rrdp/notification.xml 2>&1 | tee rrdp-r2.out
cmp ${.CURDIR}/../rrdp/rrdp-r2.out rrdp-r2.out
-
+
./test-rrdp -S 9b3f7e31-4979-4f8c-9818-73e4dadc3e6b -N 13755 \
-H 75416a54d1bb47f4f4dec7696bd33f77aa3a4a09a295b7f1a027841af0b50c1b \
-d < ${.CURDIR}/../rrdp/delta.xml 2>&1 | tee rrdp-r3.out
-# $OpenBSD: Makefile,v 1.8 2023/01/04 14:27:00 claudio Exp $
+# $OpenBSD: Makefile,v 1.9 2023/04/18 19:41:50 bluhm Exp $
-PROGS += test-http
+PROGS += test-http
-SRCS_test-http= test-http.c http.c io.c encoding.c
-LDADD_test-http+= -ltls -lssl -lcrypto -lutil
-DPADD_test-http+= ${LIBTLS} ${LIBSSL} ${LIBCRYPTO} ${LIBUTIL}
+SRCS_test-http = test-http.c http.c io.c encoding.c
+LDADD_test-http = -ltls -lssl -lcrypto -lutil
+DPADD_test-http = ${LIBTLS} ${LIBSSL} ${LIBCRYPTO} ${LIBUTIL}
SERVER = jigsaw.w3.org
-REACHABLE =
-.if make(run-regress-test-http)
-REACHABLE != ! ping -n -c 1 -w 1 ${SERVER} >/dev/null || echo yes
+.if ! (make(clean) || make(cleandir) || make(obj))
+REACHABLE !?= ! ping -n -c 1 -w 1 ${SERVER} >/dev/null || echo yes
+.MAKEFLAGS := REACHABLE=${REACHABLE}
.endif
run-regress-test-http: test-http
-.if ${REACHABLE:L} == "yes"
+.if "${REACHABLE:L}" == "yes"
./test-http https://${SERVER}/HTTP/TE/foo.txt foo.txt
./test-http https://${SERVER}/HTTP/ChunkedScript chunk.out
./test-http https://${SERVER}/HTTP/300/307.html redir.out
REGRESS_TARGETS+= run-regress-test-http-redirectchain
run-regress-test-http-redirectchain: test-http
- ./test-http 'https://demo.cyotek.com/features/redirectchaintest.php?index=1' redirloop.out 2>&1 | grep -q 'Too many redirections requested'
+.if "${REACHABLE:L}" == "yes"
+ ./test-http \
+ 'https://demo.cyotek.com/features/redirectchaintest.php?index=1' \
+ redirloop.out 2>&1 | tee redirloop.err
+ grep -q 'Too many redirections requested' redirloop.err
+.else
+ # server ${SERVER} not reachable
+ @echo SKIPPED
+.endif
.PATH: ${.CURDIR}/..