mirror of
https://github.com/curl/curl.git
synced 2026-07-26 08:57:16 +03:00
runtests: support multi-target cmake, drop workarounds from CI
Support multi-target cmake builds via `CURL_DIRSUFFIX` env. For example:
`export CURL_DIRSUFFIX=Debug/`.
Multi-target generators place their output to `src/<subdir>/`,
`lib/<subdir>/`, `tests/server/<subdir>`, `tests/libtest/<subdir>` and
`tests/unit/<subdir>/` by default. Before this patch, `runtests.pl`
couldn't run on such builds because it expected the binaries under the
their `<subdir>`-less directories. This patch allows to set such subdir
and make `runtests.pl` find the binaries. In CI we use multi-target
builds with tests for MSVC. It also helps Xcode-generator builds, though
in CI we don't have such job running tests.
There may be better solutions to configure this, but passing a custom
value to `runtests.pl` including its subprocesses is somewhat tricky.
The reason the configuration value expects the slash at the end is
because MSYS is automagically expanding the env to a (wrong) absolute
path if the slash is in the front.
Also:
- drop the `-DCMAKE_RUNTIME_OUTPUT_DIRECTORY_*=` workaround from CI.
- replace `resolve` references in tests with a new `%RESOLVE` variable.
It didn't use a filename extension before. After this patch it uses
`exe_ext('TOOL')`. I'm not sure if this is the correct choice vs.
`exe_ext('SRV')`.
- fix `-c` option format in manual.
- fix some whitespace.
Note, in CI we still tweak `CMAKE_RUNTIME_OUTPUT_DIRECTORY_*` in jobs
which share steps between `./configure` and cmake. It's easier that way.
Ref: #15000
Cherry-picked from #16394
Closes #16452
This commit is contained in:
parent
db2fd7c3de
commit
3585796049
16 changed files with 69 additions and 56 deletions
|
|
@ -68,16 +68,13 @@ use serverhelp qw(
|
|||
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
|
||||
|
|
@ -410,7 +407,7 @@ sub sysread_or_die {
|
|||
}
|
||||
|
||||
sub startsf {
|
||||
my @mainsockfcmd = ("./server/sockfilt".exe_ext('SRV'),
|
||||
my @mainsockfcmd = (server_exe('sockfilt'),
|
||||
"--ipv$ipvnum",
|
||||
"--port", $port,
|
||||
"--pidfile", $mainsockf_pidfile,
|
||||
|
|
@ -2472,10 +2469,10 @@ sub PASV_ftp {
|
|||
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');
|
||||
}
|
||||
|
|
@ -2694,7 +2691,7 @@ sub PORT_ftp {
|
|||
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);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue