diff options
author | anton <anton@cvs.openbsd.org> | 2018-02-05 18:28:16 +0000 |
---|---|---|
committer | anton <anton@cvs.openbsd.org> | 2018-02-05 18:28:16 +0000 |
commit | f8f2e8035e737d55be55ff71aad67b81da7aad2d (patch) | |
tree | c3b8b3044cac301ea3f333f2540c5c84b632b6cb /regress/usr.sbin | |
parent | 4bb8238a70d06a81c684edb43b6e91d6ec9efcc2 (diff) |
Pass env(1) to ${SUDO}, not the other way around. Solves an issue when running
the tests as a non-root and doas is not configured to preserve the OBJDIR
variable. While here, ensure OBJDIR is defined and fix typos.
ok bluhm@
Diffstat (limited to 'regress/usr.sbin')
-rw-r--r-- | regress/usr.sbin/ifstated/Makefile | 6 | ||||
-rw-r--r-- | regress/usr.sbin/ifstated/ifstated | 6 | ||||
-rw-r--r-- | regress/usr.sbin/ifstated/statemachine | 7 |
3 files changed, 12 insertions, 7 deletions
diff --git a/regress/usr.sbin/ifstated/Makefile b/regress/usr.sbin/ifstated/Makefile index 92d98534645..3759eea623f 100644 --- a/regress/usr.sbin/ifstated/Makefile +++ b/regress/usr.sbin/ifstated/Makefile @@ -1,12 +1,12 @@ -# $OpenBSD: Makefile,v 1.2 2017/08/12 21:41:16 rob Exp $ +# $OpenBSD: Makefile,v 1.3 2018/02/05 18:28:15 anton Exp $ # Regress tests for ifstated REGRESS_TARGETS = run-regress-statemachine run-regress-ifstated run-regress-statemachine: - env OBJDIR=${.OBJDIR} ${SUDO} sh ${.CURDIR}/statemachine + ${SUDO} env OBJDIR=${.OBJDIR} sh ${.CURDIR}/statemachine run-regress-ifstated: - env OBJDIR=${.OBJDIR} ${SUDO} sh ${.CURDIR}/ifstated + ${SUDO} env OBJDIR=${.OBJDIR} sh ${.CURDIR}/ifstated .include <bsd.regress.mk> diff --git a/regress/usr.sbin/ifstated/ifstated b/regress/usr.sbin/ifstated/ifstated index 7fba45ececb..6965110be58 100644 --- a/regress/usr.sbin/ifstated/ifstated +++ b/regress/usr.sbin/ifstated/ifstated @@ -1,6 +1,6 @@ #!/bin/sh # -# $OpenBSD: ifstated,v 1.7 2017/08/30 16:14:52 rob Exp $ +# $OpenBSD: ifstated,v 1.8 2018/02/05 18:28:15 anton Exp $ #/* # * Copyright (c) Rob Pierce <rob@openbsd.org> # * @@ -19,9 +19,11 @@ # Basic ifstated regression script to test interface changes. +# Ensure OBJDIR is defined +: ${OBJDIR?} || exit 1 export OBJDIR -# Golbal variables +# Global variables VHIDA=252 VHIDB=253 PREFIX=172.16.0 diff --git a/regress/usr.sbin/ifstated/statemachine b/regress/usr.sbin/ifstated/statemachine index fe7b9c8a72a..e185cd19280 100644 --- a/regress/usr.sbin/ifstated/statemachine +++ b/regress/usr.sbin/ifstated/statemachine @@ -1,6 +1,6 @@ #!/bin/sh # -# $OpenBSD: statemachine,v 1.5 2017/08/28 22:05:44 rob Exp $ +# $OpenBSD: statemachine,v 1.6 2018/02/05 18:28:15 anton Exp $ #/* # * Copyright (c) Rob Pierce <rob@openbsd.org> # * @@ -23,9 +23,12 @@ # NOTE: Increase LSLEEP as required when adding additional test states. # +# Ensure OBJDIR is defined +: ${OBJDIR?} || exit 1 + export OBJDIR -# Golbal variables +# Global variables FILE1="truth1.test" FILE2="truth2.test" EVERY=2 |