From 304bed6da0b3fb3c679863101c101b817c20de78 Mon Sep 17 00:00:00 2001 From: Jim Harris Date: Tue, 13 Feb 2018 20:16:20 -0700 Subject: [PATCH] test: use spdk.unittest.mk for blobfs unit tests Signed-off-by: Jim Harris Change-Id: Ie8ddb2a04162a74c8fd778f4e5260536d3aa4335 Reviewed-on: https://review.gerrithub.io/399921 Reviewed-by: Daniel Verkamp Tested-by: SPDK Automated Test System --- test/lib/blobfs/blobfs_async_ut/Makefile | 21 +++---------------- .../blobfs/blobfs_async_ut/blobfs_async_ut.c | 4 ++-- test/lib/blobfs/blobfs_sync_ut/Makefile | 21 +++---------------- .../blobfs/blobfs_sync_ut/blobfs_sync_ut.c | 4 ++-- 4 files changed, 10 insertions(+), 40 deletions(-) diff --git a/test/lib/blobfs/blobfs_async_ut/Makefile b/test/lib/blobfs/blobfs_async_ut/Makefile index 934b907ad..2114c0d8a 100644 --- a/test/lib/blobfs/blobfs_async_ut/Makefile +++ b/test/lib/blobfs/blobfs_async_ut/Makefile @@ -35,22 +35,7 @@ SPDK_ROOT_DIR := $(abspath $(CURDIR)/../../../..) include $(SPDK_ROOT_DIR)/mk/spdk.common.mk include $(SPDK_ROOT_DIR)/mk/spdk.app.mk -APP = blobfs_async_ut +SPDK_LIB_LIST = blob +TEST_FILE = blobfs_async_ut.c -C_SRCS := blobfs_async_ut.c -CFLAGS += -I$(SPDK_ROOT_DIR)/lib/blobfs -I$(SPDK_ROOT_DIR)/lib/blob -CFLAGS += -I$(SPDK_ROOT_DIR)/test - -SPDK_LIB_LIST = blob log 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/blobfs/blobfs_async_ut/blobfs_async_ut.c b/test/lib/blobfs/blobfs_async_ut/blobfs_async_ut.c index 5f57f40cd..aa78f3b33 100644 --- a/test/lib/blobfs/blobfs_async_ut/blobfs_async_ut.c +++ b/test/lib/blobfs/blobfs_async_ut/blobfs_async_ut.c @@ -38,8 +38,8 @@ #include "lib/test_env.c" #include "spdk_cunit.h" -#include "blobfs.c" -#include "tree.c" +#include "blobfs/blobfs.c" +#include "blobfs/tree.c" #include "unit/lib/blob/bs_dev_common.c" diff --git a/test/lib/blobfs/blobfs_sync_ut/Makefile b/test/lib/blobfs/blobfs_sync_ut/Makefile index 23442706f..4a4a098a6 100644 --- a/test/lib/blobfs/blobfs_sync_ut/Makefile +++ b/test/lib/blobfs/blobfs_sync_ut/Makefile @@ -35,22 +35,7 @@ SPDK_ROOT_DIR := $(abspath $(CURDIR)/../../../..) include $(SPDK_ROOT_DIR)/mk/spdk.common.mk include $(SPDK_ROOT_DIR)/mk/spdk.app.mk -APP = blobfs_sync_ut +SPDK_LIB_LIST = blob +TEST_FILE = blobfs_sync_ut.c -C_SRCS := blobfs_sync_ut.c -CFLAGS += -I$(SPDK_ROOT_DIR)/lib/blobfs -I$(SPDK_ROOT_DIR)/lib/blob -CFLAGS += -I$(SPDK_ROOT_DIR)/test - -SPDK_LIB_LIST = util log blob 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/blobfs/blobfs_sync_ut/blobfs_sync_ut.c b/test/lib/blobfs/blobfs_sync_ut/blobfs_sync_ut.c index 2ad20fa7b..8186e8f03 100644 --- a/test/lib/blobfs/blobfs_sync_ut/blobfs_sync_ut.c +++ b/test/lib/blobfs/blobfs_sync_ut/blobfs_sync_ut.c @@ -42,8 +42,8 @@ #include "spdk_cunit.h" #include "unit/lib/blob/bs_dev_common.c" #include "lib/test_env.c" -#include "blobfs.c" -#include "tree.c" +#include "blobfs/blobfs.c" +#include "blobfs/tree.c" struct spdk_filesystem *g_fs; struct spdk_file *g_file;