tests : avoid building get-model.cpp many times (#26317)

* tests : remove get-model.cpp

* tests : fix quant type selection
This commit is contained in:
Georgi Gerganov
2026-07-30 19:34:04 +03:00
committed by GitHub
parent e1a1abb787
commit 47f686f53f
11 changed files with 42 additions and 50 deletions
+14
View File
@@ -1476,6 +1476,20 @@ std::string common_get_model_endpoint() {
return model_endpoint;
}
char * common_get_model_or_exit(int argc, char * argv[]) {
if (argc > 1) {
return argv[1];
}
char * path = getenv("LLAMACPP_TEST_MODELFILE");
if (!path || strlen(path) == 0) {
fprintf(stderr, "\033[33mWARNING: No model file provided. Skipping this test. Set LLAMACPP_TEST_MODELFILE=<gguf_model_path> to silence this warning and run this test.\n\033[0m");
exit(EXIT_SUCCESS);
}
return path;
}
common_context_seq_rm_type common_context_can_seq_rm(llama_context * ctx) {
auto * mem = llama_get_memory(ctx);
if (mem == nullptr) {