diff --git a/.gitignore b/.gitignore index 76b3d2861..7b1a9f9e3 100644 --- a/.gitignore +++ b/.gitignore @@ -86,19 +86,3 @@ examples/jeopardy/results.txt poetry.lock poetry.toml - -# Test binaries -/tests/test-grammar-parser -/tests/test-llama-grammar -/tests/test-double-float -/tests/test-grad0 -/tests/test-opt -/tests/test-quantize-fns -/tests/test-quantize-perf -/tests/test-sampling -/tests/test-tokenizer-0-llama -/tests/test-tokenizer-0-falcon -/tests/test-tokenizer-1-llama -/tests/test-tokenizer-1-bpe -/tests/test-rope -/tests/test-backend-ops diff --git a/tests/.gitignore b/tests/.gitignore new file mode 100644 index 000000000..59be43b99 --- /dev/null +++ b/tests/.gitignore @@ -0,0 +1,2 @@ +* +!*.* diff --git a/tests/test-model-load-cancel.cpp b/tests/test-model-load-cancel.cpp index cb3c012b9..926a305da 100644 --- a/tests/test-model-load-cancel.cpp +++ b/tests/test-model-load-cancel.cpp @@ -4,17 +4,17 @@ #include int main(void) { - auto model_path = "models/7B/ggml-model-f16.gguf"; - auto file = fopen(model_path, "r"); + const auto * model_path = "models/7B/ggml-model-f16.gguf"; + auto * file = fopen(model_path, "r"); if (file == nullptr) { fprintf(stderr, "no model at '%s' found\n", model_path); return EXIT_FAILURE; - } else { - fprintf(stderr, "using '%s'\n", model_path); - fclose(file); } + fprintf(stderr, "using '%s'\n", model_path); + fclose(file); + llama_backend_init(false); auto params = llama_model_params{}; params.use_mmap = false;