mirror of
https://github.com/curl/curl.git
synced 2026-08-25 00:13:34 +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
|
|
@ -84,6 +84,9 @@ use Digest::MD5 qw(md5);
|
|||
use List::Util 'sum';
|
||||
use I18N::Langinfo qw(langinfo CODESET);
|
||||
|
||||
use serverhelp qw(
|
||||
server_exe
|
||||
);
|
||||
use pathhelp qw(
|
||||
exe_ext
|
||||
sys_native_current_path
|
||||
|
|
@ -510,7 +513,7 @@ sub checksystemfeatures {
|
|||
@version = <$versout>;
|
||||
close($versout);
|
||||
|
||||
open(my $disabledh, "-|", "server/disabled".exe_ext('TOOL'));
|
||||
open(my $disabledh, "-|", server_exe('disabled', 'TOOL'));
|
||||
@disabled = <$disabledh>;
|
||||
close($disabledh);
|
||||
|
||||
|
|
@ -766,7 +769,7 @@ sub checksystemfeatures {
|
|||
# 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!
|
||||
|
|
@ -774,7 +777,7 @@ sub checksystemfeatures {
|
|||
}
|
||||
|
||||
# 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!
|
||||
|
|
@ -784,7 +787,7 @@ sub checksystemfeatures {
|
|||
|
||||
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/);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue