test: use spdk_unittest.mk for lib/unit unit tests

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

Reviewed-on: https://review.gerrithub.io/399760
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:38:15 -07:00
parent 8d7e3283dd
commit 7ffe586a17
12 changed files with 21 additions and 118 deletions

View File

@ -35,19 +35,6 @@ SPDK_ROOT_DIR := $(abspath $(CURDIR)/../../../../..)
include $(SPDK_ROOT_DIR)/mk/spdk.common.mk
include $(SPDK_ROOT_DIR)/mk/spdk.app.mk
CFLAGS += -I$(SPDK_ROOT_DIR)/test
CFLAGS += -I$(SPDK_ROOT_DIR)/lib/util
APP = bit_array_ut
C_SRCS := bit_array_ut.c
TEST_FILE = bit_array_ut.c
LIBS += -lcunit
all : $(APP)
$(APP) : $(OBJS) $(SPDK_LIBS)
$(LINK_C)
clean :
$(CLEAN_C) $(APP)
include $(SPDK_ROOT_DIR)/mk/spdk.deps.mk
include $(SPDK_ROOT_DIR)/mk/spdk.unittest.mk

View File

@ -35,7 +35,7 @@
#include "spdk_cunit.h"
#include "bit_array.c"
#include "util/bit_array.c"
void *
spdk_dma_realloc(void *buf, size_t size, size_t align, uint64_t *phys_addr)

View File

@ -35,22 +35,6 @@ 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
TEST_FILE = cpuset_ut.c
CFLAGS += -I$(SPDK_ROOT_DIR)/test
CFLAGS += -I$(SPDK_ROOT_DIR)/lib
LIBS += $(SPDK_LIB_LINKER_ARGS)
LIBS += -lcunit
APP = cpuset_ut
C_SRCS = $(APP).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

@ -35,19 +35,6 @@ SPDK_ROOT_DIR := $(abspath $(CURDIR)/../../../../..)
include $(SPDK_ROOT_DIR)/mk/spdk.common.mk
include $(SPDK_ROOT_DIR)/mk/spdk.app.mk
CFLAGS += -I$(SPDK_ROOT_DIR)/test
CFLAGS += -I$(SPDK_ROOT_DIR)/lib/util
APP = crc16_ut
C_SRCS := crc16_ut.c
TEST_FILE = crc16_ut.c
LIBS += -lcunit
all : $(APP)
$(APP) : $(OBJS) $(SPDK_LIBS)
$(LINK_C)
clean :
$(CLEAN_C) $(APP)
include $(SPDK_ROOT_DIR)/mk/spdk.deps.mk
include $(SPDK_ROOT_DIR)/mk/spdk.unittest.mk

View File

@ -35,7 +35,7 @@
#include "spdk_cunit.h"
#include "crc16.c"
#include "util/crc16.c"
static void
test_crc16_t10dif(void)

View File

@ -35,19 +35,6 @@ SPDK_ROOT_DIR := $(abspath $(CURDIR)/../../../../..)
include $(SPDK_ROOT_DIR)/mk/spdk.common.mk
include $(SPDK_ROOT_DIR)/mk/spdk.app.mk
CFLAGS += -I$(SPDK_ROOT_DIR)/test
CFLAGS += -I$(SPDK_ROOT_DIR)/lib/util
APP = crc32_ieee_ut
C_SRCS := crc32_ieee_ut.c
TEST_FILE = crc32_ieee_ut.c
LIBS += -lcunit
all : $(APP)
$(APP) : $(OBJS) $(SPDK_LIBS)
$(LINK_C)
clean :
$(CLEAN_C) $(APP)
include $(SPDK_ROOT_DIR)/mk/spdk.deps.mk
include $(SPDK_ROOT_DIR)/mk/spdk.unittest.mk

View File

@ -35,8 +35,8 @@
#include "spdk_cunit.h"
#include "crc32.c"
#include "crc32_ieee.c"
#include "util/crc32.c"
#include "util/crc32_ieee.c"
static void
test_crc32_ieee(void)

View File

@ -35,19 +35,6 @@ SPDK_ROOT_DIR := $(abspath $(CURDIR)/../../../../..)
include $(SPDK_ROOT_DIR)/mk/spdk.common.mk
include $(SPDK_ROOT_DIR)/mk/spdk.app.mk
CFLAGS += -I$(SPDK_ROOT_DIR)/test
CFLAGS += -I$(SPDK_ROOT_DIR)/lib/util
APP = crc32c_ut
C_SRCS := crc32c_ut.c
TEST_FILE = crc32c_ut.c
LIBS += -lcunit
all : $(APP)
$(APP) : $(OBJS) $(SPDK_LIBS)
$(LINK_C)
clean :
$(CLEAN_C) $(APP)
include $(SPDK_ROOT_DIR)/mk/spdk.deps.mk
include $(SPDK_ROOT_DIR)/mk/spdk.unittest.mk

View File

@ -35,8 +35,8 @@
#include "spdk_cunit.h"
#include "crc32.c"
#include "crc32c.c"
#include "util/crc32.c"
#include "util/crc32c.c"
static void
test_crc32c(void)

View File

@ -36,22 +36,6 @@ include $(SPDK_ROOT_DIR)/mk/spdk.common.mk
include $(SPDK_ROOT_DIR)/mk/spdk.app.mk
include $(SPDK_ROOT_DIR)/mk/spdk.mock.unittest.mk
SPDK_LIB_LIST = log cunit spdk_mock
TEST_FILE = io_channel_ut.c
CFLAGS += -I$(SPDK_ROOT_DIR)/test
CFLAGS += -I$(SPDK_ROOT_DIR)/lib
LIBS += $(SPDK_LIB_LINKER_ARGS)
LIBS += -lcunit
APP = io_channel_ut
C_SRCS = $(APP).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

@ -35,19 +35,6 @@ SPDK_ROOT_DIR := $(abspath $(CURDIR)/../../../../..)
include $(SPDK_ROOT_DIR)/mk/spdk.common.mk
include $(SPDK_ROOT_DIR)/mk/spdk.app.mk
CFLAGS += -I$(SPDK_ROOT_DIR)/test
CFLAGS += -I$(SPDK_ROOT_DIR)/lib/util
APP = string_ut
C_SRCS := string_ut.c
TEST_FILE = string_ut.c
LIBS += -lcunit
all : $(APP)
$(APP) : $(OBJS) $(SPDK_LIBS)
$(LINK_C)
clean :
$(CLEAN_C) $(APP)
include $(SPDK_ROOT_DIR)/mk/spdk.deps.mk
include $(SPDK_ROOT_DIR)/mk/spdk.unittest.mk

View File

@ -35,7 +35,7 @@
#include "spdk_cunit.h"
#include "string.c"
#include "util/string.c"
static void
test_parse_ip_addr(void)