From: Petr Špaček Date: Mon, 13 Nov 2017 12:55:29 +0000 (+0100) Subject: tests: check-config and check-integration require installed version X-Git-Tag: v1.5.1~24^2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=ffeb47df7abc6a51463f8f674d6a434da0a6713a;p=thirdparty%2Fknot-resolver.git tests: check-config and check-integration require installed version Path to module directory gets hardcoded into binaries so check-config and check-integration cannot work prior installation. To indicate this depedency, the target check-config was moved from "check" target to "installcheck". Deckard requires additional libraries so it is not included in installcheck. fixes: #272 --- diff --git a/tests/config/test_config.mk b/tests/config/test_config.mk index 65ba5eedb..86822f121 100644 --- a/tests/config/test_config.mk +++ b/tests/config/test_config.mk @@ -8,7 +8,7 @@ tests_lua := \ hints -check-config: +check-config: check-install-precond $(foreach test,$(tests_lua), \ @echo "config-test: $(test)" ;\ export TMP_RUNDIR=`mktemp -d` ;\ diff --git a/tests/tests.mk b/tests/tests.mk index 965510514..ff079f040 100644 --- a/tests/tests.mk +++ b/tests/tests.mk @@ -32,8 +32,11 @@ REAL_CURDIR=$(realpath $(CURDIR)) $(deckard_DIR)/Makefile: @git submodule update --init --recursive -check-integration: $(deckard_DIR)/Makefile - $(if $(findstring $(REAL_CURDIR),$(REAL_PREFIX)),, $(warning Warning: PREFIX does not point into source directory; testing the installed version!)) +check-install-precond: + $(if $(findstring $(REAL_CURDIR),$(REAL_PREFIX)),, $(warning Warning: PREFIX does not point into source directory; testing version in $(PREFIX)!)) + +# Deckard requires additional depedencies so it is not part of installcheck +check-integration: check-install-precond $(deckard_DIR)/Makefile $(if $(SUBMODULES_DIRTY), $(warning Warning: Git submodules are not up-to-date),) @mkdir -p $(deckard_DIR)/contrib/libswrap/obj +TESTS=$(TESTS) DAEMON=$(abspath $(SBINDIR)/kresd) TEMPLATE=$(TEMPLATE) $(preload_syms) $(deckard_DIR)/kresd_run.sh @@ -41,7 +44,10 @@ check-integration: $(deckard_DIR)/Makefile deckard: check-integration # Targets -tests: check-unit check-config +tests: check-unit +# installcheck requires kresd to be installed in its final destination +# (DESTDIR is not supported right now because module path gets hardcoded) +installcheck: check-config tests-clean: $(foreach test,$(tests_BIN),$(test)-clean) mock_cmodule-clean $(CLEAN_DNSTAP) -.PHONY: tests tests-clean check-integration deckard +.PHONY: check-integration deckard installcheck tests tests-clean