path = contrib/libfaketime
url = https://github.com/wolfcw/libfaketime.git
[submodule "tests/integration"]
- path = tests/integration
+ path = tests/deckard
url = https://gitlab.labs.nic.cz/knot/deckard.git
[submodule "contrib/libswrap"]
path = contrib/libswrap
# Config
-TESTS=tests/integration/sets/resolver
-TEMPLATE=template/kresd.j2
+deckard_DIR := tests/deckard
+deckard_BIN := $(deckard_DIR)/deckard.py
+TESTS := $(deckard_DIR)/sets/resolver
+TEMPLATE := template/kresd.j2
# Targets
-deckard_DIR := tests/integration
-deckard := $(libfaketime_DIR)/deckard.py
libfaketime_DIR := contrib/libfaketime
libfaketime := $(abspath $(libfaketime_DIR))/src/libfaketime$(LIBEXT).1
libswrap_DIR := contrib/libswrap
# Platform-specific targets
ifeq ($(PLATFORM),Darwin)
libfaketime := $(abspath $(libfaketime_DIR))/src/libfaketime.1$(LIBEXT)
- libswrap=$(abspath $(libswrap_cmake_DIR))/src/libsocket_wrapper.0$(LIBEXT)
+ libswrap := $(abspath $(libswrap_cmake_DIR))/src/libsocket_wrapper.0$(LIBEXT)
preload_syms := DYLD_FORCE_FLAT_NAMESPACE=1 DYLD_INSERT_LIBRARIES="$(libfaketime):$(libswrap)"
else
preload_syms := LD_PRELOAD="$(libfaketime):$(libswrap)"
endif
# Synchronize submodules
-$(deckard):
+$(deckard_BIN):
@git submodule update --init
$(libfaketime_DIR)/Makefile:
@git submodule update --init
@CFLAGS="-O2 -g" $(MAKE) -s -C $(libswrap_cmake_DIR)
deckard: check-integration
-check-integration: $(deckard) $(libswrap) $(libfaketime)
- @$(preload_LIBS) $(preload_syms) python tests/integration/deckard.py $(TESTS) $(abspath daemon/kresd) $(TEMPLATE) config
+check-integration: $(deckard_BIN) $(libswrap) $(libfaketime)
+ @$(preload_LIBS) $(preload_syms) python $(deckard_BIN) $(TESTS) $(abspath daemon/kresd) $(TEMPLATE) config
.PHONY: deckard check-integration