tests: allow pytests to run in out-of-tree builds

Some of the files it needs are in the build directory but the code did
not make a distinction.

Closes #15257
This commit is contained in:
Dan Fandrich 2024-10-10 10:44:56 -07:00
parent 79809ffe1e
commit a3601cf571
3 changed files with 9 additions and 6 deletions

View file

@ -72,7 +72,6 @@ function(add_pytest _targetname _test_flags)
endif()
string(REPLACE " " ";" _test_flags_list "${_test_flags}")
add_custom_target(${_targetname}
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
COMMAND pytest ${_test_flags_list} "${CMAKE_CURRENT_SOURCE_DIR}/http"
DEPENDS "${_depends}"
VERBATIM USES_TERMINAL