diff --git a/bin/sleep/Makefile b/bin/sleep/Makefile index 4ff73308c45b..2e9cac06cd30 100644 --- a/bin/sleep/Makefile +++ b/bin/sleep/Makefile @@ -1,6 +1,12 @@ # @(#)Makefile 8.1 (Berkeley) 5/31/93 # $FreeBSD$ +.include + PROG= sleep +.if ${MK_TESTS} != "no" +SUBDIR+= tests +.endif + .include diff --git a/bin/sleep/tests/Makefile b/bin/sleep/tests/Makefile new file mode 100644 index 000000000000..9b286e6ba967 --- /dev/null +++ b/bin/sleep/tests/Makefile @@ -0,0 +1,12 @@ +# $FreeBSD$ + +TESTSRC= ${.CURDIR}/../../../contrib/netbsd-tests/bin/sleep +.PATH: ${TESTSRC} + +.include + +TESTSDIR= ${TESTSBASE}/bin/sleep +ATF_TESTS_SH= sleep_test +ATF_TESTS_SH_SRC_sleep_test= t_sleep.sh + +.include diff --git a/etc/mtree/BSD.tests.dist b/etc/mtree/BSD.tests.dist index 7bdce044a8c8..42189e0de188 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 c5c66dcce0ec..a3222cb8884c 100644 --- a/gnu/usr.bin/diff/Makefile +++ b/gnu/usr.bin/diff/Makefile @@ -1,5 +1,7 @@ # $FreeBSD$ +.include + 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 diff --git a/gnu/usr.bin/diff/tests/Makefile b/gnu/usr.bin/diff/tests/Makefile new file mode 100644 index 000000000000..aa1629d33f53 --- /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 + +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 diff --git a/usr.bin/basename/Makefile b/usr.bin/basename/Makefile index d647395c83d9..9046f234f9b1 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 + PROG= basename MLINKS= basename.1 dirname.1 +.if ${MK_TESTS} != "no" +SUBDIR+= tests +.endif + .include diff --git a/usr.bin/basename/tests/Makefile b/usr.bin/basename/tests/Makefile new file mode 100644 index 000000000000..32dedabc5f4d --- /dev/null +++ b/usr.bin/basename/tests/Makefile @@ -0,0 +1,12 @@ +# $FreeBSD$ + +TESTSRC= ${.CURDIR}/../../../contrib/netbsd-tests/usr.bin/basename +.PATH: ${TESTSRC} + +.include + +TESTSDIR= ${TESTSBASE}/usr.bin/basename +ATF_TESTS_SH= basename_test +ATF_TESTS_SH_SRC_basename_test= t_basename.sh + +.include diff --git a/usr.bin/cmp/Makefile b/usr.bin/cmp/Makefile index d93f54bc0fd5..a331231f6822 100644 --- a/usr.bin/cmp/Makefile +++ b/usr.bin/cmp/Makefile @@ -1,7 +1,13 @@ # @(#)Makefile 8.1 (Berkeley) 6/6/93 # $FreeBSD$ +.include + PROG= cmp SRCS= cmp.c link.c misc.c regular.c special.c +.if ${MK_TESTS} != "no" +SUBDIR+= tests +.endif + .include diff --git a/usr.bin/cmp/tests/Makefile b/usr.bin/cmp/tests/Makefile new file mode 100644 index 000000000000..1c054c6888f8 --- /dev/null +++ b/usr.bin/cmp/tests/Makefile @@ -0,0 +1,12 @@ +# $FreeBSD$ + +TESTSRC= ${.CURDIR}/../../../contrib/netbsd-tests/usr.bin/cmp +.PATH: ${TESTSRC} + +.include + +TESTSDIR= ${TESTSBASE}/usr.bin/cmp +ATF_TESTS_SH= cmp_test +ATF_TESTS_SH_SRC_cmp_test= t_cmp.sh + +.include diff --git a/usr.bin/cut/Makefile b/usr.bin/cut/Makefile index 5be029a3d9d1..68b2e5919f9d 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 + PROG= cut +.if ${MK_TESTS} != "no" +SUBDIR+= tests +.endif + .include diff --git a/usr.bin/cut/tests/Makefile b/usr.bin/cut/tests/Makefile new file mode 100644 index 000000000000..b324a7804196 --- /dev/null +++ b/usr.bin/cut/tests/Makefile @@ -0,0 +1,21 @@ +# $FreeBSD$ + +TESTSRC= ${.CURDIR}/../../../contrib/netbsd-tests/usr.bin/cut +.PATH: ${TESTSRC} + +.include + +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 diff --git a/usr.bin/dirname/Makefile b/usr.bin/dirname/Makefile index fb0e660a5a95..2868b92addc1 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 + PROG= dirname MAN= +.if ${MK_TESTS} != "no" +SUBDIR+= tests +.endif + .include diff --git a/usr.bin/dirname/tests/Makefile b/usr.bin/dirname/tests/Makefile new file mode 100644 index 000000000000..5b84c57092fe --- /dev/null +++ b/usr.bin/dirname/tests/Makefile @@ -0,0 +1,12 @@ +# $FreeBSD$ + +TESTSRC= ${.CURDIR}/../../../contrib/netbsd-tests/usr.bin/dirname +.PATH: ${TESTSRC} + +.include + +TESTSDIR= ${TESTSBASE}/usr.bin/dirname +ATF_TESTS_SH= dirname_test +ATF_TESTS_SH_SRC_dirname_test= t_dirname.sh + +.include diff --git a/usr.bin/grep/Makefile b/usr.bin/grep/Makefile index 8b2fa0c49703..9aa4f11f1910 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 diff --git a/usr.bin/grep/tests/Makefile b/usr.bin/grep/tests/Makefile new file mode 100644 index 000000000000..59b948c98e5a --- /dev/null +++ b/usr.bin/grep/tests/Makefile @@ -0,0 +1,41 @@ +# $FreeBSD$ + +TESTSRC= ${.CURDIR}/../../../contrib/netbsd-tests/usr.bin/grep +.PATH: ${TESTSRC} + +.include + +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 diff --git a/usr.bin/gzip/Makefile b/usr.bin/gzip/Makefile index 10137dbf3944..6d3aaa6c06f4 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 diff --git a/usr.bin/gzip/tests/Makefile b/usr.bin/gzip/tests/Makefile new file mode 100644 index 000000000000..155d739f17bd --- /dev/null +++ b/usr.bin/gzip/tests/Makefile @@ -0,0 +1,12 @@ +# $FreeBSD$ + +TESTSRC= ${.CURDIR}/../../../contrib/netbsd-tests/usr.bin/gzip +.PATH: ${TESTSRC} + +.include + +TESTSDIR= ${TESTSBASE}/usr.bin/gzip +ATF_TESTS_SH= gzip_test +ATF_TESTS_SH_SRC_gzip_test= t_gzip.sh + +.include diff --git a/usr.sbin/nmtree/Makefile b/usr.sbin/nmtree/Makefile index f829769b7ee1..0530d9e3a414 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 diff --git a/usr.sbin/nmtree/tests/Makefile b/usr.sbin/nmtree/tests/Makefile new file mode 100644 index 000000000000..1df81d0f0a44 --- /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