From: Dan Fandrich Date: Mon, 10 Apr 2023 23:41:07 +0000 (-0700) Subject: runtests: only add $LIBDIR to the path for checktestcmd X-Git-Tag: curl-8_1_0~178 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=fdb24b39167d33f199f9986d751829a0b42b333a;p=thirdparty%2Fcurl.git runtests: only add $LIBDIR to the path for checktestcmd Since checkcmd is for finding servers, there will never be anything in this directory of interest to them. Ref: #10818 --- diff --git a/tests/runtests.pl b/tests/runtests.pl index 84eef3cb0e..92b2bc3512 100755 --- a/tests/runtests.pl +++ b/tests/runtests.pl @@ -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); } #######################################################################