From: Jan Patrick Lehr Date: Fri, 27 Feb 2026 04:37:54 +0000 (+0100) Subject: tests : enable test-chat out of tree build (#19558) X-Git-Tag: gguf-v0.18.0~2 X-Git-Url: https://git.djapps.eu/?a=commitdiff_plain;h=a8b192b6ec4fd517fc966ef6fa02c01f8157bbee;p=pkg%2Fggml%2Fsources%2Fllama.cpp tests : enable test-chat out of tree build (#19558) The binary relies on model files that it tries to find. However, when configuring the build directory to be parallel to the source tree those heuristics fail. This sets the working directory for the test executable to be the source-tree which resolves this issue. --- diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt index 350bffc31..d98a090c3 100644 --- a/tests/CMakeLists.txt +++ b/tests/CMakeLists.txt @@ -152,7 +152,7 @@ if (NOT WIN32 OR NOT BUILD_SHARED_LIBS) llama_build_and_test(test-grammar-parser.cpp) llama_build_and_test(test-grammar-integration.cpp) llama_build_and_test(test-llama-grammar.cpp) - llama_build_and_test(test-chat.cpp) + llama_build_and_test(test-chat.cpp WORKING_DIRECTORY ${PROJECT_SOURCE_DIR}) # TODO: disabled on loongarch64 because the ggml-ci node lacks Python 3.8 if (NOT ${CMAKE_SYSTEM_PROCESSOR} MATCHES "loongarch64") llama_build_and_test(test-json-schema-to-grammar.cpp WORKING_DIRECTORY ${PROJECT_SOURCE_DIR})