diff options
| author | Onur Gündüz <ogunduz@gmail.com> | 2026-06-10 14:32:11 +0200 |
|---|---|---|
| committer | Onur Gündüz <ogunduz@gmail.com> | 2026-06-14 08:27:03 +0200 |
| commit | 3f6853a7cb8fc766fea72611779915915e912501 (patch) | |
| tree | 96dc47713376fc44c1e9d16de55444309f2abb4e /Makefile | |
| parent | 4723631fe34e7aae4e9def3aeb0c923de2a50cf8 (diff) | |
| download | ffwd-3f6853a7cb8fc766fea72611779915915e912501.tar.gz ffwd-3f6853a7cb8fc766fea72611779915915e912501.zip | |
tests: cover the late-interaction API and the CLI binary
Diffstat (limited to 'Makefile')
| -rw-r--r-- | Makefile | 22 |
1 files changed, 21 insertions, 1 deletions
@@ -167,9 +167,14 @@ TEST_BF16_SRCS = tests/test_bf16_model.c embed.c qwen_safetensors.c \ $(KERNEL_SRCS) TEST_WORKSPACE_SRCS = tests/test_workspace.c embed.c qwen_tokenizer.c \ qwen_safetensors.c $(KERNEL_SRCS) +TEST_LATE_SRCS = tests/test_late.c embed.c qwen_tokenizer.c \ + qwen_safetensors.c $(KERNEL_SRCS) TEST_SERVER_SRCS = tests/test_server.c embed.c embed_distributed.c \ qwen_tokenizer.c qwen_safetensors.c $(KERNEL_SRCS) \ deps/ae/ae.c deps/ae/anet.c deps/ae/monotonic.c +# The CLI check builds the real CLI (CPU backend) plus a driver that runs it. +TEST_CLI_BIN_SRCS = embed_cli.c embed.c embed_distributed.c \ + qwen_tokenizer.c qwen_safetensors.c $(KERNEL_SRCS) test: $(CC) $(TEST_CC_FLAGS) -o tests/test_kernels_generic \ @@ -189,6 +194,13 @@ test: $(CC) $(TEST_CC_FLAGS) -o tests/test_workspace \ $(TEST_WORKSPACE_SRCS) -lm -lpthread ./tests/test_workspace + $(CC) $(TEST_CC_FLAGS) $(TEST_BLAS_CFLAGS) -o tests/test_late \ + $(TEST_LATE_SRCS) -lm -lpthread $(TEST_BLAS_LDFLAGS) + ./tests/test_late + $(CC) $(TEST_CC_FLAGS) $(TEST_BLAS_CFLAGS) -o tests/cli_under_test \ + $(TEST_CLI_BIN_SRCS) -lm -lpthread $(TEST_BLAS_LDFLAGS) + $(CC) $(TEST_CC_FLAGS) -o tests/test_cli tests/test_cli.c + ./tests/test_cli ./tests/cli_under_test $(CC) $(TEST_CC_FLAGS) $(TEST_BLAS_CFLAGS) $(CJSON_CFLAGS) -Ideps/ae \ -o tests/test_server $(TEST_SERVER_SRCS) \ -lm -lpthread $(TEST_BLAS_LDFLAGS) $(CJSON_LDFLAGS) @@ -207,7 +219,8 @@ COV_FLAGS = -fprofile-instr-generate -fcoverage-mapping -O0 \ -fcoverage-compilation-dir=. COV_BINS = tests/test_kernels_generic tests/test_kernels_blas \ tests/test_tokenizer tests/test_safetensors \ - tests/test_bf16_model tests/test_workspace tests/test_server + tests/test_bf16_model tests/test_workspace tests/test_late \ + tests/cli_under_test tests/test_server # Report on project sources only - not the harnesses, vendored deps, or # system headers (cJSON lands under /opt or /usr otherwise). COV_IGNORE = -ignore-filename-regex='deps/|tests/|/opt/|/usr/' @@ -239,6 +252,13 @@ coverage: $(CC) $(TEST_CC_FLAGS) $(COV_FLAGS) -o tests/test_workspace \ $(TEST_WORKSPACE_SRCS) -lm -lpthread LLVM_PROFILE_FILE=$(COV_DIR)/workspace.profraw ./tests/test_workspace + $(CC) $(TEST_CC_FLAGS) $(COV_FLAGS) $(TEST_BLAS_CFLAGS) -o tests/test_late \ + $(TEST_LATE_SRCS) -lm -lpthread $(TEST_BLAS_LDFLAGS) + LLVM_PROFILE_FILE=$(COV_DIR)/late.profraw ./tests/test_late + $(CC) $(TEST_CC_FLAGS) $(COV_FLAGS) $(TEST_BLAS_CFLAGS) -o tests/cli_under_test \ + $(TEST_CLI_BIN_SRCS) -lm -lpthread $(TEST_BLAS_LDFLAGS) + $(CC) $(TEST_CC_FLAGS) -o tests/test_cli tests/test_cli.c + LLVM_PROFILE_FILE=$(COV_DIR)/cli_%p.profraw ./tests/test_cli ./tests/cli_under_test $(CC) $(TEST_CC_FLAGS) $(COV_FLAGS) $(TEST_BLAS_CFLAGS) $(CJSON_CFLAGS) -Ideps/ae \ -o tests/test_server $(TEST_SERVER_SRCS) \ -lm -lpthread $(TEST_BLAS_LDFLAGS) $(CJSON_LDFLAGS) |
