diff options
| author | Dirk Engling <erdgeist@erdgeist.org> | 2026-10-26 23:08:23 +0100 |
|---|---|---|
| committer | Dirk Engling <erdgeist@erdgeist.org> | 2026-10-26 23:08:23 +0100 |
| commit | 687ef7fece04fb5dffa90b5d784fb1e34066c85a (patch) | |
| tree | fb103f637c1294ea356c2e94854a316352403418 /Makefile | |
| parent | 1f9494979268b62ed4b4588fb7d9e790c0e12100 (diff) | |
Add integration test and its runner
Diffstat (limited to 'Makefile')
| -rw-r--r-- | Makefile | 19 |
1 files changed, 17 insertions, 2 deletions
| @@ -134,10 +134,25 @@ $(TESTBIN): $(TEST_SOURCES) $(TEST_UNITS) $(TEST_HEADERS) | |||
| 134 | check: $(TESTBIN) $(BINARY) | 134 | check: $(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. | ||
| 141 | PYTHON?=python3 | ||
| 142 | FEATURES_integration=$(FEATURES) -DWANT_IP_FROM_QUERY_STRING | ||
| 143 | CFLAGS_integration=$(CFLAGS) $(OPTS_debug) $(FEATURES_integration) -fsanitize=address,undefined -fno-omit-frame-pointer | ||
| 144 | LDFLAGS_integration=$(LDFLAGS) -fsanitize=address,undefined | ||
| 145 | |||
| 146 | opentracker.integration: $(SOURCES) $(HEADERS) | ||
| 147 | $(CC) -o $@ $(CFLAGS_integration) $(SOURCES) $(LDFLAGS_integration) -lz | ||
| 148 | |||
| 149 | check-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 | ||
| 139 | clean: | 154 | clean: |
| 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 | ||
| 142 | install: | 157 | install: |
| 143 | install -m 755 opentracker $(DESTDIR)$(BINDIR) | 158 | install -m 755 opentracker $(DESTDIR)$(BINDIR) |
