Migrate tools/regression/bin/ tests to the new layout.
This change is a proof of concept on how to easily integrate existing tests from the tools/regression/ hierarchy into the /usr/tests/ test suite and on how to adapt them to the new layout for src. To achieve these goals, this change: - Moves tests from tools/regression/bin/<tool>/ to bin/<tool>/tests/. - Renames the previous regress.sh files to legacy_test.sh. - Adds Makefiles to build and install the tests and all their supporting data files into /usr/tests/bin/. - Plugs the legacy_test test programs into the test suite using the new TAP backend for Kyua (appearing in 0.8) so that the code of the test programs does not have to change. - Registers the new directories in the BSD.test.dist mtree file. Reviewed by: freebsd-testing Approved by: rpaulo (mentor)
This commit is contained in:
parent
f4a4cdd166
commit
13de33a5dc
@ -52,6 +52,10 @@ SUBDIR+= rmail
|
||||
SUBDIR+= csh
|
||||
.endif
|
||||
|
||||
.if ${MK_TESTS} != "no"
|
||||
SUBDIR+= tests
|
||||
.endif
|
||||
|
||||
.include <bsd.arch.inc.mk>
|
||||
|
||||
SUBDIR:= ${SUBDIR:O}
|
||||
|
@ -1,7 +1,13 @@
|
||||
# @(#)Makefile 8.1 (Berkeley) 5/31/93
|
||||
# $FreeBSD$
|
||||
|
||||
.include <bsd.own.mk>
|
||||
|
||||
PROG= date
|
||||
SRCS= date.c netdate.c vary.c
|
||||
|
||||
.if ${MK_TESTS} != "no"
|
||||
SUBDIR+= tests
|
||||
.endif
|
||||
|
||||
.include <bsd.prog.mk>
|
||||
|
9
bin/date/tests/Makefile
Normal file
9
bin/date/tests/Makefile
Normal file
@ -0,0 +1,9 @@
|
||||
# $FreeBSD$
|
||||
|
||||
.include <bsd.own.mk>
|
||||
|
||||
TESTSDIR= ${TESTSBASE}/bin/date
|
||||
|
||||
TAP_TESTS_SH= legacy_test
|
||||
|
||||
.include <tap.test.mk>
|
@ -1,6 +1,12 @@
|
||||
# @(#)Makefile 8.2 (Berkeley) 4/2/94
|
||||
# $FreeBSD$
|
||||
|
||||
.include <bsd.own.mk>
|
||||
|
||||
PROG= mv
|
||||
|
||||
.if ${MK_TESTS} != "no"
|
||||
SUBDIR+= tests
|
||||
.endif
|
||||
|
||||
.include <bsd.prog.mk>
|
||||
|
9
bin/mv/tests/Makefile
Normal file
9
bin/mv/tests/Makefile
Normal file
@ -0,0 +1,9 @@
|
||||
# $FreeBSD$
|
||||
|
||||
.include <bsd.own.mk>
|
||||
|
||||
TESTSDIR= ${TESTSBASE}/bin/mv
|
||||
|
||||
TAP_TESTS_SH= legacy_test
|
||||
|
||||
.include <tap.test.mk>
|
@ -1,6 +1,8 @@
|
||||
# @(#)Makefile 8.1 (Berkeley) 5/31/93
|
||||
# $FreeBSD$
|
||||
|
||||
.include <bsd.own.mk>
|
||||
|
||||
# To install on versions prior to BSD 4.4 the following may have to be
|
||||
# defined with CFLAGS +=
|
||||
#
|
||||
@ -30,4 +32,8 @@ SRCS= ar_io.c ar_subs.c buf_subs.c cache.c cpio.c file_subs.c ftree.c \
|
||||
gen_subs.c getoldopt.c options.c pat_rep.c pax.c sel_subs.c \
|
||||
tables.c tar.c tty_subs.c
|
||||
|
||||
.if ${MK_TESTS} != "no"
|
||||
SUBDIR+= tests
|
||||
.endif
|
||||
|
||||
.include <bsd.prog.mk>
|
||||
|
9
bin/pax/tests/Makefile
Normal file
9
bin/pax/tests/Makefile
Normal file
@ -0,0 +1,9 @@
|
||||
# $FreeBSD$
|
||||
|
||||
.include <bsd.own.mk>
|
||||
|
||||
TESTSDIR= ${TESTSBASE}/bin/pax
|
||||
|
||||
TAP_TESTS_SH= legacy_test
|
||||
|
||||
.include <tap.test.mk>
|
0
tools/regression/bin/pax/regress.t → bin/pax/tests/legacy_test.sh
Executable file → Normal file
0
tools/regression/bin/pax/regress.t → bin/pax/tests/legacy_test.sh
Executable file → Normal file
@ -1,6 +1,8 @@
|
||||
# @(#)Makefile 8.4 (Berkeley) 5/5/95
|
||||
# $FreeBSD$
|
||||
|
||||
.include <bsd.own.mk>
|
||||
|
||||
PROG= sh
|
||||
INSTALLFLAGS= -S
|
||||
SHSRCS= alias.c arith_yacc.c arith_yylex.c cd.c echo.c error.c eval.c \
|
||||
@ -59,7 +61,8 @@ syntax.c syntax.h: mksyntax
|
||||
token.h: mktokens
|
||||
sh ${.CURDIR}/mktokens
|
||||
|
||||
regress:
|
||||
cd ${.CURDIR}/../../tools/regression/bin/sh && ${MAKE} SH=${.OBJDIR}/sh
|
||||
.if ${MK_TESTS} != "no"
|
||||
SUBDIR+= tests
|
||||
.endif
|
||||
|
||||
.include <bsd.prog.mk>
|
||||
|
12
bin/sh/tests/Makefile
Normal file
12
bin/sh/tests/Makefile
Normal file
@ -0,0 +1,12 @@
|
||||
# $FreeBSD$
|
||||
|
||||
.include <bsd.own.mk>
|
||||
|
||||
TESTSDIR= ${TESTSBASE}/bin/sh
|
||||
|
||||
TAP_TESTS_SH= legacy_test
|
||||
TAP_TESTS_SH_SED_legacy_test= -e 's,__SH__,/bin/sh,g'
|
||||
|
||||
SUBDIR+= builtins errors execution expansion parameters parser set-e
|
||||
|
||||
.include <tap.test.mk>
|
147
bin/sh/tests/builtins/Makefile
Normal file
147
bin/sh/tests/builtins/Makefile
Normal file
@ -0,0 +1,147 @@
|
||||
# $FreeBSD$
|
||||
|
||||
.include <bsd.own.mk>
|
||||
|
||||
FILESDIR= ${TESTSBASE}/bin/sh/builtins
|
||||
KYUAFILE= no
|
||||
|
||||
FILES= alias.0 alias.0.stdout
|
||||
FILES+= alias.1 alias.1.stderr
|
||||
FILES+= alias3.0 alias3.0.stdout
|
||||
FILES+= alias4.0
|
||||
FILES+= break1.0
|
||||
FILES+= break2.0 break2.0.stdout
|
||||
FILES+= break3.0
|
||||
FILES+= break4.4
|
||||
FILES+= break5.4
|
||||
FILES+= builtin1.0
|
||||
FILES+= case1.0
|
||||
FILES+= case2.0
|
||||
FILES+= case3.0
|
||||
FILES+= case4.0
|
||||
FILES+= case5.0
|
||||
FILES+= case6.0
|
||||
FILES+= case7.0
|
||||
FILES+= case8.0
|
||||
FILES+= case9.0
|
||||
FILES+= case10.0
|
||||
FILES+= case11.0
|
||||
FILES+= case12.0
|
||||
FILES+= case13.0
|
||||
FILES+= case14.0
|
||||
FILES+= case15.0
|
||||
FILES+= case16.0
|
||||
FILES+= case17.0
|
||||
FILES+= case18.0
|
||||
FILES+= case19.0
|
||||
FILES+= cd1.0
|
||||
FILES+= cd2.0
|
||||
FILES+= cd3.0
|
||||
FILES+= cd4.0
|
||||
FILES+= cd5.0
|
||||
FILES+= cd6.0
|
||||
FILES+= cd7.0
|
||||
FILES+= cd8.0
|
||||
FILES+= command1.0
|
||||
FILES+= command2.0
|
||||
FILES+= command3.0
|
||||
FILES+= command3.0.stdout
|
||||
FILES+= command4.0
|
||||
FILES+= command5.0
|
||||
FILES+= command5.0.stdout
|
||||
FILES+= command6.0
|
||||
FILES+= command6.0.stdout
|
||||
FILES+= command7.0
|
||||
FILES+= command8.0
|
||||
FILES+= command9.0
|
||||
FILES+= command10.0
|
||||
FILES+= command11.0
|
||||
FILES+= command12.0
|
||||
FILES+= dot1.0
|
||||
FILES+= dot2.0
|
||||
FILES+= dot3.0
|
||||
FILES+= dot4.0
|
||||
FILES+= eval1.0
|
||||
FILES+= eval2.0
|
||||
FILES+= eval3.0
|
||||
FILES+= eval4.0
|
||||
FILES+= eval5.0
|
||||
FILES+= eval6.0
|
||||
FILES+= exec1.0
|
||||
FILES+= exec2.0
|
||||
FILES+= exit1.0
|
||||
FILES+= exit2.8
|
||||
FILES+= exit3.0
|
||||
FILES+= export1.0
|
||||
FILES+= fc1.0
|
||||
FILES+= fc2.0
|
||||
FILES+= for1.0
|
||||
FILES+= for2.0
|
||||
FILES+= for3.0
|
||||
FILES+= getopts1.0 getopts1.0.stdout
|
||||
FILES+= getopts2.0 getopts2.0.stdout
|
||||
FILES+= hash1.0 hash1.0.stdout
|
||||
FILES+= hash2.0 hash2.0.stdout
|
||||
FILES+= hash3.0 hash3.0.stdout
|
||||
FILES+= hash4.0
|
||||
FILES+= jobid1.0
|
||||
FILES+= jobid2.0
|
||||
FILES+= lineno.0 lineno.0.stdout
|
||||
FILES+= local1.0
|
||||
FILES+= local2.0
|
||||
FILES+= local3.0
|
||||
FILES+= local4.0
|
||||
FILES+= locale1.0
|
||||
FILES+= printf1.0
|
||||
FILES+= printf2.0
|
||||
FILES+= printf3.0
|
||||
FILES+= printf4.0
|
||||
FILES+= read1.0 read1.0.stdout
|
||||
FILES+= read2.0
|
||||
FILES+= read3.0 read3.0.stdout
|
||||
FILES+= read4.0 read4.0.stdout
|
||||
FILES+= read5.0
|
||||
FILES+= read6.0
|
||||
FILES+= read7.0
|
||||
FILES+= return1.0
|
||||
FILES+= return2.1
|
||||
FILES+= return3.1
|
||||
FILES+= return4.0
|
||||
FILES+= return5.0
|
||||
FILES+= return6.4
|
||||
FILES+= return7.4
|
||||
FILES+= return8.0
|
||||
FILES+= set1.0
|
||||
FILES+= set2.0
|
||||
FILES+= trap1.0
|
||||
FILES+= trap10.0
|
||||
FILES+= trap11.0
|
||||
FILES+= trap12.0
|
||||
FILES+= trap13.0
|
||||
FILES+= trap14.0
|
||||
FILES+= trap2.0
|
||||
FILES+= trap3.0
|
||||
FILES+= trap4.0
|
||||
FILES+= trap5.0
|
||||
FILES+= trap6.0
|
||||
FILES+= trap7.0
|
||||
FILES+= trap8.0
|
||||
FILES+= trap9.0
|
||||
FILES+= type1.0 type1.0.stderr
|
||||
FILES+= type2.0
|
||||
FILES+= type3.0
|
||||
FILES+= unalias.0
|
||||
FILES+= var-assign.0
|
||||
FILES+= var-assign2.0
|
||||
FILES+= wait1.0
|
||||
FILES+= wait2.0
|
||||
FILES+= wait3.0
|
||||
FILES+= wait4.0
|
||||
FILES+= wait5.0
|
||||
FILES+= wait6.0
|
||||
FILES+= wait7.0
|
||||
FILES+= wait8.0
|
||||
FILES+= wait9.127
|
||||
FILES+= wait10.0
|
||||
|
||||
.include <bsd.test.mk>
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user