aboutsummaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorAnders Betts <anders.betts@gmail.com>2026-09-20 09:39:52 +0200
committerAnders Betts <anders.betts@gmail.com>2026-09-20 09:39:52 +0200
commit8556122e8dcc75849868b4a04a65a5a79224cc20 (patch)
tree97d9e59d99d0d749e6faa2c538cdfe570fdcfe96 /Makefile
parent6a06fd7a7afc5932e20410ba591475a13e2db51d (diff)
downloadbokf-8556122e8dcc75849868b4a04a65a5a79224cc20.tar.gz
bokf-8556122e8dcc75849868b4a04a65a5a79224cc20.zip
tests: wire check, pty and sanitizer targets and document them
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile21
1 files changed, 18 insertions, 3 deletions
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