mirror of
https://github.com/curl/curl.git
synced 2026-04-19 20:11: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
9
.github/workflows/windows.yml
vendored
9
.github/workflows/windows.yml
vendored
|
|
@ -827,8 +827,6 @@ jobs:
|
|||
-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 \
|
||||
|
|
@ -860,8 +858,8 @@ jobs:
|
|||
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'
|
||||
|
|
@ -896,13 +894,14 @@ jobs:
|
|||
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
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue