diff options
author | Alexander Bluhm <bluhm@cvs.openbsd.org> | 2012-11-28 00:40:37 +0000 |
---|---|---|
committer | Alexander Bluhm <bluhm@cvs.openbsd.org> | 2012-11-28 00:40:37 +0000 |
commit | 4b4b0ef0a4a37726cc1d927025e4647b2521bc1f (patch) | |
tree | 061e48301b7bac26d27991708e301f52e145936c /regress/usr.sbin | |
parent | 4a4758756cda53d077d54b56b6bac6d4521de516 (diff) |
Set used environment variables explicitly in makefile and use them
consistently in relayd regression test.
Diffstat (limited to 'regress/usr.sbin')
-rw-r--r-- | regress/usr.sbin/relayd/Makefile | 6 | ||||
-rw-r--r-- | regress/usr.sbin/relayd/Relayd.pm | 10 |
2 files changed, 8 insertions, 8 deletions
diff --git a/regress/usr.sbin/relayd/Makefile b/regress/usr.sbin/relayd/Makefile index d8eee4778ca..42ed296fa70 100644 --- a/regress/usr.sbin/relayd/Makefile +++ b/regress/usr.sbin/relayd/Makefile @@ -1,4 +1,4 @@ -# $OpenBSD: Makefile,v 1.2 2011/09/02 17:02:10 bluhm Exp $ +# $OpenBSD: Makefile,v 1.3 2012/11/28 00:40:36 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 @@ -26,8 +26,8 @@ PERLPATH = ${.CURDIR}/ .for a in ${ARGS} run-regress-$a: $a - time SUDO=${SUDO} perl ${PERLINC} ${PERLPATH}relayd.pl copy ${PERLPATH}$a - time SUDO=${SUDO} perl ${PERLINC} ${PERLPATH}relayd.pl splice ${PERLPATH}$a + time SUDO=${SUDO} KTRACE=${KTRACE} RELAYD=${RELAYD} perl ${PERLINC} ${PERLPATH}relayd.pl copy ${PERLPATH}$a + time SUDO=${SUDO} KTRACE=${KTRACE} RELAYD=${RELAYD} perl ${PERLINC} ${PERLPATH}relayd.pl splice ${PERLPATH}$a .endfor /etc/ssl/127.0.0.1.crt: diff --git a/regress/usr.sbin/relayd/Relayd.pm b/regress/usr.sbin/relayd/Relayd.pm index a0dae1a935b..2f0dd113d39 100644 --- a/regress/usr.sbin/relayd/Relayd.pm +++ b/regress/usr.sbin/relayd/Relayd.pm @@ -1,4 +1,4 @@ -# $OpenBSD: Relayd.pm,v 1.3 2012/11/02 17:44:49 bluhm Exp $ +# $OpenBSD: Relayd.pm,v 1.4 2012/11/28 00:40:36 bluhm Exp $ # Copyright (c) 2010-2012 Alexander Bluhm <bluhm@openbsd.org> # @@ -90,7 +90,7 @@ sub up { sub down { my $self = shift; - my @sudo = $ENV{SUDO} || (); + my @sudo = $ENV{SUDO} ? $ENV{SUDO} : (); my @cmd = (@sudo, '/bin/kill', $self->{pid}); system(@cmd); return Proc::down($self, @_); @@ -99,9 +99,9 @@ sub down { sub child { my $self = shift; print STDERR $self->{up}, "\n"; - my @sudo = $ENV{SUDO} || (); - my @ktrace = $ENV{KTRACE} ? qw(ktrace -i) : (); - my $relayd = $ENV{RELAYD} || "relayd"; + my @sudo = $ENV{SUDO} ? $ENV{SUDO} : (); + my @ktrace = $ENV{KTRACE} ? ($ENV{KTRACE}, "-i") : (); + my $relayd = $ENV{RELAYD} ? $ENV{RELAYD} : "relayd"; my @cmd = (@sudo, @ktrace, $relayd, '-dvv', '-f', $self->{conffile}); print STDERR "execute: @cmd\n"; exec @cmd; |