summaryrefslogtreecommitdiff
path: root/Mk/tests.mk
diff options
context:
space:
mode:
authorDirk Engling <erdgeist@erdgeist.org>2026-11-02 17:04:36 +0100
committerDirk Engling <erdgeist@erdgeist.org>2026-11-02 17:04:36 +0100
commit82a97066f842f34db2556673d421aa9290ffe757 (patch)
tree656ee9a78e605504fe089ee294b88e264e2246ab /Mk/tests.mk
parent3f3114921d643d347c8c9ad1e85de07d101c3e9f (diff)
Keep the build's own flags out of CFLAGS, CPPFLAGS, LDFLAGS and LDLIBS
Diffstat (limited to 'Mk/tests.mk')
-rw-r--r--Mk/tests.mk12
1 files changed, 6 insertions, 6 deletions
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)
11# A test binary is not a production binary, so it is built with the features 11# A test binary is not a production binary, so it is built with the features
12# the tests need to reach. 12# the tests need to reach.
13FEATURES_test=$(FEATURES) -DWANT_ACCESSLIST_BLACK -DWANT_SYNC_LIVE 13FEATURES_test=$(FEATURES) -DWANT_ACCESSLIST_BLACK -DWANT_SYNC_LIVE
14CFLAGS_test=$(CFLAGS) -I. -g -O1 $(FEATURES_test) 14CFLAGS_test=-I. -g -O1 $(CPPFLAGS) $(OT_CFLAGS) $(FEATURES_test)
15 15
16# clang over $(CC) because the two toolchains do not check the same things. 16# clang over $(CC) because the two toolchains do not check the same things.
17CC_sanitize?=clang 17CC_sanitize?=clang
18CFLAGS_sanitize=$(CFLAGS_test) -fsanitize=address,undefined -fno-omit-frame-pointer 18CFLAGS_sanitize=$(CFLAGS_test) -fsanitize=address,undefined -fno-omit-frame-pointer
19LDFLAGS_sanitize=$(LDFLAGS) -fsanitize=address,undefined 19LDFLAGS_sanitize=$(LINK) -fsanitize=address,undefined
20 20
21# Black box tests drive the real binary over the wire, so they cover the event 21# Black box tests drive the real binary over the wire, so they cover the event
22# loop and the parsers working together. The client timeout is cut right down 22# loop and the parsers working together. The client timeout is cut right down
@@ -24,10 +24,10 @@ LDFLAGS_sanitize=$(LDFLAGS) -fsanitize=address,undefined
24# mirrors these two numbers. 24# mirrors these two numbers.
25PYTHON?=python3 25PYTHON?=python3
26FEATURES_integration=$(FEATURES) -DWANT_IP_FROM_QUERY_STRING -DWANT_ACCESSLIST_BLACK -DWANT_DYNAMIC_ACCESSLIST -DWANT_KEEPALIVE -DOT_CLIENT_TIMEOUT=5 -DOT_CLIENT_TIMEOUT_CHECKINTERVAL=1 26FEATURES_integration=$(FEATURES) -DWANT_IP_FROM_QUERY_STRING -DWANT_ACCESSLIST_BLACK -DWANT_DYNAMIC_ACCESSLIST -DWANT_KEEPALIVE -DOT_CLIENT_TIMEOUT=5 -DOT_CLIENT_TIMEOUT_CHECKINTERVAL=1
27CFLAGS_integration=$(CFLAGS) $(OPTS_debug) $(FEATURES_integration) -fsanitize=address,undefined -fno-omit-frame-pointer 27CFLAGS_integration=$(OPTS_debug) $(CPPFLAGS) $(OT_CFLAGS) $(FEATURES_integration) -fsanitize=address,undefined -fno-omit-frame-pointer
28LDFLAGS_integration=$(LDFLAGS) -fsanitize=address,undefined 28LDFLAGS_integration=$(LINK) -fsanitize=address,undefined
29CFLAGS_tsan=$(CFLAGS) $(OPTS_debug) $(FEATURES_integration) -fsanitize=thread -fno-omit-frame-pointer 29CFLAGS_tsan=$(OPTS_debug) $(CPPFLAGS) $(OT_CFLAGS) $(FEATURES_integration) -fsanitize=thread -fno-omit-frame-pointer
30LDFLAGS_tsan=$(LDFLAGS) -fsanitize=thread 30LDFLAGS_tsan=$(LINK) -fsanitize=thread
31 31
32BINARIES+=$(TESTBIN) $(TESTBIN).poll $(TESTBIN).sanitize opentracker.integration opentracker.tsan 32BINARIES+=$(TESTBIN) $(TESTBIN).poll $(TESTBIN).sanitize opentracker.integration opentracker.tsan
33 33