Testsuite: add support for relative name of exim
authorHeiko Schlittermann (HS12) <hs@schlittermann.de>
Mon, 6 Apr 2015 21:28:26 +0000 (23:28 +0200)
committerHeiko Schlittermann (HS12) <hs@schlittermann.de>
Sat, 25 Apr 2015 19:25:32 +0000 (21:25 +0200)
The runtest script converts a relative name of the binary to an
absolute name. This is mainly a comfort feature.

test/runtest

index 4247f8c53b9a8dba352b86fec63c7ceececaf3ec..249c7cf59db30d5d4474d591d6dba2f84ef38444 100755 (executable)
@@ -2253,9 +2253,10 @@ else
 ##################################################
 
 # If the first character of the first argument is '/', the argument is taken
 ##################################################
 
 # 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 "";
 
 
 print "Exim binary is $parm_exim\n" if $parm_exim ne "";