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:
Mariusz Zaborski 2016-09-08 20:01:26 +00:00
parent b3db2736b1
commit d3bfc7250f
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=305626
13 changed files with 68 additions and 32 deletions

View File

@ -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>

View File

@ -0,0 +1,11 @@
# $FreeBSD$
TAP_TESTS_C= dns_test
LIBADD+= casper
LIBADD+= cap_dns
LIBADD+= nv
WARNS?= 3
.include <bsd.test.mk>

View File

@ -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>

View File

@ -0,0 +1,11 @@
# $FreeBSD$
TAP_TESTS_C= grp_test
LIBADD+= casper
LIBADD+= cap_grp
LIBADD+= nv
WARNS?= 3
.include <bsd.test.mk>

View File

@ -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>

View File

@ -0,0 +1,11 @@
# $FreeBSD$
TAP_TESTS_C= pwd_test
LIBADD+= casper
LIBADD+= cap_pwd
LIBADD+= nv
WARNS?= 3
.include <bsd.test.mk>

View File

@ -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>

View File

@ -0,0 +1,11 @@
# $FreeBSD$
TAP_TESTS_C= sysctl_test
LIBADD+= casper
LIBADD+= cap_sysctl
LIBADD+= nv
WARNS?= 3
.include <bsd.test.mk>

View File

@ -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}