diff options
author | 2013-08-09 19:51:11 +0000 | |
---|---|---|
committer | 2013-08-09 19:51:11 +0000 | |
commit | d653a4d4e3c77b7463d019188d630ed23c38dce9 (patch) | |
tree | de11a6ef4a212b3e6c6d389f4df01469de59e648 | |
parent | Check wether all required perl packages are installed. If some (diff) | |
download | wireguard-openbsd-d653a4d4e3c77b7463d019188d630ed23c38dce9.tar.xz wireguard-openbsd-d653a4d4e3c77b7463d019188d630ed23c38dce9.zip |
Move the check for required perl packages into Makefile.inc so that
make obj always runs through als sudirs.
-rw-r--r-- | regress/sys/kern/sosplice/Makefile | 18 | ||||
-rw-r--r-- | regress/sys/kern/sosplice/Makefile.inc | 30 |
2 files changed, 26 insertions, 22 deletions
diff --git a/regress/sys/kern/sosplice/Makefile b/regress/sys/kern/sosplice/Makefile index 46e4680e735..b2a8caece04 100644 --- a/regress/sys/kern/sosplice/Makefile +++ b/regress/sys/kern/sosplice/Makefile @@ -1,21 +1,9 @@ -# $OpenBSD: Makefile,v 1.4 2013/08/07 00:38:41 bluhm Exp $ +# $OpenBSD: Makefile,v 1.5 2013/08/09 19:51:11 bluhm Exp $ - -PERL_REQUIRE != perl -Mstrict -Mwarnings -e ' \ - eval { require BSD::Socket::Splice } or print $@; \ - eval { require IO::Socket::INET6 } or print $@; \ - eval { require Socket6 } or print $@; \ -' - -SUBDIR += perf -.if empty(PERL_REQUIRE) +SUBDIR = SUBDIR += error SUBDIR += tcp SUBDIR += udp -.else -all: _SUBDIRUSE - @echo "${PERL_REQUIRE}" - @echo install these perl packages for additional tests -.endif +SUBDIR += perf .include <bsd.subdir.mk> diff --git a/regress/sys/kern/sosplice/Makefile.inc b/regress/sys/kern/sosplice/Makefile.inc index b92fe3d93e6..8be6deaca16 100644 --- a/regress/sys/kern/sosplice/Makefile.inc +++ b/regress/sys/kern/sosplice/Makefile.inc @@ -1,16 +1,23 @@ -# $OpenBSD: Makefile.inc,v 1.2 2013/01/08 21:42:19 bluhm Exp $ +# $OpenBSD: Makefile.inc,v 1.3 2013/08/09 19:51:11 bluhm Exp $ # The following ports must be installed for the regression tests: # p5-BSD-Socket-Splice perl interface to OpenBSD socket splicing # p5-IO-Socket-INET6 object interface for AF_INET and AF_INET6 domain sockets # p5-Socket6 Perl defines relating to AF_INET6 sockets - -TARGETS ?= ${ARGS} -.if empty (TARGETS) -ARGS != cd ${.CURDIR} && ls args-*.pl +# +# 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 BSD::Socket::Splice } or print $@; \ + eval { require IO::Socket::INET6 } or print $@; \ + eval { require Socket6 } or print $@; \ +' +.if ! empty (PERL_REQUIRE) && ! defined (TARGETS) +regress: + @echo "${PERL_REQUIRE}" + @echo install these perl packages for additional tests .endif -REGRESS_TARGETS = ${TARGETS:S/^/run-regress-/} -CLEANFILES += *.log ktrace.out stamp-* # Fill out these variables if you want to test socket splicing with # the relay process running on a remote machine. You have to specify @@ -22,6 +29,15 @@ LOCAL_ADDR ?= REMOTE_ADDR ?= REMOTE_SSH ?= +# Automatically generate regress targets from test cases in directory. + +.if ! defined (TARGETS) +ARGS != cd ${.CURDIR} && ls args-*.pl +TARGETS ?= ${ARGS} +.endif +REGRESS_TARGETS = ${TARGETS:S/^/run-regress-/} +CLEANFILES += *.log ktrace.out stamp-* + # Set variables so that make runs with and without obj directory. # Only do that if necessary to keep visible output short. |