summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDan Fandrich <dan@coneharvesters.com>2023-04-10 16:41:07 -0700
committerDan Fandrich <dan@coneharvesters.com>2023-04-11 14:55:32 -0700
commitfdb24b39167d33f199f9986d751829a0b42b333a (patch)
treeff5c4c78f6854160484e7e2a31ced36ff8e67f8f
parentdee50c9c516a9d816d4737b5761d95d423709d8e (diff)
downloadcurl-fdb24b39167d33f199f9986d751829a0b42b333a.tar.gz
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
-rwxr-xr-xtests/runtests.pl8
1 files changed, 4 insertions, 4 deletions
diff --git a/tests/runtests.pl b/tests/runtests.pl
index 84eef3cb0..92b2bc351 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);
}
#######################################################################