From fdb24b39167d33f199f9986d751829a0b42b333a Mon Sep 17 00:00:00 2001 From: Dan Fandrich Date: Mon, 10 Apr 2023 16:41:07 -0700 Subject: [PATCH] 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 --- tests/runtests.pl | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) 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); } ####################################################################### -- 2.47.3