From 3edbea6f04f62e759de8999776029acc176671fc Mon Sep 17 00:00:00 2001 From: Alexander Bluhm Date: Fri, 9 Aug 2013 19:26:17 +0000 Subject: Check wether all required perl packages are installed. If some are missing print a warning and skip the tests, but do not fail. --- regress/usr.sbin/relayd/Makefile | 28 ++++++++++++++++++++++------ 1 file changed, 22 insertions(+), 6 deletions(-) diff --git a/regress/usr.sbin/relayd/Makefile b/regress/usr.sbin/relayd/Makefile index 4109da5f38f..3155a37ef2d 100644 --- a/regress/usr.sbin/relayd/Makefile +++ b/regress/usr.sbin/relayd/Makefile @@ -1,14 +1,23 @@ -# $OpenBSD: Makefile,v 1.5 2013/01/04 14:01:49 bluhm Exp $ +# $OpenBSD: Makefile,v 1.6 2013/08/09 19:26:16 bluhm Exp $ # The following ports must be installed for the regression tests: # p5-IO-Socket-INET6 object interface for AF_INET and AF_INET6 domain sockets # p5-Socket6 Perl defines relating to AF_INET6 sockets # p5-IO-Socket-SSL perl interface to SSL sockets - -ARGS != cd ${.CURDIR} && ls args-*.pl -TARGETS ?= ${ARGS} -REGRESS_TARGETS = ${TARGETS:S/^/run-regress-/} -CLEANFILES = *.log *.pem relayd.conf ktrace.out stamp-* +# +# Check wether all required perl packages are installed. If some +# are missing print a warning and skip the tests, but do not fail. + +PERL_REQUIRE != perl -Mstrict -Mwarnings -e ' \ + eval { require IO::Socket::INET6 } or print $@; \ + eval { require Socket6 } or print $@; \ + eval { require IO::Socket::SSL } or print $@; \ +' +.if ! empty(PERL_REQUIRE) +regress: + @echo "${PERL_REQUIRE}" + @echo install these perl packages for additional tests +.endif # Fill out these variables if you want to test relayd with # the relayd process running on a remote machine. You have to specify @@ -20,6 +29,13 @@ LOCAL_ADDR ?= REMOTE_ADDR ?= REMOTE_SSH ?= +# Automatically generate regress targets from test cases in directory. + +ARGS != cd ${.CURDIR} && ls args-*.pl +TARGETS ?= ${ARGS} +REGRESS_TARGETS = ${TARGETS:S/^/run-regress-/} +CLEANFILES = *.log *.pem relayd.conf ktrace.out stamp-* + # Set variables so that make runs with and without obj directory. # Only do that if necessary to keep visible output short. -- cgit v1.2.3