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

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

Reviewed-on: https://review.gerrithub.io/399763
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 10:05:44 -07:00
parent e956dde2db
commit 08dcfe6006
5 changed files with 12 additions and 48 deletions

View File

@ -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

View File

@ -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"

View File

@ -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

View File

@ -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)
{

View File

@ -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