From 89cc7a333871bdfe92df345c653f4304547a76ac Mon Sep 17 00:00:00 2001 From: Alon Faraj Date: Tue, 29 Aug 2023 16:04:29 +0300 Subject: [PATCH] makefile: - add all - add test --- Makefile | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/Makefile b/Makefile index 02ba3e36d..535a76f7b 100644 --- a/Makefile +++ b/Makefile @@ -6,6 +6,26 @@ TEST_TARGETS = tests/test-llama-grammar tests/test-grammar-parser tests/test-dou default: $(BUILD_TARGETS) +test: + @echo "Running tests..." + @for test_target in $(TEST_TARGETS); do \ + if [ "$$test_target" = "tests/test-tokenizer-0-llama" ]; then \ + # ./$$test_target $(CURDIR)/../models/ggml-vocab-llama.gguf; \ + continue; \ + elif [ "$$test_target" = "tests/test-tokenizer-0-falcon" ]; then \ + # ./$$test_target $(CURDIR)/../models/ggml-vocab-llama.gguf; \ + continue; \ + elif [ "$$test_target" = "tests/test-tokenizer-1" ]; then \ + # ./$$test_target $(CURDIR)/../models/ggml-vocab-llama.gguf; \ + continue; \ + else \ + ./$$test_target; \ + fi; \ + done + @echo "All tests have been run." + +all: $(BUILD_TARGETS) $(TEST_TARGETS) + ifndef UNAME_S UNAME_S := $(shell uname -s) endif