summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--bin/sleep/Makefile6
-rw-r--r--bin/sleep/tests/Makefile12
-rw-r--r--etc/mtree/BSD.tests.dist18
-rw-r--r--gnu/usr.bin/diff/Makefile6
-rw-r--r--gnu/usr.bin/diff/tests/Makefile17
-rw-r--r--usr.bin/basename/Makefile6
-rw-r--r--usr.bin/basename/tests/Makefile12
-rw-r--r--usr.bin/cmp/Makefile6
-rw-r--r--usr.bin/cmp/tests/Makefile12
-rw-r--r--usr.bin/cut/Makefile6
-rw-r--r--usr.bin/cut/tests/Makefile21
-rw-r--r--usr.bin/dirname/Makefile6
-rw-r--r--usr.bin/dirname/tests/Makefile12
-rw-r--r--usr.bin/grep/Makefile4
-rw-r--r--usr.bin/grep/tests/Makefile41
-rw-r--r--usr.bin/gzip/Makefile4
-rw-r--r--usr.bin/gzip/tests/Makefile12
-rw-r--r--usr.sbin/nmtree/Makefile4
-rw-r--r--usr.sbin/nmtree/tests/Makefile32
19 files changed, 237 insertions, 0 deletions
diff --git a/bin/sleep/Makefile b/bin/sleep/Makefile
index 4ff7330..2e9cac0 100644
--- a/bin/sleep/Makefile
+++ b/bin/sleep/Makefile
@@ -1,6 +1,12 @@
# @(#)Makefile 8.1 (Berkeley) 5/31/93
# $FreeBSD$
+.include <bsd.own.mk>
+
PROG= sleep
+.if ${MK_TESTS} != "no"
+SUBDIR+= tests
+.endif
+
.include <bsd.prog.mk>
diff --git a/bin/sleep/tests/Makefile b/bin/sleep/tests/Makefile
new file mode 100644
index 0000000..9b286e6
--- /dev/null
+++ b/bin/sleep/tests/Makefile
@@ -0,0 +1,12 @@
+# $FreeBSD$
+
+TESTSRC= ${.CURDIR}/../../../contrib/netbsd-tests/bin/sleep
+.PATH: ${TESTSRC}
+
+.include <bsd.own.mk>
+
+TESTSDIR= ${TESTSBASE}/bin/sleep
+ATF_TESTS_SH= sleep_test
+ATF_TESTS_SH_SRC_sleep_test= t_sleep.sh
+
+.include <bsd.test.mk>
diff --git a/etc/mtree/BSD.tests.dist b/etc/mtree/BSD.tests.dist
index 7bdce04..42189e0 100644
--- a/etc/mtree/BSD.tests.dist
+++ b/etc/mtree/BSD.tests.dist
@@ -47,6 +47,8 @@
set-e
..
..
+ sleep
+ ..
test
..
..
@@ -68,6 +70,8 @@
lib
..
usr.bin
+ diff
+ ..
..
..
lib
@@ -169,6 +173,8 @@
usr.bin
apply
..
+ basename
+ ..
bmake
archives
fmt_44bsd
@@ -269,10 +275,20 @@
..
calendar
..
+ cmp
+ ..
comm
..
+ cut
+ ..
+ dirname
+ ..
file2c
..
+ grep
+ ..
+ gzip
+ ..
join
..
jot
@@ -309,6 +325,8 @@
..
newsyslog
..
+ nmtree
+ ..
pw
..
sa
diff --git a/gnu/usr.bin/diff/Makefile b/gnu/usr.bin/diff/Makefile
index c5c66dc..a3222cb 100644
--- a/gnu/usr.bin/diff/Makefile
+++ b/gnu/usr.bin/diff/Makefile
@@ -1,5 +1,7 @@
# $FreeBSD$
+.include <bsd.own.mk>
+
DIFFSRC=${.CURDIR}/../../../contrib/diff/src
.PATH: ${DIFFSRC} \
${.CURDIR}/../../../contrib/diff/lib \
@@ -27,4 +29,8 @@ SUBDIR+=doc
DPADD= ${LIBGNUREGEX}
LDADD= -lgnuregex
+.if ${MK_TESTS} != "no"
+SUBDIR+= tests
+.endif
+
.include <bsd.prog.mk>
diff --git a/gnu/usr.bin/diff/tests/Makefile b/gnu/usr.bin/diff/tests/Makefile
new file mode 100644
index 0000000..aa1629d
--- /dev/null
+++ b/gnu/usr.bin/diff/tests/Makefile
@@ -0,0 +1,17 @@
+# $FreeBSD$
+
+TESTSRC= ${.CURDIR}/../../../../contrib/netbsd-tests/usr.bin/diff
+.PATH: ${TESTSRC}
+
+.include <bsd.own.mk>
+
+TESTSDIR= ${TESTSBASE}/gnu/usr.bin/diff
+ATF_TESTS_SH= diff_test
+ATF_TESTS_SH_SED_diff_test= -e 's/t_diff/`basename $$0`/g'
+ATF_TESTS_SH_SRC_diff_test= t_diff.sh
+
+FILESDIR= ${TESTSDIR}
+FILES+= d_mallocv1.in
+FILES+= d_mallocv2.in
+
+.include <bsd.test.mk>
diff --git a/usr.bin/basename/Makefile b/usr.bin/basename/Makefile
index d647395..9046f23 100644
--- a/usr.bin/basename/Makefile
+++ b/usr.bin/basename/Makefile
@@ -1,7 +1,13 @@
# From: @(#)Makefile 8.1 (Berkeley) 6/6/93
# $FreeBSD$
+.include <bsd.own.mk>
+
PROG= basename
MLINKS= basename.1 dirname.1
+.if ${MK_TESTS} != "no"
+SUBDIR+= tests
+.endif
+
.include <bsd.prog.mk>
diff --git a/usr.bin/basename/tests/Makefile b/usr.bin/basename/tests/Makefile
new file mode 100644
index 0000000..32dedab
--- /dev/null
+++ b/usr.bin/basename/tests/Makefile
@@ -0,0 +1,12 @@
+# $FreeBSD$
+
+TESTSRC= ${.CURDIR}/../../../contrib/netbsd-tests/usr.bin/basename
+.PATH: ${TESTSRC}
+
+.include <bsd.own.mk>
+
+TESTSDIR= ${TESTSBASE}/usr.bin/basename
+ATF_TESTS_SH= basename_test
+ATF_TESTS_SH_SRC_basename_test= t_basename.sh
+
+.include <bsd.test.mk>
diff --git a/usr.bin/cmp/Makefile b/usr.bin/cmp/Makefile
index d93f54b..a331231 100644
--- a/usr.bin/cmp/Makefile
+++ b/usr.bin/cmp/Makefile
@@ -1,7 +1,13 @@
# @(#)Makefile 8.1 (Berkeley) 6/6/93
# $FreeBSD$
+.include <bsd.own.mk>
+
PROG= cmp
SRCS= cmp.c link.c misc.c regular.c special.c
+.if ${MK_TESTS} != "no"
+SUBDIR+= tests
+.endif
+
.include <bsd.prog.mk>
diff --git a/usr.bin/cmp/tests/Makefile b/usr.bin/cmp/tests/Makefile
new file mode 100644
index 0000000..1c054c6
--- /dev/null
+++ b/usr.bin/cmp/tests/Makefile
@@ -0,0 +1,12 @@
+# $FreeBSD$
+
+TESTSRC= ${.CURDIR}/../../../contrib/netbsd-tests/usr.bin/cmp
+.PATH: ${TESTSRC}
+
+.include <bsd.own.mk>
+
+TESTSDIR= ${TESTSBASE}/usr.bin/cmp
+ATF_TESTS_SH= cmp_test
+ATF_TESTS_SH_SRC_cmp_test= t_cmp.sh
+
+.include <bsd.test.mk>
diff --git a/usr.bin/cut/Makefile b/usr.bin/cut/Makefile
index 5be029a..68b2e59 100644
--- a/usr.bin/cut/Makefile
+++ b/usr.bin/cut/Makefile
@@ -1,6 +1,12 @@
# From: @(#)Makefile 8.1 (Berkeley) 6/6/93
# $FreeBSD$
+.include <bsd.own.mk>
+
PROG= cut
+.if ${MK_TESTS} != "no"
+SUBDIR+= tests
+.endif
+
.include <bsd.prog.mk>
diff --git a/usr.bin/cut/tests/Makefile b/usr.bin/cut/tests/Makefile
new file mode 100644
index 0000000..b324a78
--- /dev/null
+++ b/usr.bin/cut/tests/Makefile
@@ -0,0 +1,21 @@
+# $FreeBSD$
+
+TESTSRC= ${.CURDIR}/../../../contrib/netbsd-tests/usr.bin/cut
+.PATH: ${TESTSRC}
+
+.include <bsd.own.mk>
+
+TESTSDIR= ${TESTSBASE}/usr.bin/cut
+ATF_TESTS_SH= cut_test
+ATF_TESTS_SH_SRC_cut_test= t_cut.sh
+
+FILESDIR= ${TESTSDIR}
+FILES= d_basic.out
+FILES+= d_cut.in
+FILES+= d_dflag.out
+FILES+= d_dsflag.out
+FILES+= d_latin1.in
+FILES+= d_sflag.out
+FILES+= d_utf8.in
+
+.include <bsd.test.mk>
diff --git a/usr.bin/dirname/Makefile b/usr.bin/dirname/Makefile
index fb0e660..2868b92 100644
--- a/usr.bin/dirname/Makefile
+++ b/usr.bin/dirname/Makefile
@@ -1,7 +1,13 @@
# From: @(#)Makefile 8.1 (Berkeley) 6/6/93
# $FreeBSD$
+.include <bsd.own.mk>
+
PROG= dirname
MAN=
+.if ${MK_TESTS} != "no"
+SUBDIR+= tests
+.endif
+
.include <bsd.prog.mk>
diff --git a/usr.bin/dirname/tests/Makefile b/usr.bin/dirname/tests/Makefile
new file mode 100644
index 0000000..5b84c57
--- /dev/null
+++ b/usr.bin/dirname/tests/Makefile
@@ -0,0 +1,12 @@
+# $FreeBSD$
+
+TESTSRC= ${.CURDIR}/../../../contrib/netbsd-tests/usr.bin/dirname
+.PATH: ${TESTSRC}
+
+.include <bsd.own.mk>
+
+TESTSDIR= ${TESTSBASE}/usr.bin/dirname
+ATF_TESTS_SH= dirname_test
+ATF_TESTS_SH_SRC_dirname_test= t_dirname.sh
+
+.include <bsd.test.mk>
diff --git a/usr.bin/grep/Makefile b/usr.bin/grep/Makefile
index 8b2fa0c..9aa4f11 100644
--- a/usr.bin/grep/Makefile
+++ b/usr.bin/grep/Makefile
@@ -85,4 +85,8 @@ DPADD+= ${LIBGNUREGEX}
CFLAGS+= -DWITHOUT_NLS
.endif
+.if ${MK_TESTS} != "no"
+SUBDIR+= tests
+.endif
+
.include <bsd.prog.mk>
diff --git a/usr.bin/grep/tests/Makefile b/usr.bin/grep/tests/Makefile
new file mode 100644
index 0000000..59b948c
--- /dev/null
+++ b/usr.bin/grep/tests/Makefile
@@ -0,0 +1,41 @@
+# $FreeBSD$
+
+TESTSRC= ${.CURDIR}/../../../contrib/netbsd-tests/usr.bin/grep
+.PATH: ${TESTSRC}
+
+.include <bsd.own.mk>
+
+TESTSDIR= ${TESTSBASE}/usr.bin/grep
+
+ATF_TESTS_SH= grep_test
+ATF_TESTS_SH_SRC_grep_test= t_grep.sh
+
+FILESDIR= ${TESTSDIR}
+FILES= d_basic.out
+FILES+= d_begin_end_a.out
+FILES+= d_begin_end_b.out
+FILES+= d_binary.out
+FILES+= d_context2_a.out
+FILES+= d_context2_b.out
+FILES+= d_context2_c.out
+FILES+= d_context_a.in
+FILES+= d_context_a.out
+FILES+= d_context_b.in
+FILES+= d_context_b.out
+FILES+= d_context_c.out
+FILES+= d_context_d.out
+FILES+= d_egrep.out
+FILES+= d_file_exp.in
+FILES+= d_file_exp.out
+FILES+= d_ignore_case.out
+FILES+= d_input
+FILES+= d_invert.in
+FILES+= d_invert.out
+FILES+= d_recurse.out
+FILES+= d_recurse_symlink.err
+FILES+= d_recurse_symlink.out
+FILES+= d_whole_line.out
+FILES+= d_word_regexps.out
+FILES+= d_zgrep.out
+
+.include <bsd.test.mk>
diff --git a/usr.bin/gzip/Makefile b/usr.bin/gzip/Makefile
index 10137db..6d3aaa6 100644
--- a/usr.bin/gzip/Makefile
+++ b/usr.bin/gzip/Makefile
@@ -29,4 +29,8 @@ LINKS+= ${BINDIR}/gzip ${BINDIR}/gunzip \
${BINDIR}/gzip ${BINDIR}/zcat \
${BINDIR}/zdiff ${BINDIR}/zcmp
+.if ${MK_TESTS} != "no"
+SUBDIR+= tests
+.endif
+
.include <bsd.prog.mk>
diff --git a/usr.bin/gzip/tests/Makefile b/usr.bin/gzip/tests/Makefile
new file mode 100644
index 0000000..155d739
--- /dev/null
+++ b/usr.bin/gzip/tests/Makefile
@@ -0,0 +1,12 @@
+# $FreeBSD$
+
+TESTSRC= ${.CURDIR}/../../../contrib/netbsd-tests/usr.bin/gzip
+.PATH: ${TESTSRC}
+
+.include <bsd.own.mk>
+
+TESTSDIR= ${TESTSBASE}/usr.bin/gzip
+ATF_TESTS_SH= gzip_test
+ATF_TESTS_SH_SRC_gzip_test= t_gzip.sh
+
+.include <bsd.test.mk>
diff --git a/usr.sbin/nmtree/Makefile b/usr.sbin/nmtree/Makefile
index f829769..0530d9e 100644
--- a/usr.sbin/nmtree/Makefile
+++ b/usr.sbin/nmtree/Makefile
@@ -31,4 +31,8 @@ CLEANFILES+= nmtree.8
nmtree.8: mtree.8
cp ${.ALLSRC} ${.TARGET}
+.if ${MK_TESTS} != "no"
+SUBDIR+= tests
+.endif
+
.include <bsd.prog.mk>
diff --git a/usr.sbin/nmtree/tests/Makefile b/usr.sbin/nmtree/tests/Makefile
new file mode 100644
index 0000000..1df81d0
--- /dev/null
+++ b/usr.sbin/nmtree/tests/Makefile
@@ -0,0 +1,32 @@
+# $FreeBSD$
+
+TESTSRC= ${.CURDIR}/../../../contrib/netbsd-tests/usr.sbin/mtree
+.PATH: ${TESTSRC}
+
+TESTSDIR= ${TESTSBASE}/usr.sbin/nmtree
+
+ATF_TESTS_SH= nmtree_test
+ATF_TESTS_SH_SRC_nmtree_test= t_mtree.sh
+
+FILESDIR= ${TESTSDIR}
+
+# NOTE: the output from FreeBSD's nmtree displays sha256digest instead of
+# sha256; we need to mangle the specfiles to reflect this.
+.for f in mtree_d_create.out netbsd6_d_create.out
+CLEANFILES+= $f $f.tmp
+FILES+= $f
+$f: ${TESTSRC}/$f
+ sed -e 's/sha256/sha256digest/g' < ${.ALLSRC} > ${.TARGET}.tmp
+ mv ${.TARGET}.tmp ${.TARGET}
+.endfor
+
+FILES+= d_convert.in
+FILES+= d_convert_C.out
+FILES+= d_convert_C_S.out
+FILES+= d_convert_D.out
+FILES+= d_convert_D_S.out
+FILES+= d_merge.in
+FILES+= d_merge_C_M.out
+FILES+= d_merge_C_M_S.out
+
+.include <bsd.test.mk>
OpenPOWER on IntegriCloud