]> git.ipfire.org Git - thirdparty/curl.git/commitdiff
runtests: only add $LIBDIR to the path for checktestcmd
authorDan Fandrich <dan@coneharvesters.com>
Mon, 10 Apr 2023 23:41:07 +0000 (16:41 -0700)
committerDan Fandrich <dan@coneharvesters.com>
Tue, 11 Apr 2023 21:55:32 +0000 (14:55 -0700)
Since checkcmd is for finding servers, there will never be anything in
this directory of interest to them.

Ref: #10818

tests/runtests.pl

index 84eef3cb0e595efffdc51db7a1f4d3ec7a409963..92b2bc35126246ba8900bc0d7c88b46985500e37 100755 (executable)
@@ -507,10 +507,9 @@ sub startnew {
 # Check for a command in the PATH of the test server.
 #
 sub checkcmd {
-    my ($cmd)=@_;
+    my ($cmd, @extrapaths)=@_;
     my @paths=(split(m/[:]/, $ENV{'PATH'}), "/usr/sbin", "/usr/local/sbin",
-               "/sbin", "/usr/bin", "/usr/local/bin",
-               "$LIBDIR/.libs", "$LIBDIR");
+               "/sbin", "/usr/bin", "/usr/local/bin", @extrapaths);
     for(@paths) {
         if( -x "$_/$cmd" && ! -d "$_/$cmd") {
             # executable bit but not a directory!
@@ -543,7 +542,8 @@ sub get_disttests {
 #
 sub checktestcmd {
     my ($cmd)=@_;
-    return checkcmd($cmd);
+    my @testpaths=("$LIBDIR/.libs", "$LIBDIR");
+    return checkcmd($cmd, @testpaths);
 }
 
 #######################################################################