diff options
author | Alexander Bluhm <bluhm@cvs.openbsd.org> | 2013-08-09 19:26:17 +0000 |
---|---|---|
committer | Alexander Bluhm <bluhm@cvs.openbsd.org> | 2013-08-09 19:26:17 +0000 |
commit | 3edbea6f04f62e759de8999776029acc176671fc (patch) | |
tree | 9f32f1e9b9b4f448f4ca69427981ea910515278c /regress/usr.sbin | |
parent | fb4cdde8e156a20ff4e460660a0b8e9baa876a57 (diff) |
Check wether all required perl packages are installed. If some
are missing print a warning and skip the tests, but do not fail.
Diffstat (limited to 'regress/usr.sbin')
-rw-r--r-- | regress/usr.sbin/relayd/Makefile | 28 |
1 files 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. |