From 076fb28427858894d07aff8a39621628d3ac0c37 Mon Sep 17 00:00:00 2001 From: Jim Harris Date: Tue, 22 Nov 2016 13:03:26 -0700 Subject: [PATCH] test/env: move vtophys to subdirectory This prepares for some additional env tests. Signed-off-by: Jim Harris Change-Id: I577faad44fb9ae5c83785b406728224b16396f26 --- autotest.sh | 2 +- test/lib/env/Makefile | 19 +++------- test/lib/env/{vtophys.sh => env.sh} | 4 +-- test/lib/env/vtophys/Makefile | 53 ++++++++++++++++++++++++++++ test/lib/env/{ => vtophys}/vtophys.c | 0 5 files changed, 61 insertions(+), 17 deletions(-) rename test/lib/env/{vtophys.sh => env.sh} (78%) create mode 100644 test/lib/env/vtophys/Makefile rename test/lib/env/{ => vtophys}/vtophys.c (100%) diff --git a/autotest.sh b/autotest.sh index a564fa8154..206eba8eeb 100755 --- a/autotest.sh +++ b/autotest.sh @@ -79,7 +79,7 @@ run_test test/lib/bdev/blockdev.sh run_test test/lib/event/event.sh run_test test/lib/nvme/nvme.sh run_test test/lib/nvmf/nvmf.sh -run_test test/lib/env/vtophys.sh +run_test test/lib/env/env.sh run_test test/lib/ioat/ioat.sh run_test test/lib/json/json.sh run_test test/lib/jsonrpc/jsonrpc.sh diff --git a/test/lib/env/Makefile b/test/lib/env/Makefile index 08d489d678..ced582b46e 100644 --- a/test/lib/env/Makefile +++ b/test/lib/env/Makefile @@ -34,20 +34,11 @@ SPDK_ROOT_DIR := $(abspath $(CURDIR)/../../..) include $(SPDK_ROOT_DIR)/mk/spdk.common.mk -APP = vtophys +DIRS-y = vtophys -C_SRCS = vtophys.c +.PHONY: all clean $(DIRS-y) -CFLAGS += $(ENV_CFLAGS) +all: $(DIRS-y) +clean: $(DIRS-y) -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.subdirs.mk diff --git a/test/lib/env/vtophys.sh b/test/lib/env/env.sh similarity index 78% rename from test/lib/env/vtophys.sh rename to test/lib/env/env.sh index 3b79d23f85..4811e48cec 100755 --- a/test/lib/env/vtophys.sh +++ b/test/lib/env/env.sh @@ -3,13 +3,13 @@ set -e testdir=$(readlink -f $(dirname $0)) -rootdir="$testdir/../../.." +rootdir=$testdir/../../.. source $rootdir/scripts/autotest_common.sh timing_enter env timing_enter vtophys -$testdir/vtophys +$testdir/vtophys/vtophys timing_exit vtophys timing_exit env diff --git a/test/lib/env/vtophys/Makefile b/test/lib/env/vtophys/Makefile new file mode 100644 index 0000000000..d73e0a9367 --- /dev/null +++ b/test/lib/env/vtophys/Makefile @@ -0,0 +1,53 @@ +# +# 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 + +APP = vtophys + +C_SRCS = vtophys.c + +CFLAGS += $(ENV_CFLAGS) + +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 diff --git a/test/lib/env/vtophys.c b/test/lib/env/vtophys/vtophys.c similarity index 100% rename from test/lib/env/vtophys.c rename to test/lib/env/vtophys/vtophys.c