From 6f20e9ea4688bb298243e47aa493e6c61795ef71 Mon Sep 17 00:00:00 2001 From: kettenis Date: Sun, 16 Apr 2017 16:59:53 +0000 Subject: [PATCH] Make sure these tests print "SKIPPED" if the necessary variables aren't set. The current code doesn't work since the magic .BEGIN target runs before the regress target that prints "SKIPPED" and the .BEGIN target fails when the variables aren't set. ok bluhm@ --- regress/sys/netinet/ipsec/Makefile | 9 ++++----- regress/sys/netinet/pmtu/Makefile | 5 ++--- 2 files changed, 6 insertions(+), 8 deletions(-) diff --git a/regress/sys/netinet/ipsec/Makefile b/regress/sys/netinet/ipsec/Makefile index 47f01d2a1a5..3e25e186134 100644 --- a/regress/sys/netinet/ipsec/Makefile +++ b/regress/sys/netinet/ipsec/Makefile @@ -1,4 +1,4 @@ -# $OpenBSD: Makefile,v 1.7 2017/04/14 19:03:50 bluhm Exp $ +# $OpenBSD: Makefile,v 1.8 2017/04/16 16:59:53 kettenis Exp $ # This test needs a manual setup of four machines, the make # target create-setup can be used distribute the configuration. @@ -130,6 +130,8 @@ RT_IN_IF ?= vio1 RT_OUT_IF ?= vio2 ECO_IN_IF ?= vio1 +.MAIN: all + .if empty (IPS_SSH) || empty (RT_SSH) || empty (ECO_SSH) regress: @echo this tests needs three remote machines to operate on @@ -137,11 +139,8 @@ regress: @echo fill out these variables for additional tests, then @echo check wether your test machines are set up properly @echo SKIPPED -.endif - -.MAIN: all -.if make (regress) || make (all) +.elif make (regress) || make (all) .BEGIN: ipsec.conf addr.py @echo ${SUDO} true diff --git a/regress/sys/netinet/pmtu/Makefile b/regress/sys/netinet/pmtu/Makefile index 84106579f0c..da86f8e031d 100644 --- a/regress/sys/netinet/pmtu/Makefile +++ b/regress/sys/netinet/pmtu/Makefile @@ -1,4 +1,4 @@ -# $OpenBSD: Makefile,v 1.9 2017/01/19 13:41:48 bluhm Exp $ +# $OpenBSD: Makefile,v 1.10 2017/04/16 16:59:53 kettenis Exp $ # The following ports must be installed: # @@ -56,9 +56,8 @@ regress: @echo FAKE_NET_ADDR6 @echo are empty. Fill out these variables for additional tests. @echo SKIPPED -.endif -.if make (regress) || make (all) +.elif make (regress) || make (all) .BEGIN: pf.conf addr.py @echo ${SUDO} true -- 2.20.1