Gitweb:
http://git.exim.org/exim.git/commitdiff/26ab1da32241a0be1cf08ce866b00429fc35d06d
Commit: 26ab1da32241a0be1cf08ce866b00429fc35d06d
Parent: f4bb1d53d09d28cd6314a9e244d7a31d32e4bbdb
Author: Heiko Schlittermann (HS12) <hs@???>
AuthorDate: Tue Apr 7 21:44:00 2015 +0200
Committer: Heiko Schlittermann (HS12) <hs@???>
CommitDate: Sat Apr 25 21:00:20 2015 +0200
Testsuite: Auto-detect missing sbin directories
The runtest script maps bin directories to
matching sbin directories, if they are not already included
in the $PATH. This is mainly a comfort feature to find
ifconfig on some systems automatically.
---
test/runtest | 9 +++++++++
1 files changed, 9 insertions(+), 0 deletions(-)
diff --git a/test/runtest b/test/runtest
index 6c98a70..0a2ede9 100755
--- a/test/runtest
+++ b/test/runtest
@@ -2207,6 +2207,15 @@ return $yield; # Ran command and waited
autoflush STDOUT 1;
print "Exim tester $testversion\n";
+# extend the PATH with .../sbin
+# we map all (.../bin) to (.../sbin:.../bin)
+$ENV{PATH} = do {
+ my %seen = map { $_, 1 } split /:/, $ENV{PATH};
+ join ':' => map { m{(.*)/bin$}
+ ? ( $seen{"$1/sbin"} ? () : ("$1/sbin"), $_)
+ : ($_) }
+ split /:/, $ENV{PATH};
+};
##################################################
# Some tests check created file modes #