runtests: accept CURL_DIRSUFFIX without ending slash
Follow-up to 3585796049 #16452
Closes #16506
This commit is contained in:
parent
59f4727480
commit
cba83bfb10
2
.github/workflows/windows.yml
vendored
2
.github/workflows/windows.yml
vendored
@ -907,7 +907,7 @@ jobs:
|
||||
if: ${{ matrix.tflags != 'skipall' && matrix.tflags != 'skiprun' }}
|
||||
timeout-minutes: 10
|
||||
run: |
|
||||
export CURL_DIRSUFFIX='${{ matrix.type }}/'
|
||||
export CURL_DIRSUFFIX='${{ matrix.type }}'
|
||||
export TFLAGS='-j8 ~WebSockets ~SCP ~612 ${{ matrix.tflags }}'
|
||||
if [[ '${{ matrix.install }}' = *'libssh2[core,zlib]'* ]]; then
|
||||
TFLAGS+=' ~SFTP'
|
||||
|
||||
@ -147,7 +147,7 @@ fi
|
||||
|
||||
if [ "${TFLAGS}" != 'skipall' ] && \
|
||||
[ "${TFLAGS}" != 'skiprun' ]; then
|
||||
export CURL_DIRSUFFIX="${PRJ_CFG}/"
|
||||
export CURL_DIRSUFFIX="${PRJ_CFG}"
|
||||
if [ -x "$(cygpath "${SYSTEMROOT}/System32/curl.exe")" ]; then
|
||||
TFLAGS+=" -ac $(cygpath "${SYSTEMROOT}/System32/curl.exe")"
|
||||
elif [ -x "$(cygpath 'C:/msys64/usr/bin/curl.exe')" ]; then
|
||||
|
||||
@ -73,7 +73,10 @@ BEGIN {
|
||||
$dev_null
|
||||
);
|
||||
}
|
||||
use pathhelp qw(exe_ext);
|
||||
use pathhelp qw(
|
||||
exe_ext
|
||||
dirsepadd
|
||||
);
|
||||
use Cwd qw(getcwd);
|
||||
use testutil qw(
|
||||
shell_quote
|
||||
@ -104,11 +107,11 @@ our $perlcmd=shell_quote($^X);
|
||||
our $perl="$perlcmd -I. " . shell_quote("-I$srcdir"); # invoke perl like this
|
||||
our $LOGDIR="log"; # root of the log directory; this will be different for
|
||||
# each runner in multiprocess mode
|
||||
our $LIBDIR="./libtest/" . ($ENV{'CURL_DIRSUFFIX'} || '');
|
||||
our $UNITDIR="./unit/" . ($ENV{'CURL_DIRSUFFIX'} || '');
|
||||
our $SRVDIR="./server/" . ($ENV{'CURL_DIRSUFFIX'} || '');
|
||||
our $LIBDIR=dirsepadd("./libtest/" . ($ENV{'CURL_DIRSUFFIX'} || ''));
|
||||
our $UNITDIR=dirsepadd("./unit/" . ($ENV{'CURL_DIRSUFFIX'} || ''));
|
||||
our $SRVDIR=dirsepadd("./server/" . ($ENV{'CURL_DIRSUFFIX'} || ''));
|
||||
our $TESTDIR="$srcdir/data";
|
||||
our $CURL="../src/" . ($ENV{'CURL_DIRSUFFIX'} || '') . "curl".exe_ext('TOOL'); # what curl binary to run on the tests
|
||||
our $CURL=dirsepadd("../src/" . ($ENV{'CURL_DIRSUFFIX'} || '')) . "curl".exe_ext('TOOL'); # what curl binary to run on the tests
|
||||
our $VCURL=$CURL; # what curl binary to use to verify the servers with
|
||||
# VCURL is handy to set to the system one when the one you
|
||||
# just built hangs or crashes and thus prevent verification
|
||||
|
||||
@ -59,6 +59,7 @@ BEGIN {
|
||||
our @EXPORT_OK = qw(
|
||||
os_is_win
|
||||
exe_ext
|
||||
dirsepadd
|
||||
sys_native_abs_path
|
||||
sys_native_current_path
|
||||
build_sys_abs_path
|
||||
@ -182,4 +183,13 @@ sub exe_ext {
|
||||
return '';
|
||||
}
|
||||
|
||||
#***************************************************************************
|
||||
# Add ending slash if missing
|
||||
#
|
||||
sub dirsepadd {
|
||||
my ($dir) = @_;
|
||||
$dir =~ s/\/$//;
|
||||
return $dir . '/';
|
||||
}
|
||||
|
||||
1; # End of module
|
||||
|
||||
Loading…
Reference in New Issue
Block a user