Skip to content

Commit 6bba341

Browse files
committed
Simplify .gitignore for tests, clang-tidy fixes
1 parent fe6a6fb commit 6bba341

File tree

3 files changed

+7
-21
lines changed

3 files changed

+7
-21
lines changed

.gitignore

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -86,19 +86,3 @@ examples/jeopardy/results.txt
8686

8787
poetry.lock
8888
poetry.toml
89-
90-
# Test binaries
91-
/tests/test-grammar-parser
92-
/tests/test-llama-grammar
93-
/tests/test-double-float
94-
/tests/test-grad0
95-
/tests/test-opt
96-
/tests/test-quantize-fns
97-
/tests/test-quantize-perf
98-
/tests/test-sampling
99-
/tests/test-tokenizer-0-llama
100-
/tests/test-tokenizer-0-falcon
101-
/tests/test-tokenizer-1-llama
102-
/tests/test-tokenizer-1-bpe
103-
/tests/test-rope
104-
/tests/test-backend-ops

tests/.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
*
2+
!*.*

tests/test-model-load-cancel.cpp

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,17 +4,17 @@
44
#include <cstdlib>
55

66
int main(void) {
7-
auto model_path = "models/7B/ggml-model-f16.gguf";
8-
auto file = fopen(model_path, "r");
7+
const auto * model_path = "models/7B/ggml-model-f16.gguf";
8+
auto * file = fopen(model_path, "r");
99

1010
if (file == nullptr) {
1111
fprintf(stderr, "no model at '%s' found\n", model_path);
1212
return EXIT_FAILURE;
13-
} else {
14-
fprintf(stderr, "using '%s'\n", model_path);
15-
fclose(file);
1613
}
1714

15+
fprintf(stderr, "using '%s'\n", model_path);
16+
fclose(file);
17+
1818
llama_backend_init(false);
1919
auto params = llama_model_params{};
2020
params.use_mmap = false;

0 commit comments

Comments
 (0)