File tree Expand file tree Collapse file tree 1 file changed +12
-4
lines changed Expand file tree Collapse file tree 1 file changed +12
-4
lines changed Original file line number Diff line number Diff line change 42
42
43
43
default : $(BUILD_TARGETS )
44
44
45
- test :
45
+ test : $( TEST_TARGETS )
46
46
@echo " Running tests..."
47
- @for test_target in $(TEST_TARGETS ) ; do \
47
+ @failures=0; \
48
+ for test_target in $( TEST_TARGETS) ; do \
48
49
if [ " $$ test_target" = " tests/test-tokenizer-0-llama" ]; then \
49
50
./$$ test_target $(CURDIR ) /models/ggml-vocab-llama.gguf; \
50
51
elif [ " $$ test_target" = " tests/test-tokenizer-0-falcon" ]; then \
54
55
else \
55
56
./$$ test_target; \
56
57
fi ; \
57
- done
58
- @echo " All tests have been run."
58
+ if [ $$ ? -ne 0 ]; then \
59
+ failures=$$(( failures + 1 ) ); \
60
+ fi ; \
61
+ done ; \
62
+ if [ $$ failures -gt 0 ]; then \
63
+ printf ' \n%%s tests failed.\n' $$ failures; \
64
+ exit 1; \
65
+ fi
66
+ @printf ' \nAll tests passed.\n'
59
67
60
68
all : $(BUILD_TARGETS ) $(TEST_TARGETS )
61
69
You can’t perform that action at this time.
0 commit comments