[exim-cvs] Testsuite: add support for relative name of exim

Page principale
Supprimer ce message
Répondre à ce message
Auteur: Exim Git Commits Mailing List
Date:  
À: exim-cvs
Sujet: [exim-cvs] Testsuite: add support for relative name of exim
Gitweb: http://git.exim.org/exim.git/commitdiff/1c143d9d5ba30e2f687530f496b5ed5109be145e
Commit:     1c143d9d5ba30e2f687530f496b5ed5109be145e
Parent:     32ca7e2d3443b12a06aa0ae6bd21bfa8c27d031a
Author:     Heiko Schlittermann (HS12) <hs@???>
AuthorDate: Mon Apr 6 23:28:26 2015 +0200
Committer:  Heiko Schlittermann (HS12) <hs@???>
CommitDate: Sat Apr 25 21:25:32 2015 +0200


    Testsuite: add support for relative name of exim


    The runtest script converts a relative name of the binary to an
    absolute name. This is mainly a comfort feature.
---
 test/runtest |    5 +++--
 1 files changed, 3 insertions(+), 2 deletions(-)


diff --git a/test/runtest b/test/runtest
index 4247f8c..249c7cf 100755
--- a/test/runtest
+++ b/test/runtest
@@ -2253,9 +2253,10 @@ else
##################################################

# If the first character of the first argument is '/', the argument is taken
-# as the path to the binary.
+# as the path to the binary. If the first argument does not start with a
+# '/' but exists in the file system, it's assumed to be the Exim binary.

-$parm_exim = (@ARGV > 0 && $ARGV[0] =~ m?^/?)? shift @ARGV : "";
+$parm_exim = (@ARGV > 0 && (-x $ARGV[0] or $ARGV[0] =~ m?^/?))? Cwd::abs_path(shift @ARGV) : "";
print "Exim binary is $parm_exim\n" if $parm_exim ne "";