Commit 945ffb6e authored by Petr Špaček's avatar Petr Špaček

Move query name minimization into Makefile

From now on tests with and without query name minimization
can be executed in parallel by make.

Also, separate make targets will get handy for test coverage measurement.
parent 8cf7e63b
......@@ -19,7 +19,7 @@ ifeq (,$(findstring .rpl,$(TESTS)))
TARGETS := $(wildcard $(TESTS)/*.rpl)
endif
SOURCES := $(TARGETS)
TARGETS := $(sort $(patsubst %.rpl,%.out,$(SOURCES)))
TARGETS := $(sort $(patsubst %.rpl,%.out-qmin,$(SOURCES))) $(sort $(patsubst %.rpl,%.out-noqmin,$(SOURCES)))
# Dependencies
include platform.mk
......@@ -46,8 +46,13 @@ depend: $(libfaketime) $(libcwrap)
# Generic rule to run test
$(SOURCES): depend
%.out: %.rpl
@$(preload_syms) $(PYTHON) $(abspath ./deckard.py) $(OPTS) $< one $(DAEMON) $(TEMPLATE) $(CONFIG) -- $(ADDITIONAL)
%.out-qmin: %.rpl
@test "$${QMIN:-true}" == "true" || exit 0 && \
$(preload_syms) $(PYTHON) $(abspath ./deckard.py) --qmin true $(OPTS) $< one $(DAEMON) $(TEMPLATE) $(CONFIG) -- $(ADDITIONAL)
%.out-noqmin: %.rpl
@test "$${QMIN:-false}" == "false" || exit 0 && \
$(preload_syms) $(PYTHON) $(abspath ./deckard.py) --qmin false $(OPTS) $< one $(DAEMON) $(TEMPLATE) $(CONFIG) -- $(ADDITIONAL)
# Synchronize submodules
submodules: .gitmodules
......
......@@ -19,9 +19,4 @@ ADDITIONAL=${ADDITIONAL:-"-f 1"}
export TESTS DAEMON TEMPLATE CONFIG ADDITIONAL
MAKEDIR="$(dirname "$(readlink -f "$0")")"
echo '=== Testing WITH query minimization ==='
export QMIN="true"
make -C "${MAKEDIR}"
echo '=== Testing WITHOUT query minimization ==='
export QMIN="false"
make -C "${MAKEDIR}"
......@@ -20,9 +20,4 @@ ADDITIONAL=${ADDITIONAL:-"-d -c unbound.conf"}
export TESTS DAEMON TEMPLATE CONFIG ADDITIONAL
MAKEDIR="$(dirname "$(readlink -f "$0")")"
echo '=== Testing WITH query minimization ==='
export QMIN="true"
make -C "${MAKEDIR}"
echo '=== Testing WITHOUT query minimization ==='
export QMIN="false"
make -C "${MAKEDIR}"
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment