From c23b96610c4bb9f07f0f1ca49cae53892f36c2d0 Mon Sep 17 00:00:00 2001 From: ngie Date: Thu, 1 Jan 2015 02:04:44 +0000 Subject: [PATCH] MFC r272777,r272779,r272780,r272781,r272782,r272783,r272784,r272787,r272788: r272777: Integrate usr.sbin/nmtree/tests from NetBSD into atf/kyua In collaboration with: pho Sponsored by: EMC / Isilon Storage Division r272779: Integrate usr.sbin/basename/tests from NetBSD into atf/kyua In collaboration with: pho Sponsored by: EMC / Isilon Storage Division r272780: Integrate usr.bin/cmp/tests from NetBSD into atf/kyua In collaboration with: sjg Sponsored by: EMC / Isilon Storage Division r272781: Integrate usr.bin/dirname/tests from NetBSD into atf/kyua In collaboration with: pho, sjg Sponsored by: EMC / Isilon Storage Division r272782: Integrate bin/sleep/tests from NetBSD into atf/kyua Sponsored by: EMC / Isilon Storage Division r272783: Integrate usr.bin/cut/tests from NetBSD into atf/kyua Sponsored by: EMC / Isilon Storage Division r272784: Integrate usr.bin/grep/tests from NetBSD into atf/kyua Sponsored by: EMC / Isilon Storage Division r272787: Integrate usr.bin/diff/tests from NetBSD into atf/kyua at gnu/usr.bin/diff/tests Sponsored by: EMC / Isilon Storage Division r272788: Integrate usr.bin/gzip/tests from NetBSD into atf/kyua Sponsored by: EMC / Isilon Storage Division git-svn-id: svn://svn.freebsd.org/base/stable/10@276490 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f --- bin/sleep/Makefile | 6 +++++ bin/sleep/tests/Makefile | 12 ++++++++++ etc/mtree/BSD.tests.dist | 18 +++++++++++++++ gnu/usr.bin/diff/Makefile | 6 +++++ gnu/usr.bin/diff/tests/Makefile | 17 ++++++++++++++ usr.bin/basename/Makefile | 6 +++++ usr.bin/basename/tests/Makefile | 12 ++++++++++ usr.bin/cmp/Makefile | 6 +++++ usr.bin/cmp/tests/Makefile | 12 ++++++++++ usr.bin/cut/Makefile | 6 +++++ usr.bin/cut/tests/Makefile | 21 +++++++++++++++++ usr.bin/dirname/Makefile | 6 +++++ usr.bin/dirname/tests/Makefile | 12 ++++++++++ usr.bin/grep/Makefile | 4 ++++ usr.bin/grep/tests/Makefile | 41 +++++++++++++++++++++++++++++++++ usr.bin/gzip/Makefile | 4 ++++ usr.bin/gzip/tests/Makefile | 12 ++++++++++ usr.sbin/nmtree/Makefile | 4 ++++ usr.sbin/nmtree/tests/Makefile | 32 +++++++++++++++++++++++++ 19 files changed, 237 insertions(+) create mode 100644 bin/sleep/tests/Makefile create mode 100644 gnu/usr.bin/diff/tests/Makefile create mode 100644 usr.bin/basename/tests/Makefile create mode 100644 usr.bin/cmp/tests/Makefile create mode 100644 usr.bin/cut/tests/Makefile create mode 100644 usr.bin/dirname/tests/Makefile create mode 100644 usr.bin/grep/tests/Makefile create mode 100644 usr.bin/gzip/tests/Makefile create mode 100644 usr.sbin/nmtree/tests/Makefile diff --git a/bin/sleep/Makefile b/bin/sleep/Makefile index 4ff73308c..2e9cac06c 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 000000000..9b286e6ba --- /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 7bdce044a..42189e0de 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 c5c66dcce..a3222cb88 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 000000000..aa1629d33 --- /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 d647395c8..9046f234f 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 000000000..32dedabc5 --- /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 d93f54bc0..a331231f6 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 000000000..1c054c688 --- /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 5be029a3d..68b2e5919 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 000000000..b324a7804 --- /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 fb0e660a5..2868b92ad 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 000000000..5b84c5709 --- /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 8b2fa0c49..9aa4f11f1 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 000000000..59b948c98 --- /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 10137dbf3..6d3aaa6c0 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 000000000..155d739f1 --- /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 f829769b7..0530d9e3a 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 000000000..1df81d0f0 --- /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 -- 2.45.0