Integrate lib/libnv into the build/kyua
Rename all of the TAP test applications from <test> to <test>_test to match the convention described in the TestSuite wiki page Phabric: D538 Approved by: jmmv (mentor) Sponsored by: EMC / Isilon Storage Division
This commit is contained in:
parent
ae369036ec
commit
b236bcf168
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=269603
@ -87,6 +87,8 @@
|
||||
..
|
||||
libmp
|
||||
..
|
||||
libnv
|
||||
..
|
||||
..
|
||||
libexec
|
||||
atf
|
||||
|
@ -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>
|
||||
|
17
lib/libnv/tests/Makefile
Normal file
17
lib/libnv/tests/Makefile
Normal file
@ -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>
|
@ -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}
|
Loading…
Reference in New Issue
Block a user