From 4a7240a7f54e505ea40a0109ab31c2bf1d10d2a3 Mon Sep 17 00:00:00 2001 From: Vitaliy Mysak Date: Sun, 16 Sep 2018 01:07:44 +0000 Subject: [PATCH] make: Fix test app Makefile dependencies Add dependency $(ENV_LIBS) for test/env/* as part of new variable $(ADDITIONAL_LIBS) which is direct dependency of $(APP) in mk/spdk.unittest.mk This solves the problem of make not triggering LINKing for test/env/* after changes made to lib/env_dpdk/*.c Issue was that Makefiles in test/env/*/ classified tests as unittests by including mk/spdk.unittest.mk But unittests are not using env_dpdk which means that unittests don't relink on env_dpdk update Change-Id: I91b6690dc92d68bc69bbf11ac5336d3a7f56e4e4 Signed-off-by: Vitaliy Mysak Reviewed-on: https://review.gerrithub.io/425665 Chandler-Test-Pool: SPDK Automated Test System Tested-by: SPDK CI Jenkins Reviewed-by: Dariusz Stojaczyk Reviewed-by: Jim Harris Reviewed-by: Shuhei Matsumoto --- mk/spdk.unittest.mk | 2 +- test/env/memory/Makefile | 1 + test/env/pci/Makefile | 1 + test/env/vtophys/Makefile | 1 + 4 files changed, 4 insertions(+), 1 deletion(-) diff --git a/mk/spdk.unittest.mk b/mk/spdk.unittest.mk index 38c4815d1..594f6d564 100644 --- a/mk/spdk.unittest.mk +++ b/mk/spdk.unittest.mk @@ -49,7 +49,7 @@ APP = $(TEST_FILE:.c=) all: $(APP) @: -$(APP) : $(OBJS) $(SPDK_LIB_FILES) +$(APP) : $(OBJS) $(SPDK_LIB_FILES) $(ADDITIONAL_LIBS) $(LINK_C) clean: diff --git a/test/env/memory/Makefile b/test/env/memory/Makefile index 1a9b208df..b6fb88e0e 100644 --- a/test/env/memory/Makefile +++ b/test/env/memory/Makefile @@ -39,4 +39,5 @@ CFLAGS += $(ENV_CFLAGS) CFLAGS += -I$(SPDK_ROOT_DIR)/test/lib TEST_FILE = memory_ut.c +ADDITIONAL_LIBS += $(ENV_LIBS) include $(SPDK_ROOT_DIR)/mk/spdk.unittest.mk diff --git a/test/env/pci/Makefile b/test/env/pci/Makefile index e41c7fd33..341655845 100644 --- a/test/env/pci/Makefile +++ b/test/env/pci/Makefile @@ -39,4 +39,5 @@ CFLAGS += $(ENV_CFLAGS) LIBS += $(ENV_LINKER_ARGS) TEST_FILE = pci_ut.c +ADDITIONAL_LIBS += $(ENV_LIBS) include $(SPDK_ROOT_DIR)/mk/spdk.unittest.mk diff --git a/test/env/vtophys/Makefile b/test/env/vtophys/Makefile index b3553b6ca..7dc4d0053 100644 --- a/test/env/vtophys/Makefile +++ b/test/env/vtophys/Makefile @@ -38,4 +38,5 @@ include $(SPDK_ROOT_DIR)/mk/spdk.app.mk LIBS += $(ENV_LINKER_ARGS) TEST_FILE = vtophys.c +ADDITIONAL_LIBS += $(ENV_LIBS) include $(SPDK_ROOT_DIR)/mk/spdk.unittest.mk