Skip to content

Commit a8b192b

Browse files
authored
tests : enable test-chat out of tree build (ggml-org#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.
1 parent c17dce4 commit a8b192b

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

tests/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -152,7 +152,7 @@ if (NOT WIN32 OR NOT BUILD_SHARED_LIBS)
152152
llama_build_and_test(test-grammar-parser.cpp)
153153
llama_build_and_test(test-grammar-integration.cpp)
154154
llama_build_and_test(test-llama-grammar.cpp)
155-
llama_build_and_test(test-chat.cpp)
155+
llama_build_and_test(test-chat.cpp WORKING_DIRECTORY ${PROJECT_SOURCE_DIR})
156156
# TODO: disabled on loongarch64 because the ggml-ci node lacks Python 3.8
157157
if (NOT ${CMAKE_SYSTEM_PROCESSOR} MATCHES "loongarch64")
158158
llama_build_and_test(test-json-schema-to-grammar.cpp WORKING_DIRECTORY ${PROJECT_SOURCE_DIR})

0 commit comments

Comments
 (0)