diff options
author | ngie <ngie@FreeBSD.org> | 2015-10-12 08:16:03 +0000 |
---|---|---|
committer | ngie <ngie@FreeBSD.org> | 2015-10-12 08:16:03 +0000 |
commit | dd1f61836762d6bb73b65e51a11b769b15667412 (patch) | |
tree | 67a85c5694bcdbbc7b1839be795cd25ef318ed91 /usr.bin | |
parent | 2bf557556019c20890d0a2879f67d834b0527735 (diff) | |
download | FreeBSD-src-dd1f61836762d6bb73b65e51a11b769b15667412.zip FreeBSD-src-dd1f61836762d6bb73b65e51a11b769b15667412.tar.gz |
Refactor the test/ Makefiles after recent changes to bsd.test.mk (r289158) and
netbsd-tests.test.mk (r289151)
- Eliminate explicit OBJTOP/SRCTOP setting
- Convert all ad hoc NetBSD test integration over to netbsd-tests.test.mk
- Remove unnecessary TESTSDIR setting
- Use SRCTOP where possible for clarity
MFC after: 2 weeks
Sponsored by: EMC / Isilon Storage Divison
Diffstat (limited to 'usr.bin')
28 files changed, 20 insertions, 84 deletions
diff --git a/usr.bin/apply/tests/Makefile b/usr.bin/apply/tests/Makefile index 332bf7d..5ff6c28 100644 --- a/usr.bin/apply/tests/Makefile +++ b/usr.bin/apply/tests/Makefile @@ -1,7 +1,5 @@ # $FreeBSD$ -TESTSDIR= ${TESTSBASE}/usr.bin/apply - TAP_TESTS_SH= legacy_test FILESDIR= ${TESTSDIR} diff --git a/usr.bin/basename/tests/Makefile b/usr.bin/basename/tests/Makefile index 32dedab..bad7b28 100644 --- a/usr.bin/basename/tests/Makefile +++ b/usr.bin/basename/tests/Makefile @@ -1,12 +1,7 @@ # $FreeBSD$ -TESTSRC= ${.CURDIR}/../../../contrib/netbsd-tests/usr.bin/basename -.PATH: ${TESTSRC} +NETBSD_ATF_TESTS_SH= basename_test -.include <bsd.own.mk> - -TESTSDIR= ${TESTSBASE}/usr.bin/basename -ATF_TESTS_SH= basename_test -ATF_TESTS_SH_SRC_basename_test= t_basename.sh +.include <netbsd-tests.test.mk> .include <bsd.test.mk> diff --git a/usr.bin/calendar/tests/Makefile b/usr.bin/calendar/tests/Makefile index f3d592e..b9b0607 100644 --- a/usr.bin/calendar/tests/Makefile +++ b/usr.bin/calendar/tests/Makefile @@ -1,7 +1,5 @@ # $FreeBSD$ -TESTSDIR= ${TESTSBASE}/usr.bin/calendar - TAP_TESTS_SH= legacy_test FILESDIR= ${TESTSDIR} diff --git a/usr.bin/cmp/tests/Makefile b/usr.bin/cmp/tests/Makefile index 1c054c6..bfae46c 100644 --- a/usr.bin/cmp/tests/Makefile +++ b/usr.bin/cmp/tests/Makefile @@ -1,12 +1,9 @@ # $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 +NETBSD_ATF_TESTS_SH= cmp_test + +.include <netbsd-tests.test.mk> .include <bsd.test.mk> diff --git a/usr.bin/col/tests/Makefile b/usr.bin/col/tests/Makefile index 43838e9..cf02083 100644 --- a/usr.bin/col/tests/Makefile +++ b/usr.bin/col/tests/Makefile @@ -1,7 +1,5 @@ # $FreeBSD$ -TESTSDIR= ${TESTSBASE}/usr.bin/col - ATF_TESTS_SH= col FILES= rlf.in \ diff --git a/usr.bin/comm/tests/Makefile b/usr.bin/comm/tests/Makefile index 172943d..065b3b4 100644 --- a/usr.bin/comm/tests/Makefile +++ b/usr.bin/comm/tests/Makefile @@ -1,7 +1,5 @@ # $FreeBSD$ -TESTSDIR= ${TESTSBASE}/usr.bin/comm - TAP_TESTS_SH= legacy_test FILESDIR= ${TESTSDIR} diff --git a/usr.bin/cut/tests/Makefile b/usr.bin/cut/tests/Makefile index b324a78..7d8707d 100644 --- a/usr.bin/cut/tests/Makefile +++ b/usr.bin/cut/tests/Makefile @@ -1,13 +1,8 @@ # $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 +NETBSD_ATF_TESTS_SH= cut_test FILESDIR= ${TESTSDIR} FILES= d_basic.out @@ -18,4 +13,6 @@ FILES+= d_latin1.in FILES+= d_sflag.out FILES+= d_utf8.in +.include <netbsd-tests.test.mk> + .include <bsd.test.mk> diff --git a/usr.bin/dirname/tests/Makefile b/usr.bin/dirname/tests/Makefile index 5b84c57..6688e0d 100644 --- a/usr.bin/dirname/tests/Makefile +++ b/usr.bin/dirname/tests/Makefile @@ -1,12 +1,9 @@ # $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 +NETBSD_ATF_TESTS_SH= dirname_test + +.include <netbsd-tests.test.mk> .include <bsd.test.mk> diff --git a/usr.bin/file2c/tests/Makefile b/usr.bin/file2c/tests/Makefile index 8854eb4..50267f0 100644 --- a/usr.bin/file2c/tests/Makefile +++ b/usr.bin/file2c/tests/Makefile @@ -1,7 +1,5 @@ # $FreeBSD$ -TESTSDIR= ${TESTSBASE}/usr.bin/file2c - TAP_TESTS_SH= legacy_test FILESDIR= ${TESTSDIR} diff --git a/usr.bin/grep/tests/Makefile b/usr.bin/grep/tests/Makefile index 59b948c..7744fcb 100644 --- a/usr.bin/grep/tests/Makefile +++ b/usr.bin/grep/tests/Makefile @@ -1,14 +1,8 @@ # $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 +NETBSD_ATF_TESTS_SH= grep_test FILESDIR= ${TESTSDIR} FILES= d_basic.out @@ -38,4 +32,6 @@ FILES+= d_whole_line.out FILES+= d_word_regexps.out FILES+= d_zgrep.out +.include <netbsd-tests.test.mk> + .include <bsd.test.mk> diff --git a/usr.bin/gzip/tests/Makefile b/usr.bin/gzip/tests/Makefile index 155d739..03a5852 100644 --- a/usr.bin/gzip/tests/Makefile +++ b/usr.bin/gzip/tests/Makefile @@ -1,12 +1,9 @@ # $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 +NETBSD_ATF_TESTS_SH= gzip_test + +.include <netbsd-tests.test.mk> .include <bsd.test.mk> diff --git a/usr.bin/ident/tests/Makefile b/usr.bin/ident/tests/Makefile index cc29bb8..2ae27cf 100644 --- a/usr.bin/ident/tests/Makefile +++ b/usr.bin/ident/tests/Makefile @@ -1,7 +1,5 @@ # $FreeBSD$ -TESTSDIR= ${TESTSBASE}/usr.bin/ident - ATF_TESTS_SH= ident FILES= test.in \ test.out \ diff --git a/usr.bin/join/tests/Makefile b/usr.bin/join/tests/Makefile index 2d5580f..16f522f 100644 --- a/usr.bin/join/tests/Makefile +++ b/usr.bin/join/tests/Makefile @@ -1,7 +1,5 @@ # $FreeBSD$ -TESTSDIR= ${TESTSBASE}/usr.bin/join - TAP_TESTS_SH= legacy_test FILESDIR= ${TESTSDIR} diff --git a/usr.bin/jot/tests/Makefile b/usr.bin/jot/tests/Makefile index ef20eb2..63f7631 100644 --- a/usr.bin/jot/tests/Makefile +++ b/usr.bin/jot/tests/Makefile @@ -1,7 +1,5 @@ # $FreeBSD$ -TESTSDIR= ${TESTSBASE}/usr.bin/jot - TAP_TESTS_SH= legacy_test FILESDIR= ${TESTSDIR} diff --git a/usr.bin/lastcomm/tests/Makefile b/usr.bin/lastcomm/tests/Makefile index b0fac0e..55ce574 100644 --- a/usr.bin/lastcomm/tests/Makefile +++ b/usr.bin/lastcomm/tests/Makefile @@ -1,7 +1,5 @@ # $FreeBSD$ -TESTSDIR= ${TESTSBASE}/usr.bin/lastcomm - TAP_TESTS_SH= legacy_test FILESDIR= ${TESTSDIR} diff --git a/usr.bin/m4/tests/Makefile b/usr.bin/m4/tests/Makefile index 2eebc07..6a48677 100644 --- a/usr.bin/m4/tests/Makefile +++ b/usr.bin/m4/tests/Makefile @@ -1,7 +1,5 @@ # $FreeBSD$ -TESTSDIR= ${TESTSBASE}/usr.bin/m4 - TAP_TESTS_SH= legacy_test FILESDIR= ${TESTSDIR} diff --git a/usr.bin/mkimg/tests/Makefile b/usr.bin/mkimg/tests/Makefile index 144b4fc..c2c6d51 100644 --- a/usr.bin/mkimg/tests/Makefile +++ b/usr.bin/mkimg/tests/Makefile @@ -1,7 +1,5 @@ # $FreeBSD$ -TESTSDIR= ${TESTSBASE}/usr.bin/mkimg - ATF_TESTS_SH= mkimg SOURCES!= cd ${.CURDIR}; echo *.uu diff --git a/usr.bin/ncal/tests/Makefile b/usr.bin/ncal/tests/Makefile index 170caac..23b235f 100644 --- a/usr.bin/ncal/tests/Makefile +++ b/usr.bin/ncal/tests/Makefile @@ -1,7 +1,5 @@ # $FreeBSD$ -TESTSDIR= ${TESTSBASE}/usr.bin/ncal - TAP_TESTS_SH= legacy_test FILESDIR= ${TESTSDIR} diff --git a/usr.bin/printf/tests/Makefile b/usr.bin/printf/tests/Makefile index 5e212ef..58c80c7 100644 --- a/usr.bin/printf/tests/Makefile +++ b/usr.bin/printf/tests/Makefile @@ -1,7 +1,5 @@ # $FreeBSD$ -TESTSDIR= ${TESTSBASE}/usr.bin/printf - TAP_TESTS_SH= legacy_test FILESDIR= ${TESTSDIR} diff --git a/usr.bin/sed/tests/Makefile b/usr.bin/sed/tests/Makefile index 02d2b89..a23d4a9 100644 --- a/usr.bin/sed/tests/Makefile +++ b/usr.bin/sed/tests/Makefile @@ -1,7 +1,5 @@ # $FreeBSD$ -TESTSDIR= ${TESTSBASE}/usr.bin/sed - TAP_TESTS_SH= legacy_test TAP_TESTS_SH+= multi_test TEST_METADATA.multi_test+= required_files="/usr/share/dict/words" diff --git a/usr.bin/soelim/tests/Makefile b/usr.bin/soelim/tests/Makefile index 4d787cf..7c44d08 100644 --- a/usr.bin/soelim/tests/Makefile +++ b/usr.bin/soelim/tests/Makefile @@ -1,7 +1,5 @@ # $FreeBSD$ -TESTSDIR= ${TESTSBASE}/usr.bin/soelim - ATF_TESTS_SH= soelim FILES= nonexisting.in \ diff --git a/usr.bin/tests/Makefile b/usr.bin/tests/Makefile index af7a8bf..08b47bc 100644 --- a/usr.bin/tests/Makefile +++ b/usr.bin/tests/Makefile @@ -2,9 +2,7 @@ .include <bsd.own.mk> -TESTSDIR= ${TESTSBASE}/usr.bin - -.PATH: ${.CURDIR:H:H}/tests +.PATH: ${SRCTOP}/tests KYUAFILE= yes FILESDIR= ${TESTSDIR} diff --git a/usr.bin/truncate/tests/Makefile b/usr.bin/truncate/tests/Makefile index bfa15db..82cd606 100644 --- a/usr.bin/truncate/tests/Makefile +++ b/usr.bin/truncate/tests/Makefile @@ -1,6 +1,5 @@ # $FreeBSD$ -TESTSDIR= ${TESTSBASE}/usr.bin/truncate -ATF_TESTS_SH= truncate_test +ATF_TESTS_SH= truncate_test .include <bsd.test.mk> diff --git a/usr.bin/units/tests/Makefile b/usr.bin/units/tests/Makefile index 0694eff..5b135f7 100644 --- a/usr.bin/units/tests/Makefile +++ b/usr.bin/units/tests/Makefile @@ -2,8 +2,6 @@ .include <bsd.own.mk> -TESTSDIR= ${TESTSBASE}/usr.bin/units - TAP_TESTS_SH= basics_test .include <bsd.test.mk> diff --git a/usr.bin/uudecode/tests/Makefile b/usr.bin/uudecode/tests/Makefile index 5fda16b..efd3f92 100644 --- a/usr.bin/uudecode/tests/Makefile +++ b/usr.bin/uudecode/tests/Makefile @@ -1,7 +1,5 @@ # $FreeBSD$ -TESTSDIR= ${TESTSBASE}/usr.bin/uudecode - TAP_TESTS_SH= legacy_test FILESDIR= ${TESTSDIR} diff --git a/usr.bin/uuencode/tests/Makefile b/usr.bin/uuencode/tests/Makefile index ca7088e..a36ef6c 100644 --- a/usr.bin/uuencode/tests/Makefile +++ b/usr.bin/uuencode/tests/Makefile @@ -1,7 +1,5 @@ # $FreeBSD$ -TESTSDIR= ${TESTSBASE}/usr.bin/uuencode - TAP_TESTS_SH= legacy_test FILESDIR= ${TESTSDIR} diff --git a/usr.bin/xargs/tests/Makefile b/usr.bin/xargs/tests/Makefile index cd14813..c8ef2c9 100644 --- a/usr.bin/xargs/tests/Makefile +++ b/usr.bin/xargs/tests/Makefile @@ -1,7 +1,5 @@ # $FreeBSD$ -TESTSDIR= ${TESTSBASE}/usr.bin/xargs - TAP_TESTS_SH= legacy_test FILESDIR= ${TESTSDIR} diff --git a/usr.bin/yacc/tests/Makefile b/usr.bin/yacc/tests/Makefile index 2e157ec..ad3abaa 100644 --- a/usr.bin/yacc/tests/Makefile +++ b/usr.bin/yacc/tests/Makefile @@ -2,12 +2,10 @@ .include <bsd.own.mk> -TEST_DIR= ${.CURDIR}/../../../contrib/byacc/test +TEST_DIR= ${SRCTOP}/contrib/byacc/test .PATH: ${TEST_DIR} ${TEST_DIR}/yacc -TESTSDIR= ${TESTSBASE}/usr.bin/yacc - PLAIN_TESTS_SH= yacc_tests # NOTE: due to caveats with how permissions are handled on FreeBSD # with root, this must be run as a non-privileged user; otherwise |