From 2c57c8df0c4f7ced778eb22bede8a387e2b2a718 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Petr=20=C5=A0pa=C4=8Dek?= Date: Tue, 28 Feb 2017 17:27:36 +0100 Subject: [PATCH] tests: print warning if check-integration is executed with PREFIX outside of source directory --- tests/tests.mk | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/tests/tests.mk b/tests/tests.mk index 85a9a1323..952444013 100644 --- a/tests/tests.mk +++ b/tests/tests.mk @@ -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 -- 2.47.3