]> git.ipfire.org Git - thirdparty/knot-resolver.git/commitdiff
tests: unit tests don't require preloaded libs
authorMarek Vavruša <marek.vavrusa@nic.cz>
Mon, 14 Sep 2015 13:25:21 +0000 (15:25 +0200)
committerMarek Vavruša <marek.vavrusa@nic.cz>
Mon, 14 Sep 2015 13:25:21 +0000 (15:25 +0200)
tests/integration.mk
tests/tests.mk
tests/unit.mk

index 7c9307b6322cacb286e323343775e7d65f176ed4..685951244fcde8e126cb517827d73182c3130a7c 100644 (file)
@@ -27,6 +27,6 @@ $(libfaketime): $(libfaketime_DIR)/Makefile
        @CFLAGS="" $(MAKE) -C $(libfaketime_DIR)
 
 check-integration: $(libfaketime)
-       $(preload_LIBS) $(preload_syms) tests/test_integration.py $(TESTS) $(abspath daemon/kresd) ./kresd.j2 config
+       @$(preload_LIBS) $(preload_syms) tests/test_integration.py $(TESTS) $(abspath daemon/kresd) ./kresd.j2 config
 
 .PHONY: check-integration
index 870f749ba21236f19aa81ae81696936bd522511c..b0fe33b9ad2889de43ebc2fb2656b4b75a866b9c 100644 (file)
@@ -1,10 +1,10 @@
 # Preload libraries
 preload_PATH := $(abspath contrib/libfaketime/src)
 ifeq ($(PLATFORM),Darwin)
-       preload_LIBS := @DYLD_FORCE_FLAT_NAMESPACE=1 \
+       preload_LIBS := DYLD_FORCE_FLAT_NAMESPACE=1 \
                        DYLD_LIBRARY_PATH="$(preload_PATH):${DYLD_LIBRARY_PATH}"
 else
-       preload_LIBS := @LD_LIBRARY_PATH="$(preload_PATH):${LD_LIBRARY_PATH}"
+       preload_LIBS := LD_LIBRARY_PATH="$(preload_PATH):${LD_LIBRARY_PATH}"
 endif
 
 # Unit tests
index 3b69799d66cd901e1f588a2e11acb36cd3bd46cf..ade5a2027f334446f77ddbba86eea8e02dbe22ad 100644 (file)
@@ -30,13 +30,13 @@ $(1)_SOURCES := tests/$(1).c
 $(1)_LIBS := $(tests_LIBS)
 $(1)_DEPEND := $(tests_DEPEND)
 $(call make_bin,$(1),tests)
-$(1)-run: $$($(1))
-       $(call preload_LIBS) $$<
-.PHONY: $(1)-run
+$(1): $$($(1))
+       @$$<
+.PHONY: $(1)
 endef
 
 # Targets
 $(foreach test,$(tests_BIN),$(eval $(call make_test,$(test))))
-check-unit: $(foreach test,$(tests_BIN),$(test)-run)
+check-unit: $(foreach test,$(tests_BIN),$(test))
 
 .PHONY: check-unit