Migrate tools/regression/sbin/ to the new tests layout.

Pretty much all that this change does is shuffles the code around and hooks
it into the regular build.  The code of the old tests has not changed.
This commit is contained in:
Julio Merino 2014-03-16 02:07:08 +00:00
parent f225bcd157
commit c68de7484a
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=263220
17 changed files with 63 additions and 31 deletions

View File

@ -68,6 +68,14 @@
..
..
..
sbin
dhclient
..
growfs
..
mdconfig
..
..
share
examples
tests

View File

@ -118,6 +118,10 @@ SUBDIR+= quotacheck
SUBDIR+= routed
.endif
.if ${MK_TESTS} != "no"
SUBDIR+= tests
.endif
.include <bsd.arch.inc.mk>
SUBDIR:= ${SUBDIR:O}

View File

@ -31,6 +31,8 @@
# OF THE POSSIBILITY OF SUCH DAMAGE.
#
.include <bsd.own.mk>
SRCS= dhclient.c clparse.c alloc.c dispatch.c hash.c bpf.c options.c \
tree.c conflex.c errwarn.c inet.c packet.c convert.c tables.c \
parse.c privsep.c
@ -44,4 +46,8 @@ LDADD= -lutil
WARNS?= 2
.if ${MK_TESTS} != "no"
SUBDIR+= tests
.endif
.include <bsd.prog.mk>

View File

@ -0,0 +1,15 @@
# $FreeBSD$
TESTSDIR= ${TESTSBASE}/sbin/dhclient
.PATH: ${.CURDIR}/..
PLAIN_TESTS_C= option-domain-search_test
SRCS.option-domain-search_test= alloc.c convert.c hash.c options.c \
tables.c fake.c option-domain-search.c
CFLAGS.option-domain-search_test+= -I${.CURDIR}/..
LDADD.option-domain-search_test= -lutil
WARNS?= 2
.include <bsd.test.mk>

View File

@ -6,6 +6,8 @@
#GFSDBG=
.include <bsd.own.mk>
.PATH: ${.CURDIR}/../mount
PROG= growfs
@ -20,4 +22,8 @@ SRCS+= debug.c
DPADD= ${LIBUTIL}
LDADD= -lutil
.if ${MK_TESTS} != "no"
SUBDIR+= tests
.endif
.include <bsd.prog.mk>

View File

@ -0,0 +1,7 @@
# $FreeBSD$
TESTSDIR= ${TESTSBASE}/sbin/growfs
TAP_TESTS_PERL= legacy_test
.include <bsd.test.mk>

View File

@ -1,5 +1,3 @@
#! /usr/bin/perl
#
# $FreeBSD$
use strict;

View File

@ -1,9 +1,15 @@
# $FreeBSD$
.include <bsd.own.mk>
PROG= mdconfig
MAN= mdconfig.8
DPADD= ${LIBUTIL} ${LIBGEOM} ${LIBBSDXML} ${LIBSBUF}
LDADD= -lutil -lgeom -lbsdxml -lsbuf
.if ${MK_TESTS} != "no"
SUBDIR+= tests
.endif
.include <bsd.prog.mk>

View File

@ -38,7 +38,7 @@ fi
TESTDIR=$(dirname $(realpath $0))
perl $TESTDIR/run $TESTDIR/mdconfig.test > /dev/null
__PERL__ -w -U $TESTDIR/run $TESTDIR/mdconfig.test > /dev/null
if [ $? -eq 0 ]; then
echo "ok 1"

View File

10
sbin/tests/Makefile Normal file
View File

@ -0,0 +1,10 @@
# $FreeBSD$
.include <bsd.own.mk>
TESTSDIR= ${TESTSBASE}/sbin
.PATH: ${.CURDIR:H:H}/tests
KYUAFILE= yes
.include <bsd.test.mk>

View File

@ -1,5 +0,0 @@
# $FreeBSD$
SUBDIR= dhclient growfs
.include <bsd.subdir.mk>

View File

@ -1,17 +0,0 @@
# $FreeBSD$
.PATH: ${.CURDIR}/../../../../sbin/dhclient
SRCS= alloc.c convert.c hash.c options.c tables.c \
fake.c \
option-domain-search.c
CFLAGS+= -I${.CURDIR}/../../../../sbin/dhclient
LDADD= -lutil
PROG= option-domain-search
NO_MAN=
WARNS?= 2
.include <bsd.prog.mk>

View File

@ -1,6 +0,0 @@
# $FreeBSD$
all test:
prove -vmw regress.t
clean: