File tree Expand file tree Collapse file tree 1 file changed +16
-5
lines changed Expand file tree Collapse file tree 1 file changed +16
-5
lines changed Original file line number Diff line number Diff line change @@ -42,20 +42,31 @@ endif
4242
4343default : $(BUILD_TARGETS )
4444
45- test :
46- @echo " Running tests... "
47- @ for test_target in $(TEST_TARGETS ) ; do \
45+ test : $( TEST_TARGETS )
46+ @failures=0 ; \
47+ for test_target in $( TEST_TARGETS) ; do \
4848 if [ " $$ test_target" = " tests/test-tokenizer-0-llama" ]; then \
4949 ./$$ test_target $(CURDIR ) /models/ggml-vocab-llama.gguf; \
5050 elif [ " $$ test_target" = " tests/test-tokenizer-0-falcon" ]; then \
5151 continue ; \
5252 elif [ " $$ test_target" = " tests/test-tokenizer-1" ]; then \
5353 continue ; \
5454 else \
55+ echo " Running test $$ test_target..." ; \
5556 ./$$ test_target; \
5657 fi ; \
57- done
58- @echo " All tests have been run."
58+ if [ $$ ? -ne 0 ]; then \
59+ printf ' Test $$test_target FAILED!\n\n' $$ test_target; \
60+ failures=$$(( failures + 1 ) ); \
61+ else \
62+ printf ' Test %s passed.\n\n' $$ test_target; \
63+ fi ; \
64+ done ; \
65+ if [ $$ failures -gt 0 ]; then \
66+ printf ' \n%s tests failed.\n' $$ failures; \
67+ exit 1; \
68+ fi
69+ @echo ' All tests passed.'
5970
6071all : $(BUILD_TARGETS ) $(TEST_TARGETS )
6172
You can’t perform that action at this time.
0 commit comments