Move libcasper tests from regression/capsicum/libcasper/ to
lib/libcasper/service/${service_name}/tests. Reviewed by: emaste, ngie Differential Revision: https://reviews.freebsd.org/D7759
This commit is contained in:
parent
b3db2736b1
commit
d3bfc7250f
@ -1,5 +1,7 @@
|
||||
# $FreeBSD$
|
||||
|
||||
.include <src.opts.mk>
|
||||
|
||||
PACKAGE=libcasper
|
||||
LIB= cap_dns
|
||||
|
||||
@ -15,4 +17,8 @@ LIBADD= nv
|
||||
|
||||
CFLAGS+=-I${.CURDIR}
|
||||
|
||||
.if ${MK_TESTS} != "no"
|
||||
SUBDIR+= tests
|
||||
.endif
|
||||
|
||||
.include <bsd.lib.mk>
|
||||
|
11
lib/libcasper/services/cap_dns/tests/Makefile
Normal file
11
lib/libcasper/services/cap_dns/tests/Makefile
Normal file
@ -0,0 +1,11 @@
|
||||
# $FreeBSD$
|
||||
|
||||
TAP_TESTS_C= dns_test
|
||||
|
||||
LIBADD+= casper
|
||||
LIBADD+= cap_dns
|
||||
LIBADD+= nv
|
||||
|
||||
WARNS?= 3
|
||||
|
||||
.include <bsd.test.mk>
|
@ -1,5 +1,7 @@
|
||||
# $FreeBSD$
|
||||
|
||||
.include <src.opts.mk>
|
||||
|
||||
PACKAGE=libcasper
|
||||
LIB= cap_grp
|
||||
|
||||
@ -15,4 +17,8 @@ LIBADD= nv
|
||||
|
||||
CFLAGS+=-I${.CURDIR}
|
||||
|
||||
.if ${MK_TESTS} != "no"
|
||||
SUBDIR+= tests
|
||||
.endif
|
||||
|
||||
.include <bsd.lib.mk>
|
||||
|
11
lib/libcasper/services/cap_grp/tests/Makefile
Normal file
11
lib/libcasper/services/cap_grp/tests/Makefile
Normal file
@ -0,0 +1,11 @@
|
||||
# $FreeBSD$
|
||||
|
||||
TAP_TESTS_C= grp_test
|
||||
|
||||
LIBADD+= casper
|
||||
LIBADD+= cap_grp
|
||||
LIBADD+= nv
|
||||
|
||||
WARNS?= 3
|
||||
|
||||
.include <bsd.test.mk>
|
@ -1,5 +1,7 @@
|
||||
# $FreeBSD$
|
||||
|
||||
.include <src.opts.mk>
|
||||
|
||||
PACKAGE=libcasper
|
||||
LIB= cap_pwd
|
||||
|
||||
@ -15,4 +17,8 @@ LIBADD= nv
|
||||
|
||||
CFLAGS+=-I${.CURDIR}
|
||||
|
||||
.if ${MK_TESTS} != "no"
|
||||
SUBDIR+= tests
|
||||
.endif
|
||||
|
||||
.include <bsd.lib.mk>
|
||||
|
11
lib/libcasper/services/cap_pwd/tests/Makefile
Normal file
11
lib/libcasper/services/cap_pwd/tests/Makefile
Normal file
@ -0,0 +1,11 @@
|
||||
# $FreeBSD$
|
||||
|
||||
TAP_TESTS_C= pwd_test
|
||||
|
||||
LIBADD+= casper
|
||||
LIBADD+= cap_pwd
|
||||
LIBADD+= nv
|
||||
|
||||
WARNS?= 3
|
||||
|
||||
.include <bsd.test.mk>
|
@ -1,5 +1,7 @@
|
||||
# $FreeBSD$
|
||||
|
||||
.include <src.opts.mk>
|
||||
|
||||
PACKAGE=libcasper
|
||||
LIB= cap_sysctl
|
||||
|
||||
@ -15,4 +17,8 @@ LIBADD= nv
|
||||
|
||||
CFLAGS+=-I${.CURDIR}
|
||||
|
||||
.if ${MK_TESTS} != "no"
|
||||
SUBDIR+= tests
|
||||
.endif
|
||||
|
||||
.include <bsd.lib.mk>
|
||||
|
11
lib/libcasper/services/cap_sysctl/tests/Makefile
Normal file
11
lib/libcasper/services/cap_sysctl/tests/Makefile
Normal file
@ -0,0 +1,11 @@
|
||||
# $FreeBSD$
|
||||
|
||||
TAP_TESTS_C= sysctl_test
|
||||
|
||||
LIBADD+= casper
|
||||
LIBADD+= cap_sysctl
|
||||
LIBADD+= nv
|
||||
|
||||
WARNS?= 3
|
||||
|
||||
.include <bsd.test.mk>
|
@ -1,32 +0,0 @@
|
||||
# $FreeBSD$
|
||||
|
||||
SERVICES= dns
|
||||
SERVICES+= grp
|
||||
SERVICES+= pwd
|
||||
SERVICES+= sysctl
|
||||
|
||||
CFLAGS= -O2 -pipe -std=gnu99 -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
|
||||
|
||||
CFLAGS+= -ggdb
|
||||
|
||||
SERVTEST= ${SERVICES:=.t}
|
||||
|
||||
all: ${SERVTEST}
|
||||
|
||||
.for SERVICE in ${SERVICES}
|
||||
|
||||
${SERVICE}.t: ${SERVICE}.c
|
||||
${CC} ${CFLAGS} ${@:.t=.c} -o $@ -lnv -lcasper -lcap_${@:.t=}
|
||||
|
||||
.endfor
|
||||
|
||||
test: all
|
||||
@prove -r ${.CURDIR}
|
||||
|
||||
clean:
|
||||
rm -f ${SERVTEST}
|
Loading…
Reference in New Issue
Block a user