Skip to content

Commit

Permalink
Migrate tools/regression/sbin/ to the new tests layout.
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
Julio Merino authored and Julio Merino committed Mar 16, 2014
1 parent f225bcd commit c68de74
Show file tree
Hide file tree
Showing 17 changed files with 63 additions and 31 deletions.
8 changes: 8 additions & 0 deletions etc/mtree/BSD.tests.dist
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,14 @@
..
..
..
sbin
dhclient
..
growfs
..
mdconfig
..
..
share
examples
tests
Expand Down
4 changes: 4 additions & 0 deletions sbin/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,10 @@ SUBDIR+= quotacheck
SUBDIR+= routed
.endif

.if ${MK_TESTS} != "no"
SUBDIR+= tests
.endif

.include <bsd.arch.inc.mk>

SUBDIR:= ${SUBDIR:O}
Expand Down
6 changes: 6 additions & 0 deletions sbin/dhclient/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -44,4 +46,8 @@ LDADD= -lutil

WARNS?= 2

.if ${MK_TESTS} != "no"
SUBDIR+= tests
.endif

.include <bsd.prog.mk>
15 changes: 15 additions & 0 deletions sbin/dhclient/tests/Makefile
Original file line number Diff line number Diff line change
@@ -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>
File renamed without changes.
File renamed without changes.
6 changes: 6 additions & 0 deletions sbin/growfs/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@

#GFSDBG=

.include <bsd.own.mk>

.PATH: ${.CURDIR}/../mount

PROG= growfs
Expand All @@ -20,4 +22,8 @@ SRCS+= debug.c
DPADD= ${LIBUTIL}
LDADD= -lutil

.if ${MK_TESTS} != "no"
SUBDIR+= tests
.endif

.include <bsd.prog.mk>
7 changes: 7 additions & 0 deletions sbin/growfs/tests/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# $FreeBSD$

TESTSDIR= ${TESTSBASE}/sbin/growfs

TAP_TESTS_PERL= legacy_test

.include <bsd.test.mk>
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
#! /usr/bin/perl
#
# $FreeBSD$

use strict;
Expand Down
6 changes: 6 additions & 0 deletions sbin/mdconfig/Makefile
Original file line number Diff line number Diff line change
@@ -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>
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
File renamed without changes.
File renamed without changes.
10 changes: 10 additions & 0 deletions sbin/tests/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
# $FreeBSD$

.include <bsd.own.mk>

TESTSDIR= ${TESTSBASE}/sbin

.PATH: ${.CURDIR:H:H}/tests
KYUAFILE= yes

.include <bsd.test.mk>
5 changes: 0 additions & 5 deletions tools/regression/sbin/Makefile

This file was deleted.

17 changes: 0 additions & 17 deletions tools/regression/sbin/dhclient/Makefile

This file was deleted.

6 changes: 0 additions & 6 deletions tools/regression/sbin/growfs/Makefile

This file was deleted.

0 comments on commit c68de74

Please sign in to comment.