From owner-svn-src-head@FreeBSD.ORG Sun Mar 16 08:04:15 2014 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id D47DF644; Sun, 16 Mar 2014 08:04:15 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id B73C9CB5; Sun, 16 Mar 2014 08:04:15 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s2G84FNY046641; Sun, 16 Mar 2014 08:04:15 GMT (envelope-from jmmv@svn.freebsd.org) Received: (from jmmv@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s2G847tQ046589; Sun, 16 Mar 2014 08:04:07 GMT (envelope-from jmmv@svn.freebsd.org) Message-Id: <201403160804.s2G847tQ046589@svn.freebsd.org> From: Julio Merino Date: Sun, 16 Mar 2014 08:04:07 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r263227 - in head: etc/mtree tools/regression/usr.bin tools/regression/usr.bin/apply tools/regression/usr.bin/calendar tools/regression/usr.bin/comm tools/regression/usr.bin/file2c tool... X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 16 Mar 2014 08:04:15 -0000 Author: jmmv Date: Sun Mar 16 08:04:06 2014 New Revision: 263227 URL: http://svnweb.freebsd.org/changeset/base/263227 Log: Migrate most of tools/regression/usr.bin/ to the new tests layout. I'm starting with the easy cases. The leftovers need to be looked at a bit more closely. Note that this change _does_ modify the code of the old tests. This is required in order to allow the code to locate the data files in the source directory instead of the current directory, because Kyua automatically changes the latter to a temporary directory. Also note that at least one test is known to be broken here. Actually, the test is not really broken: it's marked as a TODO but unfortunately Kyua's TAP parser currently does not understand that. Will have to be fixed separately. Added: head/usr.bin/apply/tests/ - copied from r263226, head/tools/regression/usr.bin/apply/ head/usr.bin/apply/tests/legacy_test.sh - copied, changed from r263226, head/tools/regression/usr.bin/apply/regress.t head/usr.bin/calendar/tests/ - copied from r263225, head/tools/regression/usr.bin/calendar/ head/usr.bin/calendar/tests/legacy_test.sh - copied, changed from r263225, head/tools/regression/usr.bin/calendar/regress.t head/usr.bin/comm/tests/ - copied from r263225, head/tools/regression/usr.bin/comm/ head/usr.bin/comm/tests/legacy_test.sh - copied, changed from r263225, head/tools/regression/usr.bin/comm/regress.t head/usr.bin/file2c/tests/ - copied from r263225, head/tools/regression/usr.bin/file2c/ head/usr.bin/file2c/tests/legacy_test.sh - copied, changed from r263225, head/tools/regression/usr.bin/file2c/regress.t head/usr.bin/join/tests/ - copied from r263225, head/tools/regression/usr.bin/join/ head/usr.bin/join/tests/legacy_test.sh - copied, changed from r263225, head/tools/regression/usr.bin/join/regress.t head/usr.bin/jot/tests/ - copied from r263225, head/tools/regression/usr.bin/jot/ head/usr.bin/jot/tests/legacy_test.sh - copied, changed from r263225, head/tools/regression/usr.bin/jot/regress.t head/usr.bin/m4/tests/ - copied from r263225, head/tools/regression/usr.bin/m4/ head/usr.bin/m4/tests/legacy_test.sh - copied, changed from r263225, head/tools/regression/usr.bin/m4/regress.t head/usr.bin/ncal/tests/ - copied from r263225, head/tools/regression/usr.bin/ncal/ head/usr.bin/ncal/tests/legacy_test.sh - copied, changed from r263225, head/tools/regression/usr.bin/ncal/regress.t head/usr.bin/printf/tests/ - copied from r263225, head/tools/regression/usr.bin/printf/ head/usr.bin/printf/tests/legacy_test.sh - copied, changed from r263225, head/tools/regression/usr.bin/printf/regress.t head/usr.bin/sed/tests/ - copied from r263225, head/tools/regression/usr.bin/sed/ head/usr.bin/sed/tests/inplace_race_test.sh - copied, changed from r263225, head/tools/regression/usr.bin/sed/inplace_race.t head/usr.bin/sed/tests/legacy_test.sh - copied, changed from r263225, head/tools/regression/usr.bin/sed/regress.t head/usr.bin/sed/tests/multi_test.sh - copied, changed from r263225, head/tools/regression/usr.bin/sed/multitest.t head/usr.bin/sed/tests/regress.multitest.out/Makefile (contents, props changed) head/usr.bin/tests/regress.m4 - copied, changed from r263225, head/tools/regression/usr.bin/regress.m4 head/usr.bin/tr/tests/ - copied from r263225, head/tools/regression/usr.bin/tr/ head/usr.bin/tr/tests/legacy_test.sh - copied, changed from r263225, head/tools/regression/usr.bin/tr/regress.t head/usr.bin/uudecode/tests/ - copied from r263225, head/tools/regression/usr.bin/uudecode/ head/usr.bin/uudecode/tests/legacy_test.sh - copied, changed from r263225, head/tools/regression/usr.bin/uudecode/regress.t head/usr.bin/uuencode/tests/ - copied from r263225, head/tools/regression/usr.bin/uuencode/ head/usr.bin/uuencode/tests/legacy_test.sh - copied, changed from r263225, head/tools/regression/usr.bin/uuencode/regress.t head/usr.bin/xargs/tests/ - copied from r263225, head/tools/regression/usr.bin/xargs/ head/usr.bin/xargs/tests/legacy_test.sh - copied, changed from r263225, head/tools/regression/usr.bin/xargs/regress.t head/usr.bin/yacc/tests/ - copied from r263225, head/tools/regression/usr.bin/yacc/ head/usr.bin/yacc/tests/legacy_test.sh (contents, props changed) - copied, changed from r263225, head/tools/regression/usr.bin/yacc/regress.t Deleted: head/tools/regression/usr.bin/Makefile head/tools/regression/usr.bin/apply/ head/tools/regression/usr.bin/calendar/ head/tools/regression/usr.bin/comm/ head/tools/regression/usr.bin/file2c/ head/tools/regression/usr.bin/join/ head/tools/regression/usr.bin/jot/ head/tools/regression/usr.bin/m4/ head/tools/regression/usr.bin/ncal/ head/tools/regression/usr.bin/printf/ head/tools/regression/usr.bin/regress.m4 head/tools/regression/usr.bin/sed/ head/tools/regression/usr.bin/tr/ head/tools/regression/usr.bin/uudecode/ head/tools/regression/usr.bin/uuencode/ head/tools/regression/usr.bin/xargs/ head/tools/regression/usr.bin/yacc/ head/usr.bin/apply/tests/regress.t head/usr.bin/calendar/tests/regress.t head/usr.bin/comm/tests/regress.t head/usr.bin/file2c/tests/regress.t head/usr.bin/join/tests/regress.t head/usr.bin/jot/tests/regress.t head/usr.bin/m4/tests/regress.t head/usr.bin/ncal/tests/regress.t head/usr.bin/printf/tests/regress.t head/usr.bin/sed/tests/inplace_race.t head/usr.bin/sed/tests/multitest.t head/usr.bin/sed/tests/regress.t head/usr.bin/tr/tests/regress.t head/usr.bin/uudecode/tests/regress.t head/usr.bin/uuencode/tests/regress.t head/usr.bin/xargs/tests/regress.t head/usr.bin/yacc/tests/regress.t Modified: head/etc/mtree/BSD.tests.dist head/usr.bin/apply/Makefile head/usr.bin/apply/tests/Makefile head/usr.bin/apply/tests/regress.sh head/usr.bin/calendar/Makefile head/usr.bin/calendar/tests/Makefile head/usr.bin/calendar/tests/regress.sh head/usr.bin/comm/Makefile head/usr.bin/comm/tests/Makefile head/usr.bin/comm/tests/regress.sh head/usr.bin/file2c/Makefile head/usr.bin/file2c/tests/Makefile head/usr.bin/file2c/tests/regress.sh head/usr.bin/join/Makefile head/usr.bin/join/tests/Makefile head/usr.bin/join/tests/regress.sh head/usr.bin/jot/Makefile head/usr.bin/jot/tests/Makefile head/usr.bin/m4/Makefile head/usr.bin/m4/tests/Makefile head/usr.bin/m4/tests/regress.sh head/usr.bin/ncal/Makefile head/usr.bin/ncal/tests/Makefile head/usr.bin/printf/Makefile head/usr.bin/printf/tests/Makefile head/usr.bin/sed/Makefile head/usr.bin/sed/tests/Makefile head/usr.bin/sed/tests/regress.sh head/usr.bin/tests/Makefile head/usr.bin/tr/Makefile head/usr.bin/tr/tests/Makefile head/usr.bin/tr/tests/regress.sh head/usr.bin/uudecode/Makefile head/usr.bin/uudecode/tests/Makefile head/usr.bin/uudecode/tests/regress.sh head/usr.bin/uuencode/Makefile head/usr.bin/uuencode/tests/Makefile head/usr.bin/uuencode/tests/regress.sh head/usr.bin/xargs/Makefile head/usr.bin/xargs/tests/Makefile head/usr.bin/xargs/tests/regress.sh head/usr.bin/yacc/Makefile head/usr.bin/yacc/tests/Makefile head/usr.bin/yacc/tests/regress.sh (contents, props changed) Modified: head/etc/mtree/BSD.tests.dist ============================================================================== --- head/etc/mtree/BSD.tests.dist Sun Mar 16 04:09:22 2014 (r263226) +++ head/etc/mtree/BSD.tests.dist Sun Mar 16 08:04:06 2014 (r263227) @@ -91,12 +91,44 @@ .. .. usr.bin + apply + .. atf atf-sh .. .. + calendar + .. + comm + .. + file2c + .. + join + .. + jot + .. lastcomm .. + m4 + .. + ncal + .. + printf + .. + sed + regress.multitest.out + .. + .. + tr + .. + uudecode + .. + uuencode + .. + xargs + .. + yacc + .. .. usr.sbin etcupdate Modified: head/usr.bin/apply/Makefile ============================================================================== --- head/usr.bin/apply/Makefile Sun Mar 16 04:09:22 2014 (r263226) +++ head/usr.bin/apply/Makefile Sun Mar 16 08:04:06 2014 (r263227) @@ -1,8 +1,14 @@ # @(#)Makefile 8.1 (Berkeley) 6/6/93 # $FreeBSD$ +.include + PROG= apply DPADD= ${LIBSBUF} LDADD= -lsbuf +.if ${MK_TESTS} != "no" +SUBDIR+= tests +.endif + .include Modified: head/usr.bin/apply/tests/Makefile ============================================================================== --- head/tools/regression/usr.bin/apply/Makefile Sun Mar 16 04:09:22 2014 (r263226) +++ head/usr.bin/apply/tests/Makefile Sun Mar 16 08:04:06 2014 (r263227) @@ -1,4 +1,14 @@ # $FreeBSD$ -all: - @m4 ${.CURDIR}/../regress.m4 ${.CURDIR}/regress.sh | sh /dev/stdin ${.CURDIR} +TESTSDIR= ${TESTSBASE}/usr.bin/apply + +TAP_TESTS_SH= legacy_test + +FILESDIR= ${TESTSDIR} +FILES= regress.00.in +FILES+= regress.00.out +FILES+= regress.01.out +FILES+= regress.01.sh +FILES+= regress.sh + +.include Copied and modified: head/usr.bin/apply/tests/legacy_test.sh (from r263226, head/tools/regression/usr.bin/apply/regress.t) ============================================================================== --- head/tools/regression/usr.bin/apply/regress.t Sun Mar 16 04:09:22 2014 (r263226, copy source) +++ head/usr.bin/apply/tests/legacy_test.sh Sun Mar 16 08:04:06 2014 (r263227) @@ -1,6 +1,6 @@ #!/bin/sh # $FreeBSD$ -cd `dirname $0` +SRCDIR="$(dirname "${0}")"; export SRCDIR -m4 ../regress.m4 regress.sh | sh +m4 "${SRCDIR}/../regress.m4" "${SRCDIR}/regress.sh" | sh Modified: head/usr.bin/apply/tests/regress.sh ============================================================================== --- head/tools/regression/usr.bin/apply/regress.sh Sun Mar 16 04:09:22 2014 (r263226) +++ head/usr.bin/apply/tests/regress.sh Sun Mar 16 08:04:06 2014 (r263227) @@ -4,7 +4,7 @@ echo 1..2 REGRESSION_START($1) -REGRESSION_TEST(`00', `apply "echo %1 %1 %1 %1" $(cat regress.00.in)') -REGRESSION_TEST(`01', `sh regress.01.sh') +REGRESSION_TEST(`00', `apply "echo %1 %1 %1 %1" $(cat ${SRCDIR}/regress.00.in)') +REGRESSION_TEST(`01', `sh ${SRCDIR}/regress.01.sh') REGRESSION_END() Modified: head/usr.bin/calendar/Makefile ============================================================================== --- head/usr.bin/calendar/Makefile Sun Mar 16 04:09:22 2014 (r263226) +++ head/usr.bin/calendar/Makefile Sun Mar 16 08:04:06 2014 (r263227) @@ -1,6 +1,8 @@ # @(#)Makefile 8.1 (Berkeley) 6/6/93 # $FreeBSD$ +.include + PROG= calendar SRCS= calendar.c locale.c events.c dates.c parsedata.c io.c day.c \ ostern.c paskha.c pom.c sunpos.c calcpp.c @@ -31,4 +33,8 @@ beforeinstall: ln -s fr_FR.ISO8859-1 ${DESTDIR}${SHAREDIR}/calendar/${link} .endfor +.if ${MK_TESTS} != "no" +SUBDIR+= tests +.endif + .include Modified: head/usr.bin/calendar/tests/Makefile ============================================================================== --- head/tools/regression/usr.bin/calendar/Makefile Sun Mar 16 03:32:29 2014 (r263225) +++ head/usr.bin/calendar/tests/Makefile Sun Mar 16 08:04:06 2014 (r263227) @@ -1,4 +1,39 @@ # $FreeBSD$ -all: - @m4 ${.CURDIR}/../regress.m4 ${.CURDIR}/regress.sh | sh /dev/stdin ${.CURDIR} +TESTSDIR= ${TESTSBASE}/usr.bin/calendar + +TAP_TESTS_SH= legacy_test + +FILESDIR= ${TESTSDIR} +FILES= calendar.calibrate +FILES+= regress.a1.out +FILES+= regress.a2.out +FILES+= regress.a3.out +FILES+= regress.a4.out +FILES+= regress.a5.out +FILES+= regress.b1.out +FILES+= regress.b2.out +FILES+= regress.b3.out +FILES+= regress.b4.out +FILES+= regress.b5.out +FILES+= regress.s1.out +FILES+= regress.s2.out +FILES+= regress.s3.out +FILES+= regress.s4.out +FILES+= regress.sh +FILES+= regress.w0-1.out +FILES+= regress.w0-2.out +FILES+= regress.w0-3.out +FILES+= regress.w0-4.out +FILES+= regress.w0-5.out +FILES+= regress.w0-6.out +FILES+= regress.w0-7.out +FILES+= regress.wn-1.out +FILES+= regress.wn-2.out +FILES+= regress.wn-3.out +FILES+= regress.wn-4.out +FILES+= regress.wn-5.out +FILES+= regress.wn-6.out +FILES+= regress.wn-7.out + +.include Copied and modified: head/usr.bin/calendar/tests/legacy_test.sh (from r263225, head/tools/regression/usr.bin/calendar/regress.t) ============================================================================== --- head/tools/regression/usr.bin/calendar/regress.t Sun Mar 16 03:32:29 2014 (r263225, copy source) +++ head/usr.bin/calendar/tests/legacy_test.sh Sun Mar 16 08:04:06 2014 (r263227) @@ -1,6 +1,6 @@ #!/bin/sh # $FreeBSD$ -cd `dirname $0` +SRCDIR="$(dirname "${0}")"; export SRCDIR -m4 ../regress.m4 regress.sh | sh +m4 "${SRCDIR}/../regress.m4" "${SRCDIR}/regress.sh" | sh Modified: head/usr.bin/calendar/tests/regress.sh ============================================================================== --- head/tools/regression/usr.bin/calendar/regress.sh Sun Mar 16 03:32:29 2014 (r263225) +++ head/usr.bin/calendar/tests/regress.sh Sun Mar 16 08:04:06 2014 (r263227) @@ -1,6 +1,6 @@ # $FreeBSD$ -CALENDAR_FILE="-f calendar.calibrate" +CALENDAR_FILE="-f ${SRCDIR}/calendar.calibrate" CALENDAR_BIN="calendar" CALENDAR="${CALENDAR_BIN} ${CALENDAR_FILE}" Modified: head/usr.bin/comm/Makefile ============================================================================== --- head/usr.bin/comm/Makefile Sun Mar 16 04:09:22 2014 (r263226) +++ head/usr.bin/comm/Makefile Sun Mar 16 08:04:06 2014 (r263227) @@ -1,6 +1,12 @@ # @(#)Makefile 8.1 (Berkeley) 6/6/93 # $FreeBSD$ +.include + PROG= comm +.if ${MK_TESTS} != "no" +SUBDIR+= tests +.endif + .include Modified: head/usr.bin/comm/tests/Makefile ============================================================================== --- head/tools/regression/usr.bin/comm/Makefile Sun Mar 16 03:32:29 2014 (r263225) +++ head/usr.bin/comm/tests/Makefile Sun Mar 16 08:04:06 2014 (r263227) @@ -1,4 +1,19 @@ # $FreeBSD$ -all: - @m4 ${.CURDIR}/../regress.m4 ${.CURDIR}/regress.sh | sh /dev/stdin ${.CURDIR} +TESTSDIR= ${TESTSBASE}/usr.bin/comm + +TAP_TESTS_SH= legacy_test + +FILESDIR= ${TESTSDIR} +FILES= regress.00.out +FILES+= regress.00a.in +FILES+= regress.00b.in +FILES+= regress.01.out +FILES+= regress.01a.in +FILES+= regress.01b.in +FILES+= regress.02.out +FILES+= regress.02a.in +FILES+= regress.02b.in +FILES+= regress.sh + +.include Copied and modified: head/usr.bin/comm/tests/legacy_test.sh (from r263225, head/tools/regression/usr.bin/comm/regress.t) ============================================================================== --- head/tools/regression/usr.bin/comm/regress.t Sun Mar 16 03:32:29 2014 (r263225, copy source) +++ head/usr.bin/comm/tests/legacy_test.sh Sun Mar 16 08:04:06 2014 (r263227) @@ -1,6 +1,6 @@ #!/bin/sh # $FreeBSD$ -cd `dirname $0` +SRCDIR="$(dirname "${0}")"; export SRCDIR -m4 ../regress.m4 regress.sh | sh +m4 "${SRCDIR}/../regress.m4" "${SRCDIR}/regress.sh" | sh Modified: head/usr.bin/comm/tests/regress.sh ============================================================================== --- head/tools/regression/usr.bin/comm/regress.sh Sun Mar 16 03:32:29 2014 (r263225) +++ head/usr.bin/comm/tests/regress.sh Sun Mar 16 08:04:06 2014 (r263227) @@ -1,13 +1,11 @@ # $FreeBSD$ -LC_ALL=C; export LC_ALL - echo 1..3 REGRESSION_START($1) -REGRESSION_TEST(`00', `comm -12 regress.00a.in regress.00b.in') -REGRESSION_TEST(`01', `comm -12 regress.01a.in regress.01b.in') -REGRESSION_TEST(`02', `comm regress.02a.in regress.02b.in') +REGRESSION_TEST(`00', `comm -12 ${SRCDIR}/regress.00a.in ${SRCDIR}/regress.00b.in') +REGRESSION_TEST(`01', `comm -12 ${SRCDIR}/regress.01a.in ${SRCDIR}/regress.01b.in') +REGRESSION_TEST(`02', `comm ${SRCDIR}/regress.02a.in ${SRCDIR}/regress.02b.in') REGRESSION_END() Modified: head/usr.bin/file2c/Makefile ============================================================================== --- head/usr.bin/file2c/Makefile Sun Mar 16 04:09:22 2014 (r263226) +++ head/usr.bin/file2c/Makefile Sun Mar 16 08:04:06 2014 (r263227) @@ -1,4 +1,11 @@ # $FreeBSD$ +.include + PROG= file2c + +.if ${MK_TESTS} != "no" +SUBDIR+= tests +.endif + .include Modified: head/usr.bin/file2c/tests/Makefile ============================================================================== --- head/tools/regression/usr.bin/file2c/Makefile Sun Mar 16 03:32:29 2014 (r263225) +++ head/usr.bin/file2c/tests/Makefile Sun Mar 16 08:04:06 2014 (r263227) @@ -1,4 +1,20 @@ # $FreeBSD$ -all: - @m4 ${.CURDIR}/../regress.m4 ${.CURDIR}/regress.sh | sh /dev/stdin ${.CURDIR} +TESTSDIR= ${TESTSBASE}/usr.bin/file2c + +TAP_TESTS_SH= legacy_test + +FILESDIR= ${TESTSDIR} +FILES= regress.1.out +FILES+= regress.2.out +FILES+= regress.3.out +FILES+= regress.4.out +FILES+= regress.5.out +FILES+= regress.6.out +FILES+= regress.7.out +FILES+= regress.8.out +FILES+= regress.9.out +FILES+= regress.in +FILES+= regress.sh + +.include Copied and modified: head/usr.bin/file2c/tests/legacy_test.sh (from r263225, head/tools/regression/usr.bin/file2c/regress.t) ============================================================================== --- head/tools/regression/usr.bin/file2c/regress.t Sun Mar 16 03:32:29 2014 (r263225, copy source) +++ head/usr.bin/file2c/tests/legacy_test.sh Sun Mar 16 08:04:06 2014 (r263227) @@ -1,6 +1,6 @@ #!/bin/sh # $FreeBSD$ -cd `dirname $0` +SRCDIR="$(dirname "${0}")"; export SRCDIR -m4 ../regress.m4 regress.sh | sh +m4 "${SRCDIR}/../regress.m4" "${SRCDIR}/regress.sh" | sh Modified: head/usr.bin/file2c/tests/regress.sh ============================================================================== --- head/tools/regression/usr.bin/file2c/regress.sh Sun Mar 16 03:32:29 2014 (r263225) +++ head/usr.bin/file2c/tests/regress.sh Sun Mar 16 08:04:06 2014 (r263227) @@ -4,16 +4,16 @@ echo 1..9 REGRESSION_START($1) -REGRESSION_TEST(`1', `head -c 13 regress.in | file2c') -REGRESSION_TEST(`2', `head -c 26 regress.in | file2c PREFIX') -REGRESSION_TEST(`3', `head -c 39 regress.in | file2c PREFIX SUFFIX') -REGRESSION_TEST(`4', `head -c 52 regress.in | file2c -x') -REGRESSION_TEST(`5', `head -c 65 regress.in | file2c -n -1') +REGRESSION_TEST(`1', `head -c 13 ${SRCDIR}/regress.in | file2c') +REGRESSION_TEST(`2', `head -c 26 ${SRCDIR}/regress.in | file2c PREFIX') +REGRESSION_TEST(`3', `head -c 39 ${SRCDIR}/regress.in | file2c PREFIX SUFFIX') +REGRESSION_TEST(`4', `head -c 52 ${SRCDIR}/regress.in | file2c -x') +REGRESSION_TEST(`5', `head -c 65 ${SRCDIR}/regress.in | file2c -n -1') -REGRESSION_TEST(`6', `head -c 7 regress.in | file2c -n 1 P S') -REGRESSION_TEST(`7', `head -c 14 regress.in | file2c -n 2 -x "P S"') -REGRESSION_TEST(`8', `head -c 21 regress.in | file2c -n 16 P -x S') +REGRESSION_TEST(`6', `head -c 7 ${SRCDIR}/regress.in | file2c -n 1 P S') +REGRESSION_TEST(`7', `head -c 14 ${SRCDIR}/regress.in | file2c -n 2 -x "P S"') +REGRESSION_TEST(`8', `head -c 21 ${SRCDIR}/regress.in | file2c -n 16 P -x S') -REGRESSION_TEST(`9', `file2c "const char data[] = {" ", 0};" < regress.in') +REGRESSION_TEST(`9', `file2c "const char data[] = {" ", 0};" <${SRCDIR}/regress.in') REGRESSION_END() Modified: head/usr.bin/join/Makefile ============================================================================== --- head/usr.bin/join/Makefile Sun Mar 16 04:09:22 2014 (r263226) +++ head/usr.bin/join/Makefile Sun Mar 16 08:04:06 2014 (r263227) @@ -1,5 +1,12 @@ +# $FreeBSD$ # @(#)Makefile 8.1 (Berkeley) 6/6/93 +.include + PROG= join +.if ${MK_TESTS} != "no" +SUBDIR+= tests +.endif + .include Modified: head/usr.bin/join/tests/Makefile ============================================================================== --- head/tools/regression/usr.bin/join/Makefile Sun Mar 16 03:32:29 2014 (r263225) +++ head/usr.bin/join/tests/Makefile Sun Mar 16 08:04:06 2014 (r263227) @@ -1,4 +1,13 @@ # $FreeBSD$ -all: - @m4 ${.CURDIR}/../regress.m4 ${.CURDIR}/regress.sh | sh /dev/stdin ${.CURDIR} +TESTSDIR= ${TESTSBASE}/usr.bin/join + +TAP_TESTS_SH= legacy_test + +FILESDIR= ${TESTSDIR} +FILES= regress.1.in +FILES+= regress.2.in +FILES+= regress.out +FILES+= regress.sh + +.include Copied and modified: head/usr.bin/join/tests/legacy_test.sh (from r263225, head/tools/regression/usr.bin/join/regress.t) ============================================================================== --- head/tools/regression/usr.bin/join/regress.t Sun Mar 16 03:32:29 2014 (r263225, copy source) +++ head/usr.bin/join/tests/legacy_test.sh Sun Mar 16 08:04:06 2014 (r263227) @@ -1,6 +1,6 @@ #!/bin/sh # $FreeBSD$ -cd `dirname $0` +SRCDIR="$(dirname "${0}")"; export SRCDIR -m4 ../regress.m4 regress.sh | sh +m4 "${SRCDIR}/../regress.m4" "${SRCDIR}/regress.sh" | sh Modified: head/usr.bin/join/tests/regress.sh ============================================================================== --- head/tools/regression/usr.bin/join/regress.sh Sun Mar 16 03:32:29 2014 (r263225) +++ head/usr.bin/join/tests/regress.sh Sun Mar 16 08:04:06 2014 (r263227) @@ -4,6 +4,6 @@ echo 1..1 REGRESSION_START($1) -REGRESSION_TEST_ONE(`join -t , -a1 -a2 -e "(unknown)" -o 0,1.2,2.2 regress.1.in regress.2.in') +REGRESSION_TEST_ONE(`join -t , -a1 -a2 -e "(unknown)" -o 0,1.2,2.2 ${SRCDIR}/regress.1.in ${SRCDIR}/regress.2.in') REGRESSION_END() Modified: head/usr.bin/jot/Makefile ============================================================================== --- head/usr.bin/jot/Makefile Sun Mar 16 04:09:22 2014 (r263226) +++ head/usr.bin/jot/Makefile Sun Mar 16 08:04:06 2014 (r263227) @@ -1,6 +1,12 @@ # From: @(#)Makefile 8.1 (Berkeley) 6/6/93 # $FreeBSD$ +.include + PROG= jot +.if ${MK_TESTS} != "no" +SUBDIR+= tests +.endif + .include Modified: head/usr.bin/jot/tests/Makefile ============================================================================== --- head/tools/regression/usr.bin/jot/Makefile Sun Mar 16 03:32:29 2014 (r263225) +++ head/usr.bin/jot/tests/Makefile Sun Mar 16 08:04:06 2014 (r263227) @@ -1,4 +1,71 @@ # $FreeBSD$ -all: - @m4 ${.CURDIR}/../regress.m4 ${.CURDIR}/regress.sh | sh /dev/stdin ${.CURDIR} +TESTSDIR= ${TESTSBASE}/usr.bin/jot + +TAP_TESTS_SH= legacy_test + +FILESDIR= ${TESTSDIR} +FILES= regress.ascii.out +FILES+= regress.block.out +FILES+= regress.dddd.out +FILES+= regress.dddh.out +FILES+= regress.ddhd.out +FILES+= regress.ddhd2.out +FILES+= regress.ddhh.out +FILES+= regress.ddhh2.out +FILES+= regress.dhdd.out +FILES+= regress.dhdh.out +FILES+= regress.dhhd.out +FILES+= regress.dhhd2.out +FILES+= regress.dhhh.out +FILES+= regress.dhhh2.out +FILES+= regress.ed.out +FILES+= regress.grep.out +FILES+= regress.hddd.out +FILES+= regress.hddd2.out +FILES+= regress.hddh.out +FILES+= regress.hddh2.out +FILES+= regress.hdhd.out +FILES+= regress.hdhd2.out +FILES+= regress.hdhh.out +FILES+= regress.hdhh2.out +FILES+= regress.hhdd.out +FILES+= regress.hhdd2.out +FILES+= regress.hhdh.out +FILES+= regress.hhdh2.out +FILES+= regress.hhhd.out +FILES+= regress.hhhd2.out +FILES+= regress.hhhh.out +FILES+= regress.hhhh2.out +FILES+= regress.n21.out +FILES+= regress.rand1.out +FILES+= regress.rand2.out +FILES+= regress.sh +FILES+= regress.stutter.out +FILES+= regress.stutter2.out +FILES+= regress.tabs.out +FILES+= regress.wX1.out +FILES+= regress.wXl.out +FILES+= regress.wc.out +FILES+= regress.wdl.out +FILES+= regress.wdn.out +FILES+= regress.we.out +FILES+= regress.wf.out +FILES+= regress.wg.out +FILES+= regress.wgd.out +FILES+= regress.wo.out +FILES+= regress.wp1.out +FILES+= regress.wp2.out +FILES+= regress.wp3.out +FILES+= regress.wp4.out +FILES+= regress.wp5.out +FILES+= regress.wp6.out +FILES+= regress.wu.out +FILES+= regress.wwe.out +FILES+= regress.wx.out +FILES+= regress.wxn.out +FILES+= regress.x.out +FILES+= regress.xaa.out +FILES+= regress.yes.out + +.include Copied and modified: head/usr.bin/jot/tests/legacy_test.sh (from r263225, head/tools/regression/usr.bin/jot/regress.t) ============================================================================== --- head/tools/regression/usr.bin/jot/regress.t Sun Mar 16 03:32:29 2014 (r263225, copy source) +++ head/usr.bin/jot/tests/legacy_test.sh Sun Mar 16 08:04:06 2014 (r263227) @@ -1,6 +1,6 @@ #!/bin/sh # $FreeBSD$ -cd `dirname $0` +SRCDIR="$(dirname "${0}")"; export SRCDIR -m4 ../regress.m4 regress.sh | sh +m4 "${SRCDIR}/../regress.m4" "${SRCDIR}/regress.sh" | sh Modified: head/usr.bin/m4/Makefile ============================================================================== --- head/usr.bin/m4/Makefile Sun Mar 16 04:09:22 2014 (r263226) +++ head/usr.bin/m4/Makefile Sun Mar 16 08:04:06 2014 (r263227) @@ -4,6 +4,8 @@ # -DEXTENDED # if you want the paste & spaste macros. +.include + PROG= m4 CFLAGS+=-DEXTENDED -I${.CURDIR} -I${.CURDIR}/lib DPADD= ${LIBY} ${LIBL} ${LIBM} @@ -22,4 +24,8 @@ tokenizer.o: parser.h CLEANFILES+= parser.c parser.h tokenizer.o +.if ${MK_TESTS} != "no" +SUBDIR+= tests +.endif + .include Modified: head/usr.bin/m4/tests/Makefile ============================================================================== --- head/tools/regression/usr.bin/m4/Makefile Sun Mar 16 03:32:29 2014 (r263225) +++ head/usr.bin/m4/tests/Makefile Sun Mar 16 08:04:06 2014 (r263227) @@ -1,4 +1,52 @@ # $FreeBSD$ -all: - @m4 ${.CURDIR}/../regress.m4 ${.CURDIR}/regress.sh | sh /dev/stdin ${.CURDIR} +TESTSDIR= ${TESTSBASE}/usr.bin/m4 + +TAP_TESTS_SH= legacy_test + +FILESDIR= ${TESTSDIR} +FILES= args.m4 +FILES+= args2.m4 +FILES+= comments.m4 +FILES+= esyscmd.m4 +FILES+= eval.m4 +FILES+= ff_after_dnl.m4.uu +FILES+= gnueval.m4 +FILES+= gnuformat.m4 +FILES+= gnupatterns.m4 +FILES+= gnupatterns2.m4 +FILES+= gnuprefix.m4 +FILES+= gnusofterror.m4 +FILES+= includes.aux +FILES+= includes.m4 +FILES+= m4wrap3.m4 +FILES+= patterns.m4 +FILES+= quotes.m4 +FILES+= redef.m4 +FILES+= regress.args.out +FILES+= regress.args2.out +FILES+= regress.comments.out +FILES+= regress.esyscmd.out +FILES+= regress.eval.out +FILES+= regress.ff_after_dnl.out +FILES+= regress.gnueval.out +FILES+= regress.gnuformat.out +FILES+= regress.gnupatterns.out +FILES+= regress.gnupatterns2.out +FILES+= regress.gnuprefix.out +FILES+= regress.gnusofterror.out +FILES+= regress.gnutranslit2.out +FILES+= regress.includes.out +FILES+= regress.m4wrap3.out +FILES+= regress.patterns.out +FILES+= regress.quotes.out +FILES+= regress.redef.out +FILES+= regress.sh +FILES+= regress.strangequotes.out +FILES+= regress.translit.out +FILES+= regress.translit2.out +FILES+= strangequotes.m4.uu +FILES+= translit.m4 +FILES+= translit2.m4 + +.include Copied and modified: head/usr.bin/m4/tests/legacy_test.sh (from r263225, head/tools/regression/usr.bin/m4/regress.t) ============================================================================== --- head/tools/regression/usr.bin/m4/regress.t Sun Mar 16 03:32:29 2014 (r263225, copy source) +++ head/usr.bin/m4/tests/legacy_test.sh Sun Mar 16 08:04:06 2014 (r263227) @@ -1,6 +1,6 @@ #!/bin/sh # $FreeBSD$ -cd `dirname $0` +SRCDIR="$(dirname "${0}")"; export SRCDIR -m4 ../regress.m4 regress.sh | sh +m4 "${SRCDIR}/../regress.m4" "${SRCDIR}/regress.sh" | sh Modified: head/usr.bin/m4/tests/regress.sh ============================================================================== --- head/tools/regression/usr.bin/m4/regress.sh Sun Mar 16 03:32:29 2014 (r263225) +++ head/usr.bin/m4/tests/regress.sh Sun Mar 16 08:04:06 2014 (r263227) @@ -1,31 +1,33 @@ # $FreeBSD$ -LC_ALL=C; export LC_ALL - echo 1..21 +test_m4() { + m4 "${@}" 2>&1 | sed -e "s,${SRCDIR}/,,g" +} + REGRESSION_START($1) -REGRESSION_TEST(`args', `m4 args.m4') -REGRESSION_TEST(`args2', `m4 args2.m4') -REGRESSION_TEST(`comments', `m4 comments.m4') -REGRESSION_TEST(`esyscmd', `m4 esyscmd.m4') -REGRESSION_TEST(`eval', `m4 eval.m4') -REGRESSION_TEST(`ff_after_dnl', `uudecode -o /dev/stdout ff_after_dnl.m4.uu | m4') -REGRESSION_TEST(`gnueval', `m4 -g gnueval.m4') -REGRESSION_TEST(`gnuformat', `m4 -g gnuformat.m4') -REGRESSION_TEST(`gnupatterns', `m4 -g gnupatterns.m4') -REGRESSION_TEST(`gnupatterns2', `m4 -g gnupatterns2.m4') -REGRESSION_TEST(`gnuprefix', `m4 -P gnuprefix.m4 2>&1') -REGRESSION_TEST(`gnusofterror', `m4 -g gnusofterror.m4 2>&1') -REGRESSION_TEST(`gnutranslit2', `m4 -g translit2.m4') -REGRESSION_TEST(`includes', `m4 -I. includes.m4') -REGRESSION_TEST(`m4wrap3', `m4 m4wrap3.m4') -REGRESSION_TEST(`patterns', `m4 patterns.m4') -REGRESSION_TEST(`quotes', `m4 quotes.m4 2>&1') -REGRESSION_TEST(`strangequotes', `uudecode -o /dev/stdout strangequotes.m4.uu | m4') -REGRESSION_TEST(`redef', `m4 redef.m4') -REGRESSION_TEST(`translit', `m4 translit.m4') -REGRESSION_TEST(`translit2', `m4 translit2.m4') +REGRESSION_TEST(`args', `test_m4 ${SRCDIR}/args.m4') +REGRESSION_TEST(`args2', `test_m4 ${SRCDIR}/args2.m4') +REGRESSION_TEST(`comments', `test_m4 ${SRCDIR}/comments.m4') +REGRESSION_TEST(`esyscmd', `test_m4 ${SRCDIR}/esyscmd.m4') +REGRESSION_TEST(`eval', `test_m4 ${SRCDIR}/eval.m4') +REGRESSION_TEST(`ff_after_dnl', `uudecode -o /dev/stdout ${SRCDIR}/ff_after_dnl.m4.uu | m4') +REGRESSION_TEST(`gnueval', `test_m4 -g ${SRCDIR}/gnueval.m4') +REGRESSION_TEST(`gnuformat', `test_m4 -g ${SRCDIR}/gnuformat.m4') +REGRESSION_TEST(`gnupatterns', `test_m4 -g ${SRCDIR}/gnupatterns.m4') +REGRESSION_TEST(`gnupatterns2', `test_m4 -g ${SRCDIR}/gnupatterns2.m4') +REGRESSION_TEST(`gnuprefix', `test_m4 -P ${SRCDIR}/gnuprefix.m4 2>&1') +REGRESSION_TEST(`gnusofterror', `test_m4 -g ${SRCDIR}/gnusofterror.m4 2>&1') +REGRESSION_TEST(`gnutranslit2', `test_m4 -g ${SRCDIR}/translit2.m4') +REGRESSION_TEST(`includes', `test_m4 -I${SRCDIR} ${SRCDIR}/includes.m4') +REGRESSION_TEST(`m4wrap3', `test_m4 ${SRCDIR}/m4wrap3.m4') +REGRESSION_TEST(`patterns', `test_m4 ${SRCDIR}/patterns.m4') +REGRESSION_TEST(`quotes', `test_m4 ${SRCDIR}/quotes.m4 2>&1') +REGRESSION_TEST(`strangequotes', `uudecode -o /dev/stdout ${SRCDIR}/strangequotes.m4.uu | m4') +REGRESSION_TEST(`redef', `test_m4 ${SRCDIR}/redef.m4') +REGRESSION_TEST(`translit', `test_m4 ${SRCDIR}/translit.m4') +REGRESSION_TEST(`translit2', `test_m4 ${SRCDIR}/translit2.m4') REGRESSION_END() Modified: head/usr.bin/ncal/Makefile ============================================================================== --- head/usr.bin/ncal/Makefile Sun Mar 16 04:09:22 2014 (r263226) +++ head/usr.bin/ncal/Makefile Sun Mar 16 08:04:06 2014 (r263227) @@ -1,5 +1,7 @@ # $FreeBSD$ +.include + PROG= ncal DPADD= ${LIBCALENDAR} ${LIBTERMCAP} @@ -8,4 +10,8 @@ LDADD= -lcalendar -ltermcap LINKS= ${BINDIR}/ncal ${BINDIR}/cal MLINKS= ncal.1 cal.1 +.if ${MK_TESTS} != "no" +SUBDIR+= tests +.endif + .include Modified: head/usr.bin/ncal/tests/Makefile ============================================================================== --- head/tools/regression/usr.bin/ncal/Makefile Sun Mar 16 03:32:29 2014 (r263225) +++ head/usr.bin/ncal/tests/Makefile Sun Mar 16 08:04:06 2014 (r263227) @@ -1,4 +1,99 @@ # $FreeBSD$ -all: - @m4 ${.CURDIR}/../regress.m4 ${.CURDIR}/regress.sh | sh /dev/stdin ${.CURDIR} +TESTSDIR= ${TESTSBASE}/usr.bin/ncal + +TAP_TESTS_SH= legacy_test + +FILESDIR= ${TESTSDIR} +FILES= regress.b-3m200901-jd-nhl.out +FILES+= regress.b-3m200901-md-nhl.out +FILES+= regress.b-3m200902-jd-nhl.out +FILES+= regress.b-3m200902-md-nhl.out +FILES+= regress.b-3m200903-jd-nhl.out +FILES+= regress.b-3m200903-md-nhl.out +FILES+= regress.b-3m200904-jd-nhl.out +FILES+= regress.b-3m200904-md-nhl.out +FILES+= regress.b-3m200905-jd-nhl.out +FILES+= regress.b-3m200905-md-nhl.out +FILES+= regress.b-3m200906-jd-nhl.out +FILES+= regress.b-3m200906-md-nhl.out +FILES+= regress.b-3m200907-jd-nhl.out +FILES+= regress.b-3m200907-md-nhl.out +FILES+= regress.b-3m200908-jd-nhl.out +FILES+= regress.b-3m200908-md-nhl.out +FILES+= regress.b-3m200909-jd-nhl.out +FILES+= regress.b-3m200909-md-nhl.out +FILES+= regress.b-3m200910-jd-nhl.out +FILES+= regress.b-3m200910-md-nhl.out +FILES+= regress.b-3m200911-jd-nhl.out +FILES+= regress.b-3m200911-md-nhl.out +FILES+= regress.b-3m200912-jd-nhl.out +FILES+= regress.b-3m200912-md-nhl.out +FILES+= regress.b-y2008-jd-nhl.out +FILES+= regress.b-y2008-md-nhl.out +FILES+= regress.b-y2009-jd-nhl.out +FILES+= regress.b-y2009-md-nhl.out +FILES+= regress.b-y2010-jd-nhl.out +FILES+= regress.b-y2010-md-nhl.out +FILES+= regress.b-y2011-jd-nhl.out +FILES+= regress.b-y2011-md-nhl.out +FILES+= regress.f-3A-nhl.out +FILES+= regress.f-3AB-nhl.out +FILES+= regress.f-3B-nhl.out +FILES+= regress.f-3gy-nhl.out +FILES+= regress.f-3y-nhl.out +FILES+= regress.f-mgm-nhl.out +FILES+= regress.f-yA-nhl.out +FILES+= regress.f-yAB-nhl.out +FILES+= regress.f-yB-nhl.out +FILES+= regress.f-ygm-nhl.out +FILES+= regress.f-ym-nhl.out +FILES+= regress.r-3m200901-jd-nhl.out +FILES+= regress.r-3m200901-md-nhl.out +FILES+= regress.r-3m200902-jd-nhl.out +FILES+= regress.r-3m200902-md-nhl.out +FILES+= regress.r-3m200903-jd-nhl.out +FILES+= regress.r-3m200903-md-nhl.out +FILES+= regress.r-3m200904-jd-nhl.out +FILES+= regress.r-3m200904-md-nhl.out +FILES+= regress.r-3m200905-jd-nhl.out +FILES+= regress.r-3m200905-md-nhl.out +FILES+= regress.r-3m200906-jd-nhl.out +FILES+= regress.r-3m200906-md-nhl.out +FILES+= regress.r-3m200907-jd-nhl.out +FILES+= regress.r-3m200907-md-nhl.out +FILES+= regress.r-3m200908-jd-nhl.out +FILES+= regress.r-3m200908-md-nhl.out +FILES+= regress.r-3m200909-jd-nhl.out +FILES+= regress.r-3m200909-md-nhl.out +FILES+= regress.r-3m200910-jd-nhl.out +FILES+= regress.r-3m200910-md-nhl.out +FILES+= regress.r-3m200911-jd-nhl.out +FILES+= regress.r-3m200911-md-nhl.out +FILES+= regress.r-3m200912-jd-nhl.out +FILES+= regress.r-3m200912-md-nhl.out +FILES+= regress.r-y2008-jd-nhl.out +FILES+= regress.r-y2008-md-nhl.out +FILES+= regress.r-y2009-jd-nhl.out +FILES+= regress.r-y2009-md-nhl.out +FILES+= regress.r-y2010-jd-nhl.out +FILES+= regress.r-y2010-md-nhl.out +FILES+= regress.r-y2011-jd-nhl.out +FILES+= regress.r-y2011-md-nhl.out +FILES+= regress.s-b-3-nhl.out +FILES+= regress.s-b-A-nhl.out +FILES+= regress.s-b-AB-nhl.out +FILES+= regress.s-b-B-nhl.out +FILES+= regress.s-b-gmgy-nhl.out +FILES+= regress.s-b-m-nhl.out +FILES+= regress.s-b-mgy-nhl.out +FILES+= regress.s-r-3-nhl.out +FILES+= regress.s-r-A-nhl.out +FILES+= regress.s-r-AB-nhl.out +FILES+= regress.s-r-B-nhl.out +FILES+= regress.s-r-gmgy-nhl.out +FILES+= regress.s-r-m-nhl.out +FILES+= regress.s-r-mgy-nhl.out +FILES+= regress.sh + +.include Copied and modified: head/usr.bin/ncal/tests/legacy_test.sh (from r263225, head/tools/regression/usr.bin/ncal/regress.t) ============================================================================== --- head/tools/regression/usr.bin/ncal/regress.t Sun Mar 16 03:32:29 2014 (r263225, copy source) +++ head/usr.bin/ncal/tests/legacy_test.sh Sun Mar 16 08:04:06 2014 (r263227) @@ -1,6 +1,6 @@ #!/bin/sh # $FreeBSD$ -cd `dirname $0` +SRCDIR="$(dirname "${0}")"; export SRCDIR -m4 ../regress.m4 regress.sh | sh +m4 "${SRCDIR}/../regress.m4" "${SRCDIR}/regress.sh" | sh Modified: head/usr.bin/printf/Makefile ============================================================================== --- head/usr.bin/printf/Makefile Sun Mar 16 04:09:22 2014 (r263226) +++ head/usr.bin/printf/Makefile Sun Mar 16 08:04:06 2014 (r263227) @@ -1,6 +1,12 @@ # @(#)Makefile 8.1 (Berkeley) 6/6/93 # $FreeBSD$ +.include + PROG= printf +.if ${MK_TESTS} != "no" +SUBDIR+= tests +.endif + .include Modified: head/usr.bin/printf/tests/Makefile ============================================================================== --- head/tools/regression/usr.bin/printf/Makefile Sun Mar 16 03:32:29 2014 (r263225) +++ head/usr.bin/printf/tests/Makefile Sun Mar 16 08:04:06 2014 (r263227) @@ -1,4 +1,22 @@ # $FreeBSD$ -all: - @m4 ${.CURDIR}/../regress.m4 ${.CURDIR}/regress.sh | sh /dev/stdin ${.CURDIR} +TESTSDIR= ${TESTSBASE}/usr.bin/printf + +TAP_TESTS_SH= legacy_test + +FILESDIR= ${TESTSDIR} +FILES= regress.b.out +FILES+= regress.d.out +FILES+= regress.f.out +FILES+= regress.l1.out +FILES+= regress.l2.out +FILES+= regress.m1.out +FILES+= regress.m2.out +FILES+= regress.m3.out +FILES+= regress.m4.out +FILES+= regress.m5.out +FILES+= regress.s.out +FILES+= regress.sh +FILES+= regress.zero.out + +.include Copied and modified: head/usr.bin/printf/tests/legacy_test.sh (from r263225, head/tools/regression/usr.bin/printf/regress.t) ============================================================================== --- head/tools/regression/usr.bin/printf/regress.t Sun Mar 16 03:32:29 2014 (r263225, copy source) +++ head/usr.bin/printf/tests/legacy_test.sh Sun Mar 16 08:04:06 2014 (r263227) @@ -1,6 +1,6 @@ #!/bin/sh # $FreeBSD$ -cd `dirname $0` +SRCDIR="$(dirname "${0}")"; export SRCDIR -m4 ../regress.m4 regress.sh | sh +m4 "${SRCDIR}/../regress.m4" "${SRCDIR}/regress.sh" | sh Modified: head/usr.bin/sed/Makefile ============================================================================== --- head/usr.bin/sed/Makefile Sun Mar 16 04:09:22 2014 (r263226) +++ head/usr.bin/sed/Makefile Sun Mar 16 08:04:06 2014 (r263227) @@ -1,9 +1,15 @@ # @(#)Makefile 8.1 (Berkeley) 6/6/93 # $FreeBSD$ +.include + PROG= sed SRCS= compile.c main.c misc.c process.c WARNS?= 2 +.if ${MK_TESTS} != "no" +SUBDIR+= tests +.endif + .include Modified: head/usr.bin/sed/tests/Makefile ============================================================================== --- head/tools/regression/usr.bin/sed/Makefile Sun Mar 16 03:32:29 2014 (r263225) +++ head/usr.bin/sed/tests/Makefile Sun Mar 16 08:04:06 2014 (r263227) @@ -1,6 +1,38 @@ # $FreeBSD$ -all: - @m4 ${.CURDIR}/../regress.m4 ${.CURDIR}/regress.sh | sh /dev/stdin ${.CURDIR} - @sh multitest.t - @sh inplace_race.t +TESTSDIR= ${TESTSBASE}/usr.bin/sed + +TAP_TESTS_SH= legacy_test +TAP_TESTS_SH+= multi_test +TAP_TESTS_SH+= inplace_race_test + +FILESDIR= ${TESTSDIR} +FILES= hanoi.sed +FILES+= math.sed +FILES+= regress.G.out +FILES+= regress.P.out +FILES+= regress.b2a.out +FILES+= regress.bcb.out +FILES+= regress.c0.out +FILES+= regress.c1.out +FILES+= regress.c2.out +FILES+= regress.c3.out +FILES+= regress.hanoi.out +FILES+= regress.icase1.out +FILES+= regress.icase2.out +FILES+= regress.icase3.out +FILES+= regress.icase4.out +FILES+= regress.in +FILES+= regress.math.out +FILES+= regress.not.out +FILES+= regress.psl.out +FILES+= regress.s3.out +FILES+= regress.s4.out +FILES+= regress.s5.out +FILES+= regress.sg.out +FILES+= regress.sh +FILES+= regress.y.out + +SUBDIR= regress.multitest.out + +.include Copied and modified: head/usr.bin/sed/tests/inplace_race_test.sh (from r263225, head/tools/regression/usr.bin/sed/inplace_race.t) ============================================================================== --- head/tools/regression/usr.bin/sed/inplace_race.t Sun Mar 16 03:32:29 2014 (r263225, copy source) +++ head/usr.bin/sed/tests/inplace_race_test.sh Sun Mar 16 08:04:06 2014 (r263227) @@ -42,10 +42,6 @@ fi echo "1..1" -T=$(mktemp -d "${TMPDIR:-/tmp}/sed-test.XXXXXX") -trap 'cd /; rm -rf "$T"' 0 -cd "$T" - data=abababab data=$data$data$data$data data=$data$data$data$data Copied and modified: head/usr.bin/sed/tests/legacy_test.sh (from r263225, head/tools/regression/usr.bin/sed/regress.t) ============================================================================== --- head/tools/regression/usr.bin/sed/regress.t Sun Mar 16 03:32:29 2014 (r263225, copy source) +++ head/usr.bin/sed/tests/legacy_test.sh Sun Mar 16 08:04:06 2014 (r263227) @@ -1,6 +1,6 @@ #!/bin/sh # $FreeBSD$ -cd `dirname $0` +SRCDIR="$(dirname "${0}")"; export SRCDIR -m4 ../regress.m4 regress.sh | sh +m4 "${SRCDIR}/../regress.m4" "${SRCDIR}/regress.sh" | sh Copied and modified: head/usr.bin/sed/tests/multi_test.sh (from r263225, head/tools/regression/usr.bin/sed/multitest.t) ============================================================================== --- head/tools/regression/usr.bin/sed/multitest.t Sun Mar 16 03:32:29 2014 (r263225, copy source) +++ head/usr.bin/sed/tests/multi_test.sh Sun Mar 16 08:04:06 2014 (r263227) @@ -41,10 +41,11 @@ # of the BSD sed. Each test should have a unique mark name, which is # used for naming the corresponding file in regress.multitest.out. +SRCDIR=$(dirname $0) + main() { - cd `dirname $0` - REGRESS=regress.multitest.out + REGRESS=${SRCDIR}/regress.multitest.out DICT=/usr/share/dict/words awk 'END { for (i = 1; i < 15; i++) print "l1_" i}' lines1 Added: head/usr.bin/sed/tests/regress.multitest.out/Makefile ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/usr.bin/sed/tests/regress.multitest.out/Makefile Sun Mar 16 08:04:06 2014 (r263227) @@ -0,0 +1,136 @@ +# $FreeBSD$ + +TESTSDIR= ${TESTSBASE}/usr.bin/sed/regress.multitest.out + +FILESDIR= ${TESTSDIR} +FILES= 1.1 +FILES+= 1.10 +FILES+= 1.11 +FILES+= 1.12 +FILES+= 1.13 +FILES+= 1.14 +FILES+= 1.15 +FILES+= 1.16 +FILES+= 1.17 +FILES+= 1.18 +FILES+= 1.2 +FILES+= 1.3 +FILES+= 1.4 +FILES+= 1.4.1 +FILES+= 1.5 +FILES+= 1.6 +FILES+= 1.7 +FILES+= 1.8 +FILES+= 1.9 +FILES+= 2.1 +FILES+= 2.10 +FILES+= 2.11 +FILES+= 2.12 +FILES+= 2.13 +FILES+= 2.14 +FILES+= 2.15 +FILES+= 2.16 +FILES+= 2.17 +FILES+= 2.18 +FILES+= 2.19 +FILES+= 2.2 +FILES+= 2.20 +FILES+= 2.21 +FILES+= 2.22 +FILES+= 2.3 +FILES+= 2.4 +FILES+= 2.5 +FILES+= 2.6 +FILES+= 2.7 +FILES+= 2.8 +FILES+= 2.9 +FILES+= 3.1 +FILES+= 3.2 +FILES+= 3.3 +FILES+= 3.4 +FILES+= 4.1 +FILES+= 4.2 +FILES+= 4.3 +FILES+= 4.4 +FILES+= 4.5 +FILES+= 4.6 +FILES+= 4.7 +FILES+= 4.8 +FILES+= 5.1 +FILES+= 5.2 +FILES+= 5.3 +FILES+= 5.4 +FILES+= 5.5 +FILES+= 5.6 +FILES+= 5.7 +FILES+= 5.8 *** DIFF OUTPUT TRUNCATED AT 1000 LINES ***