To make it easier to run tests when using the Visual Studio generator,
also perhaps Xcode.
Also drop manual settings from CI.
Closes #18241
env:
TFLAGS: '${{ matrix.tflags }}'
run: |
- export CURL_DIRSUFFIX="${MATRIX_TYPE}"
TFLAGS="-j8 ${TFLAGS}"
TFLAGS+=' !498' # 'Reject too large HTTP response headers on endless redirects' HTTP, HTTP GET (runtests detecting result code 2009 instead of 56 returned by curl)
if [[ "${MATRIX_INSTALL_MSYS2}" = *'libssh2-wincng'* || \
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
endif()
list(APPEND _depends "testdeps")
endif()
+ set(_setenv "")
+ if(CMAKE_CONFIGURATION_TYPES)
+ set(_setenv "${CMAKE_COMMAND}" -E env "CURL_DIRSUFFIX=$<CONFIG>")
+ endif()
# Use a special '$TFLAGS' placeholder as last argument which will be
# replaced by the contents of the environment variable in runtests.pl.
# This is a workaround for CMake's limitation where commands executed by
string(REPLACE " " ";" _test_flags_list "${_test_flags}")
add_custom_target(${_targetname}
COMMAND
+ ${_setenv}
"${PERL_EXECUTABLE}" "${CMAKE_CURRENT_SOURCE_DIR}/runtests.pl"
${_test_flags_list}
"\$TFLAGS"