diff --git a/test/lib/env/memory/Makefile b/test/lib/env/memory/Makefile index 2c02b0d45..c121489cf 100644 --- a/test/lib/env/memory/Makefile +++ b/test/lib/env/memory/Makefile @@ -36,22 +36,7 @@ include $(SPDK_ROOT_DIR)/mk/spdk.common.mk include $(SPDK_ROOT_DIR)/mk/spdk.app.mk CFLAGS += $(ENV_CFLAGS) -CFLAGS += -I$(SPDK_ROOT_DIR)/test CFLAGS += -I$(SPDK_ROOT_DIR)/test/lib -CFLAGS += -I$(SPDK_ROOT_DIR)/lib/env_dpdk -APP = memory_ut -C_SRCS := memory_ut.c +TEST_FILE = memory_ut.c -SPDK_LIB_LIST = util - -LIBS += $(SPDK_LIB_LINKER_ARGS) -lcunit - -all : $(APP) - -$(APP) : $(OBJS) $(SPDK_LIB_FILES) - $(LINK_C) - -clean : - $(CLEAN_C) $(APP) - -include $(SPDK_ROOT_DIR)/mk/spdk.deps.mk +include $(SPDK_ROOT_DIR)/mk/spdk.unittest.mk diff --git a/test/lib/env/memory/memory_ut.c b/test/lib/env/memory/memory_ut.c index f855944ce..bef6d57ca 100644 --- a/test/lib/env/memory/memory_ut.c +++ b/test/lib/env/memory/memory_ut.c @@ -31,7 +31,7 @@ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -#include "memory.c" +#include "env_dpdk/memory.c" #include "test_env.c" #include "spdk_cunit.h" diff --git a/test/lib/env/pci/Makefile b/test/lib/env/pci/Makefile index dde3fb5e3..a0fa4ee66 100644 --- a/test/lib/env/pci/Makefile +++ b/test/lib/env/pci/Makefile @@ -35,18 +35,8 @@ SPDK_ROOT_DIR := $(abspath $(CURDIR)/../../../..) include $(SPDK_ROOT_DIR)/mk/spdk.common.mk include $(SPDK_ROOT_DIR)/mk/spdk.app.mk -APP = pci_ut +CFLAGS += $(ENV_CFLAGS) +LIBS += $(ENV_LINKER_ARGS) +TEST_FILE = pci_ut.c -C_SRCS = pci_ut.c - -LIBS += $(ENV_LINKER_ARGS) -lcunit - -all: $(APP) - -$(APP): $(OBJS) $(ENV_LIBS) - $(LINK_C) - -clean: - $(CLEAN_C) $(APP) - -include $(SPDK_ROOT_DIR)/mk/spdk.deps.mk +include $(SPDK_ROOT_DIR)/mk/spdk.unittest.mk diff --git a/test/lib/env/pci/pci_ut.c b/test/lib/env/pci/pci_ut.c index 873f67aed..bdb3a7cc0 100644 --- a/test/lib/env/pci/pci_ut.c +++ b/test/lib/env/pci/pci_ut.c @@ -33,10 +33,10 @@ #include "spdk/stdinc.h" -#include "spdk/env.h" - #include "CUnit/Basic.h" +#include "env_dpdk/pci.c" + static void pci_test(void) { diff --git a/test/lib/env/vtophys/Makefile b/test/lib/env/vtophys/Makefile index bd414ff8c..2f0d13ae4 100644 --- a/test/lib/env/vtophys/Makefile +++ b/test/lib/env/vtophys/Makefile @@ -35,18 +35,7 @@ SPDK_ROOT_DIR := $(abspath $(CURDIR)/../../../..) include $(SPDK_ROOT_DIR)/mk/spdk.common.mk include $(SPDK_ROOT_DIR)/mk/spdk.app.mk -APP = vtophys +LIBS += $(ENV_LINKER_ARGS) +TEST_FILE = vtophys.c -C_SRCS = vtophys.c - -LIBS += $(SPDK_LIBS) $(ENV_LINKER_ARGS) - -all: $(APP) - -$(APP): $(OBJS) $(SPDK_LIBS) $(ENV_LIBS) - $(LINK_C) - -clean: - $(CLEAN_C) $(APP) - -include $(SPDK_ROOT_DIR)/mk/spdk.deps.mk +include $(SPDK_ROOT_DIR)/mk/spdk.unittest.mk