From df5557705764d5e8f904a31d549fc037f5b1cf47 Mon Sep 17 00:00:00 2001 From: Dirk Engling Date: Tue, 27 Oct 2026 19:06:20 +0100 Subject: While we're at it with the dynamic analyzers, add a tsan --- Makefile | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index d16e220..1a8912b 100644 --- a/Makefile +++ b/Makefile @@ -162,15 +162,26 @@ opentracker.integration: $(SOURCES) $(HEADERS) check-integration: opentracker.integration OPENTRACKER=./opentracker.integration $(PYTHON) -m unittest discover -s tests/integration +# The same black box tests against a ThreadSanitizer build +CFLAGS_tsan=$(CFLAGS) $(OPTS_debug) $(FEATURES_integration) -fsanitize=thread -fno-omit-frame-pointer +LDFLAGS_tsan=$(LDFLAGS) -fsanitize=thread + +opentracker.tsan: $(SOURCES) $(HEADERS) + $(CC) -o $@ $(CFLAGS_tsan) $(SOURCES) $(LDFLAGS_tsan) + +check-tsan: opentracker.tsan + OPENTRACKER=./opentracker.tsan $(PYTHON) -m unittest discover -s tests/integration + # Everything, cheapest first, so a quick failure comes back quickly. check-all: $(MAKE) check $(MAKE) check-sanitize $(MAKE) check-integration + $(MAKE) check-tsan -.PHONY: all check check-sanitize check-integration check-all clean install +.PHONY: all check check-sanitize check-integration check-tsan check-all clean install -BINARIES=opentracker opentracker.debug opentracker.integration proxy proxy.debug $(TESTBIN) $(TESTBIN).sanitize +BINARIES=opentracker opentracker.debug opentracker.integration opentracker.tsan proxy proxy.debug $(TESTBIN) $(TESTBIN).sanitize clean: rm -rf $(BINARIES) $(BINARIES:=.dSYM) *.o *~ -- cgit v1.3