summaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorDirk Engling <erdgeist@erdgeist.org>2026-10-26 23:08:23 +0100
committerDirk Engling <erdgeist@erdgeist.org>2026-10-26 23:08:23 +0100
commit687ef7fece04fb5dffa90b5d784fb1e34066c85a (patch)
treefb103f637c1294ea356c2e94854a316352403418 /Makefile
parent1f9494979268b62ed4b4588fb7d9e790c0e12100 (diff)
Add integration test and its runner
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile19
1 files changed, 17 insertions, 2 deletions
diff --git a/Makefile b/Makefile
index a884c2c..d5c72cc 100644
--- a/Makefile
+++ b/Makefile
@@ -134,10 +134,25 @@ $(TESTBIN): $(TEST_SOURCES) $(TEST_UNITS) $(TEST_HEADERS)
134check: $(TESTBIN) $(BINARY) 134check: $(TESTBIN) $(BINARY)
135 ./$(TESTBIN) 135 ./$(TESTBIN)
136 136
137.PHONY: all check clean install 137# Black box tests: these drive the real binary over the wire, so they cover
138# the event loop and the parsers working together, which the unit tests
139# cannot reach. Built with the sanitizers on, so the tracker reports its own
140# memory errors and the harness turns those into failures.
141PYTHON?=python3
142FEATURES_integration=$(FEATURES) -DWANT_IP_FROM_QUERY_STRING
143CFLAGS_integration=$(CFLAGS) $(OPTS_debug) $(FEATURES_integration) -fsanitize=address,undefined -fno-omit-frame-pointer
144LDFLAGS_integration=$(LDFLAGS) -fsanitize=address,undefined
145
146opentracker.integration: $(SOURCES) $(HEADERS)
147 $(CC) -o $@ $(CFLAGS_integration) $(SOURCES) $(LDFLAGS_integration) -lz
148
149check-integration: opentracker.integration
150 OPENTRACKER=./opentracker.integration $(PYTHON) -m unittest discover -s tests/integration
151
152.PHONY: all check check-integration clean install
138 153
139clean: 154clean:
140 rm -rf opentracker opentracker.debug proxy proxy.debug $(TESTBIN) *.o *~ 155 rm -rf opentracker opentracker.debug opentracker.integration proxy proxy.debug $(TESTBIN) *.o *~
141 156
142install: 157install:
143 install -m 755 opentracker $(DESTDIR)$(BINDIR) 158 install -m 755 opentracker $(DESTDIR)$(BINDIR)