From 8556122e8dcc75849868b4a04a65a5a79224cc20 Mon Sep 17 00:00:00 2001 From: Anders Betts Date: Sun, 20 Sep 2026 09:39:52 +0200 Subject: tests: wire check, pty and sanitizer targets and document them --- Makefile | 21 ++++++++++++++++++--- 1 file changed, 18 insertions(+), 3 deletions(-) (limited to 'Makefile') diff --git a/Makefile b/Makefile index d67e92e..86a5ffe 100644 --- a/Makefile +++ b/Makefile @@ -52,13 +52,27 @@ $(BUILD)/test_tui: $(BUILD)/tests/test_tui.o $(BUILD)/clients/tui.o \ $(BUILD)/vendor/sha256.o $(CC) $(CFLAGS) -o $@ $^ -lm -lncursesw -test: $(BUILD)/test_core $(BUILD)/test_tui +test: check $(BUILD)/test_core $(BUILD)/test_tui $(BUILD)/test_core $(BUILD)/test_tui test-core: $(BUILD)/test_core $(BUILD)/test_core +check: + sh scripts/check-consistency.sh + +test-pty: all + python3 scripts/tui-golden.py + +SAN_CFLAGS = -O1 -g -fno-omit-frame-pointer + +test-asan: + $(MAKE) BUILD=build-asan CFLAGS="$(SAN_CFLAGS) -fsanitize=address" test-core + +test-ubsan: + $(MAKE) BUILD=build-ubsan CFLAGS="$(SAN_CFLAGS) -fsanitize=undefined" test-core + $(BUILD)/vendor/%.o: vendor/%.c @mkdir -p $(dir $@) $(CC) $(CFLAGS) $(DEPFLAGS) $(CPPFLAGS) $(DEFS) -w -c $< -o $@ @@ -87,6 +101,7 @@ install: all install -m 0644 data/bas_k2.csv data/bas_k3.csv $(DESTDIR)/usr/local/share/bokf/ clean: - rm -rf $(BUILD) + rm -rf $(BUILD) build-asan build-ubsan -.PHONY: all backend test test-core install clean +.PHONY: all backend test test-core test-pty check test-asan test-ubsan \ + install clean -- cgit v1.3