diff --git a/test/lib/json/Makefile b/test/lib/json/Makefile index f03a6aed8..f28c2b5a0 100644 --- a/test/lib/json/Makefile +++ b/test/lib/json/Makefile @@ -34,7 +34,7 @@ SPDK_ROOT_DIR := $(abspath $(CURDIR)/../../..) include $(SPDK_ROOT_DIR)/mk/spdk.common.mk -DIRS-y = jsoncat parse util write +DIRS-y = jsoncat .PHONY: all clean $(DIRS-y) diff --git a/test/unit/lib/Makefile b/test/unit/lib/Makefile index 55ca4348b..b6bd151a6 100644 --- a/test/unit/lib/Makefile +++ b/test/unit/lib/Makefile @@ -34,7 +34,7 @@ SPDK_ROOT_DIR := $(abspath $(CURDIR)/../../..) include $(SPDK_ROOT_DIR)/mk/spdk.common.mk -DIRS-y = bdev scsi util +DIRS-y = bdev json scsi util .PHONY: all clean $(DIRS-y) diff --git a/test/unit/lib/json/Makefile b/test/unit/lib/json/Makefile new file mode 100644 index 000000000..db38f27dc --- /dev/null +++ b/test/unit/lib/json/Makefile @@ -0,0 +1,44 @@ +# +# 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 + +DIRS-y = json_parse.c json_util.c json_write.c + +.PHONY: all clean $(DIRS-y) + +all: $(DIRS-y) +clean: $(DIRS-y) + +include $(SPDK_ROOT_DIR)/mk/spdk.subdirs.mk diff --git a/test/lib/json/parse/.gitignore b/test/unit/lib/json/json_parse.c/.gitignore similarity index 100% rename from test/lib/json/parse/.gitignore rename to test/unit/lib/json/json_parse.c/.gitignore diff --git a/test/lib/json/parse/Makefile b/test/unit/lib/json/json_parse.c/Makefile similarity index 96% rename from test/lib/json/parse/Makefile rename to test/unit/lib/json/json_parse.c/Makefile index 981aad0a8..d54d56df8 100644 --- a/test/lib/json/parse/Makefile +++ b/test/unit/lib/json/json_parse.c/Makefile @@ -31,7 +31,7 @@ # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. # -SPDK_ROOT_DIR := $(abspath $(CURDIR)/../../../..) +SPDK_ROOT_DIR := $(abspath $(CURDIR)/../../../../..) TEST_FILE = json_parse_ut.c diff --git a/test/lib/json/parse/json_parse_ut.c b/test/unit/lib/json/json_parse.c/json_parse_ut.c similarity index 100% rename from test/lib/json/parse/json_parse_ut.c rename to test/unit/lib/json/json_parse.c/json_parse_ut.c diff --git a/test/lib/json/util/.gitignore b/test/unit/lib/json/json_util.c/.gitignore similarity index 100% rename from test/lib/json/util/.gitignore rename to test/unit/lib/json/json_util.c/.gitignore diff --git a/test/lib/json/util/Makefile b/test/unit/lib/json/json_util.c/Makefile similarity index 96% rename from test/lib/json/util/Makefile rename to test/unit/lib/json/json_util.c/Makefile index 820f6ef78..527732682 100644 --- a/test/lib/json/util/Makefile +++ b/test/unit/lib/json/json_util.c/Makefile @@ -31,7 +31,7 @@ # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. # -SPDK_ROOT_DIR := $(abspath $(CURDIR)/../../../..) +SPDK_ROOT_DIR := $(abspath $(CURDIR)/../../../../..) TEST_FILE = json_util_ut.c diff --git a/test/lib/json/util/json_util_ut.c b/test/unit/lib/json/json_util.c/json_util_ut.c old mode 100755 new mode 100644 similarity index 100% rename from test/lib/json/util/json_util_ut.c rename to test/unit/lib/json/json_util.c/json_util_ut.c diff --git a/test/lib/json/write/.gitignore b/test/unit/lib/json/json_write.c/.gitignore similarity index 100% rename from test/lib/json/write/.gitignore rename to test/unit/lib/json/json_write.c/.gitignore diff --git a/test/lib/json/write/Makefile b/test/unit/lib/json/json_write.c/Makefile similarity index 96% rename from test/lib/json/write/Makefile rename to test/unit/lib/json/json_write.c/Makefile index 2c66d279c..9d105d06b 100644 --- a/test/lib/json/write/Makefile +++ b/test/unit/lib/json/json_write.c/Makefile @@ -31,7 +31,7 @@ # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. # -SPDK_ROOT_DIR := $(abspath $(CURDIR)/../../../..) +SPDK_ROOT_DIR := $(abspath $(CURDIR)/../../../../..) TEST_FILE = json_write_ut.c OTHER_FILES = json_parse.c diff --git a/test/lib/json/write/json_write_ut.c b/test/unit/lib/json/json_write.c/json_write_ut.c similarity index 100% rename from test/lib/json/write/json_write_ut.c rename to test/unit/lib/json/json_write.c/json_write_ut.c diff --git a/unittest.sh b/unittest.sh index 8f0cae409..74d391a72 100755 --- a/unittest.sh +++ b/unittest.sh @@ -49,9 +49,9 @@ $valgrind test/lib/nvme/unit/nvme_quirks_c/nvme_quirks_ut $valgrind test/lib/ioat/unit/ioat_ut -$valgrind test/lib/json/parse/json_parse_ut -$valgrind test/lib/json/util/json_util_ut -$valgrind test/lib/json/write/json_write_ut +$valgrind test/unit/lib/json/json_parse.c/json_parse_ut +$valgrind test/unit/lib/json/json_util.c/json_util_ut +$valgrind test/unit/lib/json/json_write.c/json_write_ut $valgrind test/lib/jsonrpc/server/jsonrpc_server_ut