From 5364e6e60ee1cd42a7bf0bbf014b01ffe1cf803a Mon Sep 17 00:00:00 2001 From: Viktor Szakats Date: Sun, 31 May 2026 20:44:57 +0200 Subject: [PATCH] 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 --- tests/CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 )