Commit 1d81cbc9 authored by Daniel Verkamp's avatar Daniel Verkamp
Browse files

test/nvmf: stub out per-file unit tests



Change-Id: I9606b82dbfaa6c84d8dafc07fb76a113e3436083
Signed-off-by: default avatarDaniel Verkamp <daniel.verkamp@intel.com>
parent c943e9ff
Loading
Loading
Loading
Loading
+1 −2
Original line number Diff line number Diff line
@@ -34,8 +34,7 @@
SPDK_ROOT_DIR := $(abspath $(CURDIR)/../..)
include $(SPDK_ROOT_DIR)/mk/spdk.common.mk

DIRS-y = bdev event log json jsonrpc nvme memory ioat
DIRS-$(CONFIG_RDMA) += nvmf
DIRS-y = bdev event log json jsonrpc nvme nvmf memory ioat

.PHONY: all clean $(DIRS-y)

+1 −1
Original line number Diff line number Diff line
@@ -34,7 +34,7 @@
SPDK_ROOT_DIR := $(abspath $(CURDIR)/../../..)
include $(SPDK_ROOT_DIR)/mk/spdk.common.mk

DIRS-y =
DIRS-y = request session subsystem

.PHONY: all clean $(DIRS-y)

+3 −6
Original line number Diff line number Diff line
@@ -6,15 +6,12 @@ testdir=$(readlink -f $(dirname $0))
rootdir=$testdir/../../..
source $rootdir/scripts/autotest_common.sh

# TODO: unit tests should not depend on library being enabled
if [ ! -f $testdir/nvmf_c/nvmf_ut ]; then
        exit 0
fi

timing_enter nvmf

timing_enter unit
$testdir/nvmf_c/nvmf_ut
$testdir/request/request_ut
$testdir/session/session_ut
$testdir/subsystem/subsystem_ut
timing_exit unit

timing_exit nvmf
+1 −0
Original line number Diff line number Diff line
request_ut
+56 −0
Original line number Diff line number Diff line
#
#  BSD LICENSE
#
#  Copyright (c) Intel Corporation.
#  All rights reserved.
#
#  Redistribution and use in source and binary forms, with or without
#  modification, are permitted provided that the following conditions
#  are met:
#
#    * Redistributions of source code must retain the above copyright
#      notice, this list of conditions and the following disclaimer.
#    * Redistributions in binary form must reproduce the above copyright
#      notice, this list of conditions and the following disclaimer in
#      the documentation and/or other materials provided with the
#      distribution.
#    * Neither the name of Intel Corporation nor the names of its
#      contributors may be used to endorse or promote products derived
#      from this software without specific prior written permission.
#
#  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
#  "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
#  LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
#  A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
#  OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
#  SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
#  LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
#  DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
#  THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
#  (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
#  OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#

SPDK_ROOT_DIR := $(abspath $(CURDIR)/../../../..)
include $(SPDK_ROOT_DIR)/mk/spdk.common.mk

CFLAGS += -I$(SPDK_ROOT_DIR)/lib/nvmf
CFLAGS += -I$(SPDK_ROOT_DIR)/test

SPDK_LIBS += $(SPDK_ROOT_DIR)/lib/log/libspdk_log.a

LIBS += $(SPDK_LIBS)
LIBS += -lcunit

APP = request_ut
C_SRCS = request_ut.c

all: $(APP)

$(APP): $(OBJS) $(SPDK_LIBS)
	$(LINK_C)

clean:
	$(CLEAN_C) $(APP)

include $(SPDK_ROOT_DIR)/mk/spdk.deps.mk
Loading