From 82a97066f842f34db2556673d421aa9290ffe757 Mon Sep 17 00:00:00 2001 From: Dirk Engling Date: Mon, 2 Nov 2026 17:04:36 +0100 Subject: Keep the build's own flags out of CFLAGS, CPPFLAGS, LDFLAGS and LDLIBS --- Mk/tests.mk | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'Mk/tests.mk') diff --git a/Mk/tests.mk b/Mk/tests.mk index d542044..8e63839 100644 --- a/Mk/tests.mk +++ b/Mk/tests.mk @@ -11,12 +11,12 @@ TEST_HEADERS=tests/test.h $(HEADERS) # A test binary is not a production binary, so it is built with the features # the tests need to reach. FEATURES_test=$(FEATURES) -DWANT_ACCESSLIST_BLACK -DWANT_SYNC_LIVE -CFLAGS_test=$(CFLAGS) -I. -g -O1 $(FEATURES_test) +CFLAGS_test=-I. -g -O1 $(CPPFLAGS) $(OT_CFLAGS) $(FEATURES_test) # clang over $(CC) because the two toolchains do not check the same things. CC_sanitize?=clang CFLAGS_sanitize=$(CFLAGS_test) -fsanitize=address,undefined -fno-omit-frame-pointer -LDFLAGS_sanitize=$(LDFLAGS) -fsanitize=address,undefined +LDFLAGS_sanitize=$(LINK) -fsanitize=address,undefined # Black box tests drive the real binary over the wire, so they cover the event # loop and the parsers working together. The client timeout is cut right down @@ -24,10 +24,10 @@ LDFLAGS_sanitize=$(LDFLAGS) -fsanitize=address,undefined # mirrors these two numbers. PYTHON?=python3 FEATURES_integration=$(FEATURES) -DWANT_IP_FROM_QUERY_STRING -DWANT_ACCESSLIST_BLACK -DWANT_DYNAMIC_ACCESSLIST -DWANT_KEEPALIVE -DOT_CLIENT_TIMEOUT=5 -DOT_CLIENT_TIMEOUT_CHECKINTERVAL=1 -CFLAGS_integration=$(CFLAGS) $(OPTS_debug) $(FEATURES_integration) -fsanitize=address,undefined -fno-omit-frame-pointer -LDFLAGS_integration=$(LDFLAGS) -fsanitize=address,undefined -CFLAGS_tsan=$(CFLAGS) $(OPTS_debug) $(FEATURES_integration) -fsanitize=thread -fno-omit-frame-pointer -LDFLAGS_tsan=$(LDFLAGS) -fsanitize=thread +CFLAGS_integration=$(OPTS_debug) $(CPPFLAGS) $(OT_CFLAGS) $(FEATURES_integration) -fsanitize=address,undefined -fno-omit-frame-pointer +LDFLAGS_integration=$(LINK) -fsanitize=address,undefined +CFLAGS_tsan=$(OPTS_debug) $(CPPFLAGS) $(OT_CFLAGS) $(FEATURES_integration) -fsanitize=thread -fno-omit-frame-pointer +LDFLAGS_tsan=$(LINK) -fsanitize=thread BINARIES+=$(TESTBIN) $(TESTBIN).poll $(TESTBIN).sanitize opentracker.integration opentracker.tsan -- cgit v1.3