From 999ec352efbeb24cccd1d584b91a659b15764151 Mon Sep 17 00:00:00 2001 From: bluhm <> Date: Thu, 5 Nov 2020 20:48:05 +0000 Subject: Skip test if web server cannot be pinged. --- src/regress/lib/libcrypto/ocsp/Makefile | 20 ++++++++++++++------ 1 file changed, 14 insertions(+), 6 deletions(-) diff --git a/src/regress/lib/libcrypto/ocsp/Makefile b/src/regress/lib/libcrypto/ocsp/Makefile index 62fb985647..b1b437c916 100644 --- a/src/regress/lib/libcrypto/ocsp/Makefile +++ b/src/regress/lib/libcrypto/ocsp/Makefile @@ -1,6 +1,4 @@ -# $OpenBSD: Makefile,v 1.3 2016/11/05 12:45:25 miod Exp $ - -REGRESS_TARGETS= all_tests +# $OpenBSD: Makefile,v 1.4 2020/11/05 20:48:05 bluhm Exp $ PROG= ocsp_test LDADD= -lcrypto -lssl @@ -9,8 +7,18 @@ WARNINGS= Yes LDFLAGS+= -lcrypto -lssl CFLAGS+= -DLIBRESSL_INTERNAL -Wall -Wundef -Werror -all_tests: ${PROG} - ${.OBJDIR}/${PROG} www.amazon.com 443 - ${.OBJDIR}/${PROG} cloudflare.com 443 +SERVERS= www.amazon.com \ + www.cloudflare.com + +REGRESS_TARGETS = + +.for s in ${SERVERS} +REGRESS_TARGETS += run-domain-$s +run-domain-$s: ${PROG} + @echo '======== $@ ========' + if ping -n -c 1 -w 1 $s; then \ + ./${PROG} $s 443; else \ + echo server $s not reachable; echo SKIPPED; fi +.endfor .include -- cgit v1.2.3-55-g6feb