-DCMAKE_EXE_LINKER_FLAGS="-INCREMENTAL:NO ${ldflags}" \
-DCMAKE_SHARED_LINKER_FLAGS="-INCREMENTAL:NO ${ldflags}" \
-DCMAKE_VS_GLOBALS="TrackFileAccess=false${vsglobals}" \
- -DCMAKE_RUNTIME_OUTPUT_DIRECTORY_DEBUG= \
- -DCMAKE_RUNTIME_OUTPUT_DIRECTORY_RELEASE= \
-DCMAKE_UNITY_BUILD=ON -DCURL_TEST_BUNDLES=ON \
-DCURL_WERROR=ON \
-DBUILD_SHARED_LIBS=OFF \
run: |
PATH=/usr/bin find . \( -name '*.exe' -o -name '*.dll' -o -name '*.lib' \) -exec file '{}' \;
if [ '${{ matrix.plat }}' != 'uwp' ]; then # Missing: ucrtbased.dll, VCRUNTIME140D.dll, VCRUNTIME140D_APP.dll
- PATH="$PWD/bld/lib:$PATH"
- bld/src/curl.exe --disable --version
+ PATH="$PWD/bld/lib/${{ matrix.type }}:$PATH"
+ 'bld/src/${{ matrix.type }}/curl.exe' --disable --version
fi
- name: 'build tests'
if: ${{ matrix.tflags != 'skipall' && matrix.tflags != 'skiprun' }}
timeout-minutes: 10
run: |
+ export CURL_DIRSUFFIX='${{ matrix.type }}/'
export TFLAGS='-j8 ~WebSockets ~SCP ~612 ${{ matrix.tflags }}'
if [[ '${{ matrix.install }}' = *'libssh2[core,zlib]'* ]]; then
TFLAGS+=' ~SFTP'
elif [[ '${{ matrix.install }}' = *'libssh '* ]]; then
TFLAGS+=' ~614' # 'SFTP pre-quote chmod' SFTP, pre-quote, directory
fi
- PATH="$PWD/bld/lib:$PATH:/c/Program Files (x86)/stunnel/bin:/c/Program Files/OpenSSH-Win64"
+ PATH="$PWD/bld/lib/${{ matrix.type }}:$PATH:/c/Program Files (x86)/stunnel/bin:/c/Program Files/OpenSSH-Win64"
PATH="/c/msys64/usr/bin:$PATH"
cmake --build bld --config '${{ matrix.type }}' --target test-ci
# shellcheck disable=SC2086
cmake -B "_bld${_chkprefill}" -G "${PRJ_GEN}" ${TARGET} \
-DCMAKE_VS_GLOBALS=TrackFileAccess=false \
- -DCMAKE_RUNTIME_OUTPUT_DIRECTORY_DEBUG= \
- -DCMAKE_RUNTIME_OUTPUT_DIRECTORY_RELEASE= \
-DCMAKE_UNITY_BUILD="${UNITY}" -DCURL_TEST_BUNDLES=ON \
-DCURL_WERROR=ON \
-DBUILD_SHARED_LIBS="${SHARED}" \
echo 'curl_config.h'; grep -F '#define' _bld/lib/curl_config.h | sort || true
# shellcheck disable=SC2086
cmake --build _bld --config "${PRJ_CFG}" --parallel 2 -- ${BUILD_OPT:-}
- [ "${SHARED}" = 'ON' ] && PATH="$PWD/_bld/lib:$PATH"
+ [ "${SHARED}" = 'ON' ] && PATH="$PWD/_bld/lib/${PRJ_CFG}:$PATH"
[ "${OPENSSL}" = 'ON' ] && PATH="${openssl_root}:$PATH"
- curl='_bld/src/curl.exe'
+ curl="_bld/src/${PRJ_CFG}/curl.exe"
elif [ "${BUILD_SYSTEM}" = 'VisualStudioSolution' ]; then
(
cd projects
if [ "${TFLAGS}" != 'skipall' ] && \
[ "${TFLAGS}" != 'skiprun' ]; then
+ 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
- `%POSIX_PWD` - Current directory somewhat MinGW friendly
- `%PROXYPORT` - Port number of the HTTP proxy
- `%PWD` - Current directory
+- `%RESOLVE` - server/resolve command
- `%RTSP6PORT` - IPv6 port number of the RTSP server
- `%RTSPPORT` - Port number of the RTSP server
- `%SMBPORT` - Port number of the SMB server
-g "http://%HOST6IP:%HTTP6PORT/%TESTNUMBER" --interface ip6-localhost
</command>
<precheck>
-%PERL -e "if ('%CLIENT6IP' ne '[::1]') {print 'Test requires default test client host address';} else {exec './server/resolve --ipv6 ip6-localhost'; print 'Cannot run precheck resolve';}"
+%PERL -e "if ('%CLIENT6IP' ne '[::1]') {print 'Test requires default test client host address';} else {exec '%RESOLVE --ipv6 ip6-localhost'; print 'Cannot run precheck resolve';}"
</precheck>
</client>
# Ensure the IPv6 stack is operational before running this test (other tests
# use the startup of the IPv6 test server as a substitute check for this).
<precheck>
-./server/resolve --ipv6 ::1
+%RESOLVE --ipv6 ::1
</precheck>
</client>
-g "http://ip6-localhost:%HTTP6PORT/%TESTNUMBER"
</command>
<precheck>
-./server/resolve --ipv6 ip6-localhost
+%RESOLVE --ipv6 ip6-localhost
</precheck>
</client>
servername_str
server_pidfilename
server_logfilename
+ server_exe
mainsockf_pidfilename
mainsockf_logfilename
datasockf_pidfilename
datasockf_logfilename
);
-use pathhelp qw(
- exe_ext
- );
-
use globalconfig qw(
$SERVERCMD
$LOCKDIR
}
sub startsf {
- my @mainsockfcmd = ("./server/sockfilt".exe_ext('SRV'),
+ my @mainsockfcmd = (server_exe('sockfilt'),
"--ipv$ipvnum",
"--port", $port,
"--pidfile", $mainsockf_pidfile,
logmsg "DATA sockfilt for passive data channel starting...\n";
# We fire up a new sockfilt to do the data transfer for us.
- my @datasockfcmd = ("./server/sockfilt".exe_ext('SRV'),
+ my @datasockfcmd = (server_exe('sockfilt'),
"--ipv$ipvnum", "--port", 0,
"--pidfile", $datasockf_pidfile,
- "--logfile", $datasockf_logfile);
+ "--logfile", $datasockf_logfile);
if($nodataconn) {
push(@datasockfcmd, '--bindonly');
}
logmsg "DATA sockfilt for active data channel starting...\n";
# We fire up a new sockfilt to do the data transfer for us.
- my @datasockfcmd = ("./server/sockfilt".exe_ext('SRV'),
+ my @datasockfcmd = (server_exe('sockfilt'),
"--ipv$ipvnum", "--connect", $port, "--addr", $addr,
"--pidfile", $datasockf_pidfile,
"--logfile", $datasockf_logfile);
$DATE
$has_shared
$LIBDIR
+ $UNITDIR
+ $SRVDIR
$listonly
$LOCKDIR
$LOGDIR
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";
+our $LIBDIR="./libtest/" . ($ENV{'CURL_DIRSUFFIX'} || '');
+our $UNITDIR="./unit/" . ($ENV{'CURL_DIRSUFFIX'} || '');
+our $SRVDIR="./server/" . ($ENV{'CURL_DIRSUFFIX'} || '');
our $TESTDIR="$srcdir/data";
-our $CURL="../src/curl".exe_ext('TOOL'); # what curl binary to run on the tests
+our $CURL="../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
use serverhelp qw(
server_pidfilename
server_logfilename
- );
-
-use pathhelp qw(
- exe_ext
+ server_exe
);
my $verbose = 0; # set to 1 for debugging
$flags .= "--srcdir \"$srcdir\"";
if($verbose) {
- print STDERR "RUN: server/sws".exe_ext('SRV')." $flags\n";
+ print STDERR "RUN: ".server_exe('sws')." $flags\n";
}
$| = 1;
-exec("exec server/sws".exe_ext('SRV')." $flags");
+exec("exec ".server_exe('sws')." $flags");
use serverhelp qw(
server_pidfilename
server_logfilename
- );
-
-use pathhelp qw(
- exe_ext
+ server_exe
);
my $verbose = 0; # set to 1 for debugging
$flags .= "--ipv$ipvnum --port $port --srcdir \"$srcdir\"";
$| = 1;
-exec("exec server/rtspd".exe_ext('SRV')." $flags");
+exec("exec ".server_exe('rtspd')." $flags");
# local variables
my %oldenv; # environment variables before test is started
-my $UNITDIR="./unit";
my $CURLLOG="$LOGDIR/commands.log"; # all command lines run
my $defserverlogslocktimeout = 5; # timeout to await server logs lock removal
my $defpostcommanddelay = 0; # delay between command and postcheck sections
#
sub checktestcmd {
my ($cmd)=@_;
- my @testpaths=("$LIBDIR/.libs", "$LIBDIR");
+ my @testpaths=($LIBDIR . ".libs", "$LIBDIR");
return checkcmd($cmd, @testpaths);
}
if($tool =~ /^lib/) {
if($bundle) {
- $CMDLINE="$LIBDIR/libtests";
+ $CMDLINE=$LIBDIR . "libtests";
}
else {
- $CMDLINE="$LIBDIR/$tool";
+ $CMDLINE=$LIBDIR . $tool;
}
}
elsif($tool =~ /^unit/) {
if($bundle) {
- $CMDLINE="$UNITDIR/units";
+ $CMDLINE=$UNITDIR . "units";
}
else {
- $CMDLINE="$UNITDIR/$tool";
+ $CMDLINE=$UNITDIR . $tool;
}
}
if ($torture) {
$cmdres = torture($CMDLINE,
$testnum,
- "$gdb --directory $LIBDIR " . shell_quote($DBGCURL) . " -x $LOGDIR/gdbcmd");
+ "$gdb --directory $LIBDIR " . shell_quote($DBGCURL) . " -x $LOGDIR" . "gdbcmd");
}
elsif($gdbthis == 1) {
# gdb
my $GDBW = ($gdbxwin) ? "-w" : "";
- runclient("$gdb --directory $LIBDIR " . shell_quote($DBGCURL) . " $GDBW -x $LOGDIR/gdbcmd");
+ runclient("$gdb --directory $LIBDIR " . shell_quote($DBGCURL) . " $GDBW -x $LOGDIR" . "gdbcmd");
$cmdres=0; # makes it always continue after a debugged run
}
elsif($gdbthis == 2) {
Run tests via bundled test binaries. Bundled test binaries contain all tests,
and the test name passed as the first argument selects which test run.
-## `-c\<curl\>`
+## `-c \<curl\>`
Provide a path to a custom curl binary to run the tests with. Default is the
curl executable in the build tree.
use List::Util 'sum';
use I18N::Langinfo qw(langinfo CODESET);
+use serverhelp qw(
+ server_exe
+ );
use pathhelp qw(
exe_ext
sys_native_current_path
@version = <$versout>;
close($versout);
- open(my $disabledh, "-|", "server/disabled".exe_ext('TOOL'));
+ open(my $disabledh, "-|", server_exe('disabled', 'TOOL'));
@disabled = <$disabledh>;
close($disabledh);
# client has IPv6 support
# check if the HTTP server has it!
- my $cmd = "server/sws".exe_ext('SRV')." --version";
+ my $cmd = server_exe('sws')." --version";
my @sws = `$cmd`;
if($sws[0] =~ /IPv6/) {
# HTTP server has IPv6 support!
}
# check if the FTP server has it!
- $cmd = "server/sockfilt".exe_ext('SRV')." --version";
+ $cmd = server_exe('sockfilt')." --version";
@sws = `$cmd`;
if($sws[0] =~ /IPv6/) {
# FTP server has IPv6 support!
if($feature{"UnixSockets"}) {
# client has Unix sockets support, check whether the HTTP server has it
- my $cmd = "server/sws".exe_ext('SRV')." --version";
+ my $cmd = server_exe('sws')." --version";
my @sws = `$cmd`;
$http_unix = 1 if($sws[0] =~ /unix/);
}
server_cmdfilename
server_inputfilename
server_outputfilename
+ server_exe
mainsockf_pidfilename
mainsockf_logfilename
datasockf_pidfilename
}
}
+use globalconfig;
+use pathhelp qw(
+ exe_ext
+ );
our $logfile; # server log file name, for logmsg
}
+#***************************************************************************
+# Return filename for a server executable
+#
+sub server_exe {
+ my ($name, $ext) = @_;
+ if(!defined $ext) {
+ $ext = 'SRV';
+ }
+ return $SRVDIR . $name . exe_ext($ext);
+}
+
+
#***************************************************************************
# Return file name for main or primary sockfilter pid file.
#
server_pidfilename
server_portfilename
server_logfilename
+ server_exe
);
use sshhelp qw(
my $logfile = server_logfilename($LOGDIR, $proto, $ipvnum, $idnum);
# start our MQTT server - on a random port!
- my $cmd="server/mqttd".exe_ext('SRV').
- " --port 0 ".
+ my $cmd=server_exe('mqttd').
+ " --port 0".
" --pidfile $pidfile".
" --portfile $portfile".
" --config $LOGDIR/$SERVERCMD".
# start our socks server, get commands from the FTP cmd file
my $cmd="";
if($is_unix) {
- $cmd="server/socksd".exe_ext('SRV').
+ $cmd=server_exe('socksd').
" --pidfile $pidfile".
" --reqfile $LOGDIR/$SOCKSIN".
" --logfile $logfile".
" --backend $HOSTIP".
" --config $LOGDIR/$SERVERCMD";
} else {
- $cmd="server/socksd".exe_ext('SRV').
- " --port 0 ".
+ $cmd=server_exe('socksd').
+ " --port 0".
" --pidfile $pidfile".
" --portfile $portfile".
" --reqfile $LOGDIR/$SOCKSIN".
$$thing =~ s/${prefix}VERNUM/$CURLVERNUM/g;
$$thing =~ s/${prefix}DATE/$DATE/g;
$$thing =~ s/${prefix}TESTNUMBER/$testnum/g;
+ my $resolve = server_exe('resolve', 'TOOL');
+ $$thing =~ s/${prefix}RESOLVE/$resolve/g;
# POSIX/MSYS/Cygwin curl needs: file://localhost/d/path/to
# Windows native curl needs: file://localhost/D:/path/to
use serverhelp qw(
server_pidfilename
server_logfilename
- );
-
-use pathhelp qw(
- exe_ext
+ server_exe
);
my $verbose = 0; # set to 1 for debugging
$flags .= "--ipv$ipvnum --port $port --srcdir \"$srcdir\"";
$| = 1;
-exec("exec server/tftpd".exe_ext('SRV')." $flags");
+exec("exec ".server_exe('tftpd')." $flags");