test: use spdk.unittest.mk for vhost unit tests

Signed-off-by: Jim Harris <james.r.harris@intel.com>
Change-Id: I3190c98aa27b4723ce525911541efccc7972f733

Reviewed-on: https://review.gerrithub.io/399759
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
This commit is contained in:
Jim Harris 2018-02-13 09:18:08 -07:00
parent d998c1ad70
commit 8d7e3283dd
6 changed files with 10 additions and 58 deletions

View File

@ -35,24 +35,8 @@ SPDK_ROOT_DIR := $(abspath $(CURDIR)/../../../../..)
include $(SPDK_ROOT_DIR)/mk/spdk.common.mk
include $(SPDK_ROOT_DIR)/mk/spdk.app.mk
SPDK_LIB_LIST = log util
CFLAGS += -I$(SPDK_ROOT_DIR)/test
CFLAGS += -I$(SPDK_ROOT_DIR)/lib/vhost
CFLAGS += -I$(SPDK_ROOT_DIR)/lib/vhost/rte_vhost
CFLAGS += $(ENV_CFLAGS)
LIBS += $(SPDK_LIB_LINKER_ARGS)
LIBS += -lcunit
TEST_FILE = vhost_ut.c
APP = vhost_ut
C_SRCS = vhost_ut.c
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

View File

@ -39,7 +39,7 @@
#include "spdk_internal/mock.h"
#include "lib/test_env.c"
#include "vhost.c"
#include "vhost/vhost.c"
DEFINE_STUB(rte_vhost_driver_unregister, int, (const char *path), 0);
DEFINE_STUB(spdk_event_allocate, struct spdk_event *,

View File

@ -35,24 +35,8 @@ SPDK_ROOT_DIR := $(abspath $(CURDIR)/../../../../..)
include $(SPDK_ROOT_DIR)/mk/spdk.common.mk
include $(SPDK_ROOT_DIR)/mk/spdk.app.mk
SPDK_LIB_LIST = log util
CFLAGS += -I$(SPDK_ROOT_DIR)/test
CFLAGS += -I$(SPDK_ROOT_DIR)/lib/vhost
CFLAGS += -I$(SPDK_ROOT_DIR)/lib/vhost/rte_vhost
CFLAGS += $(ENV_CFLAGS)
LIBS += $(SPDK_LIB_LINKER_ARGS)
LIBS += -lcunit
TEST_FILE = vhost_blk_ut.c
APP = vhost_blk_ut
C_SRCS = vhost_blk_ut.c
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

View File

@ -38,7 +38,7 @@
#include "spdk_internal/mock.h"
#include "lib/test_env.c"
#include "vhost_blk.c"
#include "vhost/vhost_blk.c"
#include "unit/lib/vhost/test_vhost.c"
#include "spdk_internal/bdev.h"

View File

@ -35,24 +35,8 @@ SPDK_ROOT_DIR := $(abspath $(CURDIR)/../../../../..)
include $(SPDK_ROOT_DIR)/mk/spdk.common.mk
include $(SPDK_ROOT_DIR)/mk/spdk.app.mk
SPDK_LIB_LIST = log util
CFLAGS += -I$(SPDK_ROOT_DIR)/test
CFLAGS += -I$(SPDK_ROOT_DIR)/lib/vhost
CFLAGS += -I$(SPDK_ROOT_DIR)/lib/vhost/rte_vhost
CFLAGS += $(ENV_CFLAGS)
LIBS += $(SPDK_LIB_LINKER_ARGS)
LIBS += -lcunit
TEST_FILE = vhost_scsi_ut.c
APP = vhost_scsi_ut
C_SRCS = vhost_scsi_ut.c
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

View File

@ -39,8 +39,8 @@
#include "lib/test_env.c"
#include "spdk/scsi.h"
#include "vhost_scsi.c"
#include "../scsi/scsi_internal.h"
#include "vhost/vhost_scsi.c"
#include "scsi/scsi_internal.h"
#include "unit/lib/vhost/test_vhost.c"
#include "spdk/env.h"