Skip to content
Snippets Groups Projects
Commit 7e5d2126 authored by Marek Vavruša's avatar Marek Vavruša
Browse files

tests: unit tests don't require preloaded libs

parent ad0c0564
Branches
Tags
No related merge requests found
......@@ -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
# 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
......
......@@ -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
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment