diff options
-rw-r--r-- | etc/mtree/BSD.tests.dist | 2 | ||||
-rw-r--r-- | lib/libnv/Makefile | 6 | ||||
-rw-r--r-- | lib/libnv/tests/Makefile | 17 | ||||
-rw-r--r-- | lib/libnv/tests/nvlist_add_test.c (renamed from tools/regression/lib/libnv/nvlist_add.c) | 0 | ||||
-rw-r--r-- | lib/libnv/tests/nvlist_exists_test.c (renamed from tools/regression/lib/libnv/nvlist_exists.c) | 0 | ||||
-rw-r--r-- | lib/libnv/tests/nvlist_free_test.c (renamed from tools/regression/lib/libnv/nvlist_free.c) | 0 | ||||
-rw-r--r-- | lib/libnv/tests/nvlist_get_test.c (renamed from tools/regression/lib/libnv/nvlist_get.c) | 0 | ||||
-rw-r--r-- | lib/libnv/tests/nvlist_move_test.c (renamed from tools/regression/lib/libnv/nvlist_move.c) | 0 | ||||
-rw-r--r-- | lib/libnv/tests/nvlist_send_recv_test.c (renamed from tools/regression/lib/libnv/nvlist_send_recv.c) | 0 | ||||
-rw-r--r-- | tools/regression/lib/libnv/Makefile | 35 |
10 files changed, 25 insertions, 35 deletions
diff --git a/etc/mtree/BSD.tests.dist b/etc/mtree/BSD.tests.dist index 1f61599..64bf426 100644 --- a/etc/mtree/BSD.tests.dist +++ b/etc/mtree/BSD.tests.dist @@ -87,6 +87,8 @@ .. libmp .. + libnv + .. .. libexec atf diff --git a/lib/libnv/Makefile b/lib/libnv/Makefile index 710c295..cad1ea4 100644 --- a/lib/libnv/Makefile +++ b/lib/libnv/Makefile @@ -1,5 +1,7 @@ # $FreeBSD$ +.include <src.opts.mk> + LIB= nv SHLIBDIR?= /lib SHLIB_MAJOR= 0 @@ -158,4 +160,8 @@ MLINKS+=nv.3 nvlist_existsv.3 \ WARNS?= 6 +.if ${MK_TESTS} != "no" +SUBDIR+= tests +.endif + .include <bsd.lib.mk> diff --git a/lib/libnv/tests/Makefile b/lib/libnv/tests/Makefile new file mode 100644 index 0000000..df10549 --- /dev/null +++ b/lib/libnv/tests/Makefile @@ -0,0 +1,17 @@ +# $FreeBSD$ + +TESTSDIR= ${TESTSBASE}/lib/libnv + +TAP_TESTS_C+= nvlist_add_test +TAP_TESTS_C+= nvlist_exists_test +TAP_TESTS_C+= nvlist_free_test +TAP_TESTS_C+= nvlist_get_test +TAP_TESTS_C+= nvlist_move_test +TAP_TESTS_C+= nvlist_send_recv_test + +DPADD+= ${LIBNV} +LDADD+= -lnv + +WARNS?= 6 + +.include <bsd.test.mk> diff --git a/tools/regression/lib/libnv/nvlist_add.c b/lib/libnv/tests/nvlist_add_test.c index 06bcc63..06bcc63 100644 --- a/tools/regression/lib/libnv/nvlist_add.c +++ b/lib/libnv/tests/nvlist_add_test.c diff --git a/tools/regression/lib/libnv/nvlist_exists.c b/lib/libnv/tests/nvlist_exists_test.c index cb595d7..cb595d7 100644 --- a/tools/regression/lib/libnv/nvlist_exists.c +++ b/lib/libnv/tests/nvlist_exists_test.c diff --git a/tools/regression/lib/libnv/nvlist_free.c b/lib/libnv/tests/nvlist_free_test.c index 4417a44..4417a44 100644 --- a/tools/regression/lib/libnv/nvlist_free.c +++ b/lib/libnv/tests/nvlist_free_test.c diff --git a/tools/regression/lib/libnv/nvlist_get.c b/lib/libnv/tests/nvlist_get_test.c index b4468db..b4468db 100644 --- a/tools/regression/lib/libnv/nvlist_get.c +++ b/lib/libnv/tests/nvlist_get_test.c diff --git a/tools/regression/lib/libnv/nvlist_move.c b/lib/libnv/tests/nvlist_move_test.c index 760399d..760399d 100644 --- a/tools/regression/lib/libnv/nvlist_move.c +++ b/lib/libnv/tests/nvlist_move_test.c diff --git a/tools/regression/lib/libnv/nvlist_send_recv.c b/lib/libnv/tests/nvlist_send_recv_test.c index c751bf7..c751bf7 100644 --- a/tools/regression/lib/libnv/nvlist_send_recv.c +++ b/lib/libnv/tests/nvlist_send_recv_test.c diff --git a/tools/regression/lib/libnv/Makefile b/tools/regression/lib/libnv/Makefile deleted file mode 100644 index a64cb63..0000000 --- a/tools/regression/lib/libnv/Makefile +++ /dev/null @@ -1,35 +0,0 @@ -# $FreeBSD$ - -TESTS= nvlist_add -TESTS+= nvlist_exists -TESTS+= nvlist_free -TESTS+= nvlist_get -TESTS+= nvlist_move -TESTS+= nvlist_send_recv - -CFLAGS= -O2 -pipe -fstack-protector -CFLAGS+=-Wsystem-headers -Werror -Wall -Wno-format-y2k -W -Wno-unused-parameter -CFLAGS+=-Wstrict-prototypes -Wmissing-prototypes -Wpointer-arith -Wreturn-type -CFLAGS+=-Wcast-qual -Wwrite-strings -Wswitch -Wshadow -Wunused-parameter -CFLAGS+=-Wcast-align -Wchar-subscripts -Winline -Wnested-externs -Wredundant-decls -CFLAGS+=-Wold-style-definition -Wno-pointer-sign -Wextra - -LDFLAGS+=-lnv - -all: ${TESTS} ${TESTS:=.t} - -.for TEST in ${TESTS} - -${TEST}: ${TEST}.c - ${CC} ${CFLAGS} ${LDFLAGS} ${@}.c -o $@ - -${TEST}.t: ${TEST} - @printf "#!/bin/sh\n\n%s/%s\n" ${.CURDIR} ${@:.t=} > $@ - -.endfor - -test: all - @prove -r ${.CURDIR} - -clean: - rm -f ${TESTS} ${TESTS:=.t} |