From: Viktor Szakats Date: Sun, 31 May 2026 18:44:57 +0000 (+0200) Subject: cmake: add basic way to select pytests to run X-Git-Url: http://git.ipfire.org/gitweb/index.cgi?a=commitdiff_plain;h=5364e6e60ee1cd42a7bf0bbf014b01ffe1cf803a;p=thirdparty%2Fcurl.git cmake: add basic way to select pytests to run Not documented and experimental, example: `-D_CURL_PYTEST=/test_60_h3_proxy.py` Ideally, this should be an env like `TFLAGS` and it should allow selecting any test ID or a group of them, but so far could not figure out how even a basic env could work. Closes #21818 --- diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt index e75ca4e14e..6de7f96d0a 100644 --- a/tests/CMakeLists.txt +++ b/tests/CMakeLists.txt @@ -110,7 +110,7 @@ function(curl_add_pytests _targetname _test_flags) endif() string(REPLACE " " ";" _test_flags_list "${_test_flags}") add_custom_target(${_targetname} - COMMAND pytest ${_test_flags_list} "${CMAKE_CURRENT_SOURCE_DIR}/http" + COMMAND pytest ${_test_flags_list} "${CMAKE_CURRENT_SOURCE_DIR}/http${_CURL_PYTEST}" DEPENDS "${_depends}" VERBATIM USES_TERMINAL )