]> git.ipfire.org Git - thirdparty/knot-resolver.git/commitdiff
tests: print warning if check-integration is executed with PREFIX outside of source...
authorPetr Špaček <petr.spacek@nic.cz>
Tue, 28 Feb 2017 16:27:36 +0000 (17:27 +0100)
committerPetr Špaček <petr.spacek@nic.cz>
Tue, 28 Feb 2017 16:27:36 +0000 (17:27 +0100)
tests/tests.mk

index 85a9a1323e1c2ffeee2c65690655449a153956d5..95244401357c8e0f45ced27731598c01919e3a8f 100644 (file)
@@ -9,12 +9,18 @@ endif
 deckard_DIR := tests/deckard
 TESTS := sets/resolver
 TEMPLATE := template/kresd.j2
+
+REAL_PREFIX=$(realpath $(PREFIX))
+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!))
        @mkdir -p $(deckard_DIR)/contrib/libswrap/obj
-       +TESTS=$(TESTS) DAEMON=$(abspath daemon/kresd) TEMPLATE=$(TEMPLATE) $(preload_syms) $(deckard_DIR)/kresd_run.sh
+       +TESTS=$(TESTS) DAEMON=$(abspath $(SBINDIR)/kresd) TEMPLATE=$(TEMPLATE) $(preload_syms) $(deckard_DIR)/kresd_run.sh
+
 deckard: check-integration
 
 # Targets