summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorngie <ngie@FreeBSD.org>2015-10-12 08:16:03 +0000
committerngie <ngie@FreeBSD.org>2015-10-12 08:16:03 +0000
commitdd1f61836762d6bb73b65e51a11b769b15667412 (patch)
tree67a85c5694bcdbbc7b1839be795cd25ef318ed91
parent2bf557556019c20890d0a2879f67d834b0527735 (diff)
downloadFreeBSD-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
-rw-r--r--bin/cat/tests/Makefile6
-rw-r--r--bin/date/tests/Makefile2
-rw-r--r--bin/expr/tests/Makefile6
-rw-r--r--bin/ls/tests/Makefile2
-rw-r--r--bin/mv/tests/Makefile2
-rw-r--r--bin/pax/tests/Makefile2
-rw-r--r--bin/pkill/tests/Makefile2
-rw-r--r--bin/sh/tests/Makefile2
-rw-r--r--bin/sleep/tests/Makefile7
-rw-r--r--bin/test/tests/Makefile2
-rw-r--r--bin/tests/Makefile4
-rw-r--r--cddl/lib/tests/Makefile4
-rw-r--r--cddl/sbin/tests/Makefile4
-rw-r--r--cddl/tests/Makefile4
-rw-r--r--cddl/usr.bin/tests/Makefile4
-rw-r--r--cddl/usr.sbin/dtrace/tests/Makefile3
-rw-r--r--cddl/usr.sbin/tests/Makefile4
-rw-r--r--gnu/lib/tests/Makefile4
-rw-r--r--gnu/tests/Makefile4
-rw-r--r--gnu/usr.bin/diff/tests/Makefile11
-rw-r--r--gnu/usr.bin/tests/Makefile4
-rw-r--r--lib/atf/libatf-c++/tests/Makefile3
-rw-r--r--lib/atf/libatf-c++/tests/detail/Makefile2
-rw-r--r--lib/atf/libatf-c/tests/Makefile3
-rw-r--r--lib/atf/libatf-c/tests/detail/Makefile2
-rw-r--r--lib/atf/tests/Makefile2
-rw-r--r--lib/atf/tests/test-programs/Makefile2
-rw-r--r--lib/libc/tests/Makefile2
-rw-r--r--lib/libc/tests/Makefile.netbsd-tests6
-rw-r--r--lib/libc/tests/c063/Makefile2
-rw-r--r--lib/libc/tests/db/Makefile2
-rw-r--r--lib/libc/tests/gen/Makefile2
-rw-r--r--lib/libc/tests/gen/execve/Makefile6
-rw-r--r--lib/libc/tests/gen/posix_spawn/Makefile6
-rw-r--r--lib/libc/tests/hash/Makefile6
-rw-r--r--lib/libc/tests/inet/Makefile2
-rw-r--r--lib/libc/tests/locale/Makefile2
-rw-r--r--lib/libc/tests/net/Makefile2
-rw-r--r--lib/libc/tests/net/getaddrinfo/Makefile4
-rw-r--r--lib/libc/tests/regex/Makefile2
-rw-r--r--lib/libc/tests/rpc/Makefile1
-rw-r--r--lib/libc/tests/setjmp/Makefile4
-rw-r--r--lib/libc/tests/ssp/Makefile2
-rw-r--r--lib/libc/tests/stdio/Makefile2
-rw-r--r--lib/libc/tests/stdlib/Makefile2
-rw-r--r--lib/libc/tests/string/Makefile2
-rw-r--r--lib/libc/tests/sys/Makefile2
-rw-r--r--lib/libc/tests/termios/Makefile2
-rw-r--r--lib/libc/tests/time/Makefile2
-rw-r--r--lib/libc/tests/tls/Makefile1
-rw-r--r--lib/libc/tests/tls/dso/Makefile1
-rw-r--r--lib/libc/tests/tls_dso/Makefile2
-rw-r--r--lib/libc/tests/ttyio/Makefile2
-rw-r--r--lib/libcrypt/tests/Makefile2
-rw-r--r--lib/libmp/tests/Makefile2
-rw-r--r--lib/libnv/tests/Makefile2
-rw-r--r--lib/libpam/libpam/tests/Makefile2
-rw-r--r--lib/libproc/tests/Makefile3
-rw-r--r--lib/librt/tests/Makefile6
-rw-r--r--lib/libthr/tests/Makefile4
-rw-r--r--lib/libthr/tests/dlopen/Makefile2
-rw-r--r--lib/libthr/tests/dlopen/dso/Makefile1
-rw-r--r--lib/libutil/tests/Makefile2
-rw-r--r--lib/msun/tests/Makefile4
-rw-r--r--lib/tests/Makefile4
-rw-r--r--libexec/atf/atf-check/tests/Makefile4
-rw-r--r--libexec/atf/atf-sh/tests/Makefile4
-rw-r--r--libexec/atf/tests/Makefile4
-rw-r--r--libexec/rtld-elf/tests/Makefile1
-rw-r--r--libexec/tests/Makefile4
-rw-r--r--sbin/devd/tests/Makefile2
-rw-r--r--sbin/dhclient/tests/Makefile2
-rw-r--r--sbin/growfs/tests/Makefile2
-rw-r--r--sbin/ifconfig/tests/Makefile6
-rw-r--r--sbin/mdconfig/tests/Makefile3
-rw-r--r--sbin/tests/Makefile4
-rw-r--r--secure/lib/tests/Makefile4
-rw-r--r--secure/libexec/tests/Makefile4
-rw-r--r--secure/tests/Makefile4
-rw-r--r--secure/usr.bin/tests/Makefile4
-rw-r--r--secure/usr.sbin/tests/Makefile4
-rw-r--r--share/examples/tests/Makefile4
-rw-r--r--share/tests/Makefile2
-rw-r--r--tests/etc/Makefile2
-rw-r--r--tests/sys/mqueue/Makefile2
-rw-r--r--tests/sys/pjdfstest/tests/Makefile2
-rw-r--r--usr.bin/apply/tests/Makefile2
-rw-r--r--usr.bin/basename/tests/Makefile9
-rw-r--r--usr.bin/calendar/tests/Makefile2
-rw-r--r--usr.bin/cmp/tests/Makefile9
-rw-r--r--usr.bin/col/tests/Makefile2
-rw-r--r--usr.bin/comm/tests/Makefile2
-rw-r--r--usr.bin/cut/tests/Makefile9
-rw-r--r--usr.bin/dirname/tests/Makefile9
-rw-r--r--usr.bin/file2c/tests/Makefile2
-rw-r--r--usr.bin/grep/tests/Makefile10
-rw-r--r--usr.bin/gzip/tests/Makefile9
-rw-r--r--usr.bin/ident/tests/Makefile2
-rw-r--r--usr.bin/join/tests/Makefile2
-rw-r--r--usr.bin/jot/tests/Makefile2
-rw-r--r--usr.bin/lastcomm/tests/Makefile2
-rw-r--r--usr.bin/m4/tests/Makefile2
-rw-r--r--usr.bin/mkimg/tests/Makefile2
-rw-r--r--usr.bin/ncal/tests/Makefile2
-rw-r--r--usr.bin/printf/tests/Makefile2
-rw-r--r--usr.bin/sed/tests/Makefile2
-rw-r--r--usr.bin/soelim/tests/Makefile2
-rw-r--r--usr.bin/tests/Makefile4
-rw-r--r--usr.bin/truncate/tests/Makefile3
-rw-r--r--usr.bin/units/tests/Makefile2
-rw-r--r--usr.bin/uudecode/tests/Makefile2
-rw-r--r--usr.bin/uuencode/tests/Makefile2
-rw-r--r--usr.bin/xargs/tests/Makefile2
-rw-r--r--usr.bin/yacc/tests/Makefile4
-rw-r--r--usr.sbin/etcupdate/tests/Makefile2
-rw-r--r--usr.sbin/fstyp/tests/Makefile2
-rw-r--r--usr.sbin/newsyslog/tests/Makefile2
-rw-r--r--usr.sbin/nmtree/tests/Makefile4
-rw-r--r--usr.sbin/pw/tests/Makefile2
-rw-r--r--usr.sbin/sa/tests/Makefile2
-rw-r--r--usr.sbin/tests/Makefile4
121 files changed, 69 insertions, 321 deletions
diff --git a/bin/cat/tests/Makefile b/bin/cat/tests/Makefile
index 73f82e1..f68513c 100644
--- a/bin/cat/tests/Makefile
+++ b/bin/cat/tests/Makefile
@@ -1,11 +1,5 @@
# $FreeBSD$
-OBJTOP= ${.OBJDIR}/../../..
-SRCTOP= ${.CURDIR}/../../..
-TESTSRC= ${SRCTOP}/contrib/netbsd-tests/bin/cat
-
-TESTSDIR= ${TESTSBASE}/bin/cat
-
NETBSD_ATF_TESTS_SH= cat_test
FILESDIR= ${TESTSDIR}
diff --git a/bin/date/tests/Makefile b/bin/date/tests/Makefile
index d023195..ecce803 100644
--- a/bin/date/tests/Makefile
+++ b/bin/date/tests/Makefile
@@ -2,8 +2,6 @@
.include <bsd.own.mk>
-TESTSDIR= ${TESTSBASE}/bin/date
-
ATF_TESTS_SH= format_string_test
.include <bsd.test.mk>
diff --git a/bin/expr/tests/Makefile b/bin/expr/tests/Makefile
index 80c130c..21b0e99 100644
--- a/bin/expr/tests/Makefile
+++ b/bin/expr/tests/Makefile
@@ -1,11 +1,5 @@
# $FreeBSD$
-OBJTOP= ${.OBJDIR}/../../..
-SRCTOP= ${.CURDIR}/../../..
-TESTSRC= ${SRCTOP}/contrib/netbsd-tests/bin/expr
-
-TESTSDIR= ${TESTSBASE}/bin/expr
-
NETBSD_ATF_TESTS_SH= expr_test
ATF_TESTS_SH_SED_expr_test+= -e 's/eval expr/eval expr --/g'
diff --git a/bin/ls/tests/Makefile b/bin/ls/tests/Makefile
index ba8038c..89a2e8c 100644
--- a/bin/ls/tests/Makefile
+++ b/bin/ls/tests/Makefile
@@ -1,7 +1,5 @@
# $FreeBSD$
-TESTSDIR= ${TESTSBASE}/bin/ls
-
ATF_TESTS_SH+= ls_tests
# This seems like overkill, but the idea in mind is that all of the testcases
# should be runnable as !root
diff --git a/bin/mv/tests/Makefile b/bin/mv/tests/Makefile
index 3d437ef..229d96e 100644
--- a/bin/mv/tests/Makefile
+++ b/bin/mv/tests/Makefile
@@ -2,8 +2,6 @@
.include <bsd.own.mk>
-TESTSDIR= ${TESTSBASE}/bin/mv
-
TAP_TESTS_SH= legacy_test
.include <bsd.test.mk>
diff --git a/bin/pax/tests/Makefile b/bin/pax/tests/Makefile
index 1f27c18..8334fea 100644
--- a/bin/pax/tests/Makefile
+++ b/bin/pax/tests/Makefile
@@ -2,8 +2,6 @@
.include <bsd.own.mk>
-TESTSDIR= ${TESTSBASE}/bin/pax
-
TAP_TESTS_PERL= legacy_test
.include <bsd.test.mk>
diff --git a/bin/pkill/tests/Makefile b/bin/pkill/tests/Makefile
index a4a2c91..be46707 100644
--- a/bin/pkill/tests/Makefile
+++ b/bin/pkill/tests/Makefile
@@ -2,8 +2,6 @@
.include <bsd.own.mk>
-TESTSDIR= ${TESTSBASE}/bin/pkill
-
TAP_TESTS_SH= pgrep-F_test
TAP_TESTS_SH+= pgrep-LF_test
TAP_TESTS_SH+= pgrep-P_test
diff --git a/bin/sh/tests/Makefile b/bin/sh/tests/Makefile
index c092962..d93e19a 100644
--- a/bin/sh/tests/Makefile
+++ b/bin/sh/tests/Makefile
@@ -2,8 +2,6 @@
.include <bsd.own.mk>
-TESTSDIR= ${TESTSBASE}/bin/sh
-
TESTS_SUBDIRS+= builtins
TESTS_SUBDIRS+= errors
TESTS_SUBDIRS+= execution
diff --git a/bin/sleep/tests/Makefile b/bin/sleep/tests/Makefile
index 9b286e6..6fc95f3 100644
--- a/bin/sleep/tests/Makefile
+++ b/bin/sleep/tests/Makefile
@@ -1,12 +1,7 @@
# $FreeBSD$
-TESTSRC= ${.CURDIR}/../../../contrib/netbsd-tests/bin/sleep
-.PATH: ${TESTSRC}
-
.include <bsd.own.mk>
-TESTSDIR= ${TESTSBASE}/bin/sleep
-ATF_TESTS_SH= sleep_test
-ATF_TESTS_SH_SRC_sleep_test= t_sleep.sh
+NETBSD_ATF_TESTS_SH= sleep_test
.include <bsd.test.mk>
diff --git a/bin/test/tests/Makefile b/bin/test/tests/Makefile
index 5ee337a..a1a5d4f 100644
--- a/bin/test/tests/Makefile
+++ b/bin/test/tests/Makefile
@@ -2,8 +2,6 @@
.include <bsd.own.mk>
-TESTSDIR= ${TESTSBASE}/bin/test
-
TAP_TESTS_SH= legacy_test
# Some tests in here are silently not run when the tests are executed as
# root. Explicitly tell Kyua to drop privileges.
diff --git a/bin/tests/Makefile b/bin/tests/Makefile
index 7a59b10..a0e63e5 100644
--- a/bin/tests/Makefile
+++ b/bin/tests/Makefile
@@ -2,9 +2,7 @@
.include <bsd.own.mk>
-TESTSDIR= ${TESTSBASE}/bin
-
-.PATH: ${.CURDIR:H:H}/tests
+.PATH: ${SRCTOP}/tests
KYUAFILE= yes
.include <bsd.test.mk>
diff --git a/cddl/lib/tests/Makefile b/cddl/lib/tests/Makefile
index 4a49d9f..a0e63e5 100644
--- a/cddl/lib/tests/Makefile
+++ b/cddl/lib/tests/Makefile
@@ -2,9 +2,7 @@
.include <bsd.own.mk>
-TESTSDIR= ${TESTSBASE}/cddl/lib
-
-.PATH: ${.CURDIR:H:H:H}/tests
+.PATH: ${SRCTOP}/tests
KYUAFILE= yes
.include <bsd.test.mk>
diff --git a/cddl/sbin/tests/Makefile b/cddl/sbin/tests/Makefile
index 91bbaee..a0e63e5 100644
--- a/cddl/sbin/tests/Makefile
+++ b/cddl/sbin/tests/Makefile
@@ -2,9 +2,7 @@
.include <bsd.own.mk>
-TESTSDIR= ${TESTSBASE}/cddl/sbin
-
-.PATH: ${.CURDIR:H:H:H}/tests
+.PATH: ${SRCTOP}/tests
KYUAFILE= yes
.include <bsd.test.mk>
diff --git a/cddl/tests/Makefile b/cddl/tests/Makefile
index 34a27ea..a0e63e5 100644
--- a/cddl/tests/Makefile
+++ b/cddl/tests/Makefile
@@ -2,9 +2,7 @@
.include <bsd.own.mk>
-TESTSDIR= ${TESTSBASE}/cddl
-
-.PATH: ${.CURDIR:H:H}/tests
+.PATH: ${SRCTOP}/tests
KYUAFILE= yes
.include <bsd.test.mk>
diff --git a/cddl/usr.bin/tests/Makefile b/cddl/usr.bin/tests/Makefile
index c94d591..a0e63e5 100644
--- a/cddl/usr.bin/tests/Makefile
+++ b/cddl/usr.bin/tests/Makefile
@@ -2,9 +2,7 @@
.include <bsd.own.mk>
-TESTSDIR= ${TESTSBASE}/cddl/usr.bin
-
-.PATH: ${.CURDIR:H:H:H}/tests
+.PATH: ${SRCTOP}/tests
KYUAFILE= yes
.include <bsd.test.mk>
diff --git a/cddl/usr.sbin/dtrace/tests/Makefile b/cddl/usr.sbin/dtrace/tests/Makefile
index dfd2b54..7db6f2f 100644
--- a/cddl/usr.sbin/dtrace/tests/Makefile
+++ b/cddl/usr.sbin/dtrace/tests/Makefile
@@ -2,10 +2,9 @@
.include <bsd.own.mk>
-TESTSDIR= ${TESTSBASE}/cddl/usr.sbin/dtrace
TESTS_SUBDIRS+= common
-.PATH: ${.CURDIR:H:H:H:H}/tests
+.PATH: ${SRCTOP}/tests
KYUAFILE= YES
.PATH: ${.CURDIR}/tools
diff --git a/cddl/usr.sbin/tests/Makefile b/cddl/usr.sbin/tests/Makefile
index 0305aee..a0e63e5 100644
--- a/cddl/usr.sbin/tests/Makefile
+++ b/cddl/usr.sbin/tests/Makefile
@@ -2,9 +2,7 @@
.include <bsd.own.mk>
-TESTSDIR= ${TESTSBASE}/cddl/usr.sbin
-
-.PATH: ${.CURDIR:H:H:H}/tests
+.PATH: ${SRCTOP}/tests
KYUAFILE= yes
.include <bsd.test.mk>
diff --git a/gnu/lib/tests/Makefile b/gnu/lib/tests/Makefile
index 256e245..a0e63e5 100644
--- a/gnu/lib/tests/Makefile
+++ b/gnu/lib/tests/Makefile
@@ -2,9 +2,7 @@
.include <bsd.own.mk>
-TESTSDIR= ${TESTSBASE}/gnu/lib
-
-.PATH: ${.CURDIR:H:H:H}/tests
+.PATH: ${SRCTOP}/tests
KYUAFILE= yes
.include <bsd.test.mk>
diff --git a/gnu/tests/Makefile b/gnu/tests/Makefile
index de42fae..a0e63e5 100644
--- a/gnu/tests/Makefile
+++ b/gnu/tests/Makefile
@@ -2,9 +2,7 @@
.include <bsd.own.mk>
-TESTSDIR= ${TESTSBASE}/gnu
-
-.PATH: ${.CURDIR:H:H}/tests
+.PATH: ${SRCTOP}/tests
KYUAFILE= yes
.include <bsd.test.mk>
diff --git a/gnu/usr.bin/diff/tests/Makefile b/gnu/usr.bin/diff/tests/Makefile
index aa1629d..16439b3 100644
--- a/gnu/usr.bin/diff/tests/Makefile
+++ b/gnu/usr.bin/diff/tests/Makefile
@@ -1,17 +1,14 @@
# $FreeBSD$
-TESTSRC= ${.CURDIR}/../../../../contrib/netbsd-tests/usr.bin/diff
-.PATH: ${TESTSRC}
+TESTSRC= ${SRCTOP}/contrib/netbsd-tests/usr.bin/diff
-.include <bsd.own.mk>
-
-TESTSDIR= ${TESTSBASE}/gnu/usr.bin/diff
-ATF_TESTS_SH= diff_test
+NETBSD_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 <netbsd-tests.test.mk>
+
.include <bsd.test.mk>
diff --git a/gnu/usr.bin/tests/Makefile b/gnu/usr.bin/tests/Makefile
index eebbff6..a0e63e5 100644
--- a/gnu/usr.bin/tests/Makefile
+++ b/gnu/usr.bin/tests/Makefile
@@ -2,9 +2,7 @@
.include <bsd.own.mk>
-TESTSDIR= ${TESTSBASE}/gnu/usr.bin
-
-.PATH: ${.CURDIR:H:H:H}/tests
+.PATH: ${SRCTOP}/tests
KYUAFILE= yes
.include <bsd.test.mk>
diff --git a/lib/atf/libatf-c++/tests/Makefile b/lib/atf/libatf-c++/tests/Makefile
index 5f5a575..a069bb1 100644
--- a/lib/atf/libatf-c++/tests/Makefile
+++ b/lib/atf/libatf-c++/tests/Makefile
@@ -2,10 +2,9 @@
.include <bsd.init.mk>
-TESTSDIR= ${TESTSBASE}/lib/atf/libatf-c++
TESTS_SUBDIRS= detail
-ATF= ${.CURDIR:H:H:H:H}/contrib/atf
+ATF= ${SRCTOP}/contrib/atf
.PATH: ${ATF}/atf-c++
.PATH: ${ATF}/atf-c++/detail
diff --git a/lib/atf/libatf-c++/tests/detail/Makefile b/lib/atf/libatf-c++/tests/detail/Makefile
index 69c3e7b..f7d672e 100644
--- a/lib/atf/libatf-c++/tests/detail/Makefile
+++ b/lib/atf/libatf-c++/tests/detail/Makefile
@@ -4,7 +4,7 @@
TESTSDIR= ${TESTSBASE}/lib/atf/libatf-c++/detail
-ATF= ${.CURDIR:H:H:H:H:H}/contrib/atf
+ATF= ${SRCTOP}/contrib/atf
.PATH: ${ATF}/atf-c++/detail
CFLAGS+= -DATF_C_TESTS_BASE='"${TESTSBASE}/lib/atf/libatf-c"'
diff --git a/lib/atf/libatf-c/tests/Makefile b/lib/atf/libatf-c/tests/Makefile
index d5b6dc0..e864c2e 100644
--- a/lib/atf/libatf-c/tests/Makefile
+++ b/lib/atf/libatf-c/tests/Makefile
@@ -2,10 +2,9 @@
.include <bsd.init.mk>
-TESTSDIR= ${TESTSBASE}/lib/atf/libatf-c
TESTS_SUBDIRS= detail
-ATF= ${.CURDIR:H:H:H:H}/contrib/atf
+ATF= ${SRCTOP}/contrib/atf
.PATH: ${ATF}/atf-c
.PATH: ${ATF}/atf-c/detail
diff --git a/lib/atf/libatf-c/tests/detail/Makefile b/lib/atf/libatf-c/tests/detail/Makefile
index 02c1f2b..e47fd56 100644
--- a/lib/atf/libatf-c/tests/detail/Makefile
+++ b/lib/atf/libatf-c/tests/detail/Makefile
@@ -4,7 +4,7 @@
TESTSDIR= ${TESTSBASE}/lib/atf/libatf-c/detail
-ATF= ${.CURDIR:H:H:H:H:H}/contrib/atf
+ATF= ${SRCTOP}/contrib/atf
.PATH: ${ATF}/atf-c/detail
CFLAGS+= -DATF_INCLUDEDIR='"${INCLUDEDIR}"'
diff --git a/lib/atf/tests/Makefile b/lib/atf/tests/Makefile
index 7bc96c9..dc79bb3 100644
--- a/lib/atf/tests/Makefile
+++ b/lib/atf/tests/Makefile
@@ -4,7 +4,7 @@
TESTSDIR= ${TESTSBASE}/lib/atf
-.PATH: ${.CURDIR:H:H:H}/tests
+.PATH: ${SRCTOP}/tests
KYUAFILE= yes
SUBDIR= test-programs
diff --git a/lib/atf/tests/test-programs/Makefile b/lib/atf/tests/test-programs/Makefile
index b0c1c23..aa30826 100644
--- a/lib/atf/tests/test-programs/Makefile
+++ b/lib/atf/tests/test-programs/Makefile
@@ -5,7 +5,7 @@
TESTSDIR= ${TESTSBASE}/lib/atf/test-programs
KYUAFILE= yes
-ATF= ${.CURDIR:H:H:H:H}/contrib/atf
+ATF= ${SRCTOP}/contrib/atf
.PATH: ${ATF}/test-programs
CFLAGS+= -I${ATF}
diff --git a/lib/libc/tests/Makefile b/lib/libc/tests/Makefile
index 3036ce9..2e97151 100644
--- a/lib/libc/tests/Makefile
+++ b/lib/libc/tests/Makefile
@@ -2,8 +2,6 @@
.include <src.opts.mk>
-TESTSDIR= ${TESTSBASE}/lib/libc
-
SUBDIR= tls_dso
TESTS_SUBDIRS= c063
diff --git a/lib/libc/tests/Makefile.netbsd-tests b/lib/libc/tests/Makefile.netbsd-tests
index f364b1c..3238518 100644
--- a/lib/libc/tests/Makefile.netbsd-tests
+++ b/lib/libc/tests/Makefile.netbsd-tests
@@ -1,7 +1,7 @@
# $FreeBSD$
-OBJTOP?= ${.OBJDIR:H:H:H:H}
-SRCTOP?= ${.CURDIR:H:H:H:H}
-TESTSRC?= ${SRCTOP}/contrib/netbsd-tests/lib/libc/${.CURDIR:T}
+TESTSRC:= ${SRCTOP}/contrib/netbsd-tests/${RELDIR:C/libc\/tests/libc/}
+
+TESTSDIR:= ${TESTSBASE}/${RELDIR:C/libc\/tests/libc/}
.include <netbsd-tests.test.mk>
diff --git a/lib/libc/tests/c063/Makefile b/lib/libc/tests/c063/Makefile
index 5f4e1ca..2e4565c 100644
--- a/lib/libc/tests/c063/Makefile
+++ b/lib/libc/tests/c063/Makefile
@@ -1,7 +1,5 @@
# $FreeBSD$
-TESTSDIR= ${TESTSBASE}/lib/libc/c063
-
#TODO: t_o_search
NETBSD_ATF_TESTS_C= faccessat
diff --git a/lib/libc/tests/db/Makefile b/lib/libc/tests/db/Makefile
index ed1d6ca..eb0ce39 100644
--- a/lib/libc/tests/db/Makefile
+++ b/lib/libc/tests/db/Makefile
@@ -1,7 +1,5 @@
# $FreeBSD$
-TESTSDIR= ${TESTSBASE}/lib/libc/db
-
BINDIR= ${TESTSDIR}
PROGS= h_db
diff --git a/lib/libc/tests/gen/Makefile b/lib/libc/tests/gen/Makefile
index f9a0bd4..90f6573 100644
--- a/lib/libc/tests/gen/Makefile
+++ b/lib/libc/tests/gen/Makefile
@@ -2,8 +2,6 @@
.include <bsd.own.mk>
-TESTSDIR= ${TESTSBASE}/lib/libc/gen
-
ATF_TESTS_C= arc4random_test
ATF_TESTS_C+= fpclassify2_test
diff --git a/lib/libc/tests/gen/execve/Makefile b/lib/libc/tests/gen/execve/Makefile
index 2106a15..5e8bc6f 100644
--- a/lib/libc/tests/gen/execve/Makefile
+++ b/lib/libc/tests/gen/execve/Makefile
@@ -1,13 +1,7 @@
# $FreeBSD$
-OBJTOP= ${.OBJDIR:H:H:H:H:H}
-SRCTOP= ${.CURDIR:H:H:H:H:H}
-TESTSRC= ${SRCTOP}/contrib/netbsd-tests/lib/libc/gen/${.CURDIR:T}
-
.include <bsd.own.mk>
-TESTSDIR= ${TESTSBASE}/lib/libc/gen/execve
-
NETBSD_ATF_TESTS_C= execve_test
.include "../../Makefile.netbsd-tests"
diff --git a/lib/libc/tests/gen/posix_spawn/Makefile b/lib/libc/tests/gen/posix_spawn/Makefile
index f20bbd7..9bb2cf1 100644
--- a/lib/libc/tests/gen/posix_spawn/Makefile
+++ b/lib/libc/tests/gen/posix_spawn/Makefile
@@ -1,13 +1,7 @@
# $FreeBSD$
-OBJTOP= ${.OBJDIR:H:H:H:H:H}
-SRCTOP= ${.CURDIR:H:H:H:H:H}
-TESTSRC= ${SRCTOP}/contrib/netbsd-tests/lib/libc/gen/${.CURDIR:T}
-
.include <bsd.own.mk>
-TESTSDIR= ${TESTSBASE}/lib/libc/gen/posix_spawn
-
BINDIR= ${TESTSDIR}
NETBSD_ATF_TESTS_C= fileactions_test
diff --git a/lib/libc/tests/hash/Makefile b/lib/libc/tests/hash/Makefile
index 52fd569..6887253 100644
--- a/lib/libc/tests/hash/Makefile
+++ b/lib/libc/tests/hash/Makefile
@@ -2,8 +2,6 @@
.include <src.opts.mk>
-TESTSDIR= ${TESTSBASE}/lib/libc/hash
-
NETBSD_ATF_TESTS_C=
.if ${MK_OPENSSL} != "no"
@@ -29,8 +27,8 @@ LDADD+= -lmd
DPADD.sha2_test+= ${LIBCRYPTO}
LDADD.sha2_test+= -lcrypto
-CFLAGS.sha2_test+= -I${.CURDIR}/../../../../crypto/openssh/openbsd-compat
-CFLAGS.sha2_test+= -I${.CURDIR}/../../../../crypto/openssh
+CFLAGS.sha2_test+= -I${SRCTOP}/crypto/openssh/openbsd-compat
+CFLAGS.sha2_test+= -I${SRCTOP}/crypto/openssh
.include "../Makefile.netbsd-tests"
diff --git a/lib/libc/tests/inet/Makefile b/lib/libc/tests/inet/Makefile
index a15b96a..ee6f98e 100644
--- a/lib/libc/tests/inet/Makefile
+++ b/lib/libc/tests/inet/Makefile
@@ -2,8 +2,6 @@
.include <bsd.own.mk>
-TESTSDIR= ${TESTSBASE}/lib/libc/inet
-
NETBSD_ATF_TESTS_C= inet_network_test
.include "../Makefile.netbsd-tests"
diff --git a/lib/libc/tests/locale/Makefile b/lib/libc/tests/locale/Makefile
index e4dc553..c0e0378 100644
--- a/lib/libc/tests/locale/Makefile
+++ b/lib/libc/tests/locale/Makefile
@@ -2,8 +2,6 @@
.include <bsd.own.mk>
-TESTSDIR= ${TESTSBASE}/lib/libc/locale
-
NETBSD_ATF_TESTS_C= io_test
NETBSD_ATF_TESTS_C+= mbrtowc_test
NETBSD_ATF_TESTS_C+= mbstowcs_test
diff --git a/lib/libc/tests/net/Makefile b/lib/libc/tests/net/Makefile
index eb199f0..5a0d775 100644
--- a/lib/libc/tests/net/Makefile
+++ b/lib/libc/tests/net/Makefile
@@ -2,8 +2,6 @@
.include <bsd.own.mk>
-TESTSDIR= ${TESTSBASE}/lib/libc/net
-
BINDIR= ${TESTSDIR}
NETBSD_ATF_TESTS_C= getprotoent_test
diff --git a/lib/libc/tests/net/getaddrinfo/Makefile b/lib/libc/tests/net/getaddrinfo/Makefile
index a6b9eb1..d21d336 100644
--- a/lib/libc/tests/net/getaddrinfo/Makefile
+++ b/lib/libc/tests/net/getaddrinfo/Makefile
@@ -1,13 +1,9 @@
# $FreeBSD$
-OBJTOP= ${.OBJDIR:H:H:H:H:H}
-SRCTOP= ${.CURDIR:H:H:H:H:H}
TESTSRC= ${SRCTOP}/contrib/netbsd-tests/lib/libc/net/${.CURDIR:T}
.include <bsd.own.mk>
-TESTSDIR= ${TESTSBASE}/lib/libc/net/getaddrinfo
-
BINDIR= ${TESTSDIR}
.error "This testcase needs to be ported to FreeBSD (the output from getaddrinfo_test differs from NetBSD)"
diff --git a/lib/libc/tests/regex/Makefile b/lib/libc/tests/regex/Makefile
index 37b3277..fa60f6e 100644
--- a/lib/libc/tests/regex/Makefile
+++ b/lib/libc/tests/regex/Makefile
@@ -4,8 +4,6 @@
BINDIR= ${TESTSDIR}
-TESTSDIR= ${TESTSBASE}/lib/libc/regex
-
IMPLEMENTATION?= -DREGEX_SPENCER
CFLAGS.h_regex+=-I${TESTSRC} -I${.CURDIR:H:H}/regex
diff --git a/lib/libc/tests/rpc/Makefile b/lib/libc/tests/rpc/Makefile
index 0380294..e6e58e7 100644
--- a/lib/libc/tests/rpc/Makefile
+++ b/lib/libc/tests/rpc/Makefile
@@ -1,6 +1,5 @@
# $FreeBSD$
-TESTSDIR= ${TESTSBASE}/lib/libc/rpc
SRCS.xdr_test= ${RPCSRC:.x=_xdr.c} t_xdr.c ${RPCSRC:.x=.h}
NETBSD_ATF_TESTS_C= rpc_test
diff --git a/lib/libc/tests/setjmp/Makefile b/lib/libc/tests/setjmp/Makefile
index e4c7ae5..0ca2577 100644
--- a/lib/libc/tests/setjmp/Makefile
+++ b/lib/libc/tests/setjmp/Makefile
@@ -1,7 +1,5 @@
# $FreeBSD$
-TESTSDIR= ${TESTSBASE}/lib/libc/setjmp
-
NETBSD_ATF_TESTS_C= t_setjmp
NETBSD_ATF_TESTS_C+= t_threadjmp
@@ -10,4 +8,6 @@ LDADD.t_threadjmp+= -lpthread
WARNS?= 4
+.include "../Makefile.netbsd-tests"
+
.include <bsd.test.mk>
diff --git a/lib/libc/tests/ssp/Makefile b/lib/libc/tests/ssp/Makefile
index 7bc8660..ec7a82a 100644
--- a/lib/libc/tests/ssp/Makefile
+++ b/lib/libc/tests/ssp/Makefile
@@ -2,8 +2,6 @@
.include <bsd.own.mk>
-TESTSDIR= ${TESTSBASE}/lib/libc/ssp
-
NO_WERROR=
WARNS?= 2
diff --git a/lib/libc/tests/stdio/Makefile b/lib/libc/tests/stdio/Makefile
index 23d5c1e..f2d686b 100644
--- a/lib/libc/tests/stdio/Makefile
+++ b/lib/libc/tests/stdio/Makefile
@@ -1,7 +1,5 @@
# $FreeBSD$
-TESTSDIR= ${TESTSBASE}/lib/libc/stdio
-
ATF_TESTS_C= fmemopen2_test
NETBSD_ATF_TESTS_C= clearerr_test
diff --git a/lib/libc/tests/stdlib/Makefile b/lib/libc/tests/stdlib/Makefile
index 9171601..187ca5b 100644
--- a/lib/libc/tests/stdlib/Makefile
+++ b/lib/libc/tests/stdlib/Makefile
@@ -2,8 +2,6 @@
.include <bsd.own.mk>
-TESTSDIR= ${TESTSBASE}/lib/libc/stdlib
-
# TODO: t_getenv_thread, t_mi_vector_hash
NETBSD_ATF_TESTS_C= abs_test
NETBSD_ATF_TESTS_C+= atoi_test
diff --git a/lib/libc/tests/string/Makefile b/lib/libc/tests/string/Makefile
index 3c30ab6..d91af08 100644
--- a/lib/libc/tests/string/Makefile
+++ b/lib/libc/tests/string/Makefile
@@ -2,8 +2,6 @@
.include <bsd.own.mk>
-TESTSDIR= ${TESTSBASE}/lib/libc/string
-
# TODO: popcount, stresep
NETBSD_ATF_TESTS_C+= memchr
diff --git a/lib/libc/tests/sys/Makefile b/lib/libc/tests/sys/Makefile
index 89431bc..5cd596d 100644
--- a/lib/libc/tests/sys/Makefile
+++ b/lib/libc/tests/sys/Makefile
@@ -2,8 +2,6 @@
.include <bsd.own.mk>
-TESTSDIR= ${TESTSBASE}/lib/libc/sys
-
# TODO: clone, lwp_create, lwp_ctl, posix_fadvise, recvmmsg,
# swapcontext
NETBSD_ATF_TESTS_C+= access_test
diff --git a/lib/libc/tests/termios/Makefile b/lib/libc/tests/termios/Makefile
index 9a3fd66..0495d68 100644
--- a/lib/libc/tests/termios/Makefile
+++ b/lib/libc/tests/termios/Makefile
@@ -2,8 +2,6 @@
.include <bsd.own.mk>
-TESTSDIR= ${TESTSBASE}/lib/libc/termios
-
NETBSD_ATF_TESTS_C= tcsetpgrp_test
.include "../Makefile.netbsd-tests"
diff --git a/lib/libc/tests/time/Makefile b/lib/libc/tests/time/Makefile
index c2a55df..feb543d 100644
--- a/lib/libc/tests/time/Makefile
+++ b/lib/libc/tests/time/Makefile
@@ -2,8 +2,6 @@
.include <bsd.own.mk>
-TESTSDIR= ${TESTSBASE}/lib/libc/time
-
NETBSD_ATF_TESTS_C= mktime_test
NETBSD_ATF_TESTS_C+= strptime_test
diff --git a/lib/libc/tests/tls/Makefile b/lib/libc/tests/tls/Makefile
index e224895..b6b6719 100644
--- a/lib/libc/tests/tls/Makefile
+++ b/lib/libc/tests/tls/Makefile
@@ -2,7 +2,6 @@
.include <bsd.own.mk>
-TESTSDIR= ${TESTSBASE}/lib/libc/tls
.if !defined(NO_PIC)
SUBDIR+= dso
.endif
diff --git a/lib/libc/tests/tls/dso/Makefile b/lib/libc/tests/tls/dso/Makefile
index 466f950..9b698cd 100644
--- a/lib/libc/tests/tls/dso/Makefile
+++ b/lib/libc/tests/tls/dso/Makefile
@@ -1,7 +1,6 @@
# $FreeBSD$
OBJTOP= ${.OBJDIR:H:H:H:H:H}
-SRCTOP= ${.CURDIR:H:H:H:H:H}
TESTSRC= ${SRCTOP}/contrib/netbsd-tests/lib/libc/tls/${.CURDIR:T}
LIB= h_tls_dlopen
diff --git a/lib/libc/tests/tls_dso/Makefile b/lib/libc/tests/tls_dso/Makefile
index 5449799..b37ffec 100644
--- a/lib/libc/tests/tls_dso/Makefile
+++ b/lib/libc/tests/tls_dso/Makefile
@@ -1,5 +1,7 @@
# $FreeBSD$
+SRCDIR= ${SRCTOP}/contrib/netbsd/
+
.include <bsd.own.mk>
LIB= h_tls_dynamic
diff --git a/lib/libc/tests/ttyio/Makefile b/lib/libc/tests/ttyio/Makefile
index a1f320d..242f332 100644
--- a/lib/libc/tests/ttyio/Makefile
+++ b/lib/libc/tests/ttyio/Makefile
@@ -2,8 +2,6 @@
.include <bsd.own.mk>
-TESTSDIR= ${TESTSBASE}/lib/libc/ttyio
-
# TODO: ptm_test
NETBSD_ATF_TESTS_C= ttyio_test
diff --git a/lib/libcrypt/tests/Makefile b/lib/libcrypt/tests/Makefile
index 6f98b53a..2591a3b 100644
--- a/lib/libcrypt/tests/Makefile
+++ b/lib/libcrypt/tests/Makefile
@@ -2,8 +2,6 @@
# exercise libcrypt
-TESTSDIR= ${TESTSBASE}/lib/libcrypt
-
ATF_TESTS_C= crypt_tests
CFLAGS+= -I${.CURDIR:H}
diff --git a/lib/libmp/tests/Makefile b/lib/libmp/tests/Makefile
index e74e806..42749d0 100644
--- a/lib/libmp/tests/Makefile
+++ b/lib/libmp/tests/Makefile
@@ -1,7 +1,5 @@
# $FreeBSD$
-TESTSDIR= ${TESTSBASE}/lib/libmp
-
TAP_TESTS_C+= legacy_test
LIBADD+= mp
diff --git a/lib/libnv/tests/Makefile b/lib/libnv/tests/Makefile
index 38e7f13..cce0b5e 100644
--- a/lib/libnv/tests/Makefile
+++ b/lib/libnv/tests/Makefile
@@ -1,7 +1,5 @@
# $FreeBSD$
-TESTSDIR= ${TESTSBASE}/lib/libnv
-
ATF_TESTS_CXX= \
dnv_tests \
nv_array_tests \
diff --git a/lib/libpam/libpam/tests/Makefile b/lib/libpam/libpam/tests/Makefile
index 4532ace..e40936a 100644
--- a/lib/libpam/libpam/tests/Makefile
+++ b/lib/libpam/libpam/tests/Makefile
@@ -1,6 +1,6 @@
# $FreeBSD$
-OPENPAM = ${.CURDIR}/../../../../contrib/openpam
+OPENPAM= ${SRCTOP}/contrib/openpam
.PATH: ${OPENPAM}/t
TESTSDIR = ${TESTSBASE}/lib/libpam
diff --git a/lib/libproc/tests/Makefile b/lib/libproc/tests/Makefile
index 1f98467..326481d 100644
--- a/lib/libproc/tests/Makefile
+++ b/lib/libproc/tests/Makefile
@@ -1,7 +1,5 @@
# $FreeBSD$
-TESTSDIR= ${TESTSBASE}/lib/libproc
-
ATF_TESTS_C+= proc_test
PROGS= target_prog
@@ -15,7 +13,6 @@ DPADD+= ${LIBELF} ${LIBPROC} ${LIBRTLD_DB} ${LIBUTIL}
# for testing symbol lookup.
STRIP=
-MAN=
WARNS?= 6
.include <bsd.test.mk>
diff --git a/lib/librt/tests/Makefile b/lib/librt/tests/Makefile
index 95c5259..c4817ec 100644
--- a/lib/librt/tests/Makefile
+++ b/lib/librt/tests/Makefile
@@ -1,11 +1,5 @@
# $FreeBSD$
-OBJTOP= ${.OBJDIR:H:H:H}
-SRCTOP= ${.CURDIR:H:H:H}
-TESTSRC= ${SRCTOP}/contrib/netbsd-tests/lib/librt
-
-TESTSDIR= ${TESTSBASE}/lib/librt
-
LIBADD= rt
NETBSD_ATF_TESTS_C= sched_test
diff --git a/lib/libthr/tests/Makefile b/lib/libthr/tests/Makefile
index 11cf0e7..a5fc85e 100644
--- a/lib/libthr/tests/Makefile
+++ b/lib/libthr/tests/Makefile
@@ -1,11 +1,7 @@
# $FreeBSD$
-OBJTOP= ${.OBJDIR:H:H:H}
-SRCTOP= ${.CURDIR:H:H:H}
TESTSRC= ${SRCTOP}/contrib/netbsd-tests/lib/libpthread
-TESTSDIR= ${TESTSBASE}/lib/libthr
-
# TODO: t_name (missing pthread_getname_np support in FreeBSD)
NETBSD_ATF_TESTS_C= barrier_test
NETBSD_ATF_TESTS_C+= cond_test
diff --git a/lib/libthr/tests/dlopen/Makefile b/lib/libthr/tests/dlopen/Makefile
index 0764bfa..0893192 100644
--- a/lib/libthr/tests/dlopen/Makefile
+++ b/lib/libthr/tests/dlopen/Makefile
@@ -1,7 +1,5 @@
# $FreeBSD$
-OBJTOP= ${.OBJDIR:H:H:H:H}
-SRCTOP= ${.CURDIR:H:H:H:H}
TESTSRC= ${SRCTOP}/contrib/netbsd-tests/lib/libpthread/dlopen
.include <bsd.own.mk>
diff --git a/lib/libthr/tests/dlopen/dso/Makefile b/lib/libthr/tests/dlopen/dso/Makefile
index 080dec9..53356876 100644
--- a/lib/libthr/tests/dlopen/dso/Makefile
+++ b/lib/libthr/tests/dlopen/dso/Makefile
@@ -1,7 +1,6 @@
# $FreeBSD$
OBJTOP= ${.OBJDIR:H:H:H:H:H}
-SRCTOP= ${.CURDIR:H:H:H:H:H}
TESTSRC= ${SRCTOP}/contrib/netbsd-tests/lib/libpthread/dlopen/dso
SHLIB= h_pthread_dlopen
diff --git a/lib/libutil/tests/Makefile b/lib/libutil/tests/Makefile
index 4a675b0..81b2a49 100644
--- a/lib/libutil/tests/Makefile
+++ b/lib/libutil/tests/Makefile
@@ -1,7 +1,5 @@
# $FreeBSD$
-TESTSDIR= ${TESTSBASE}/lib/libutil
-
TAP_TESTS_C+= flopen_test
TAP_TESTS_C+= grp_test
TAP_TESTS_C+= humanize_number_test
diff --git a/lib/msun/tests/Makefile b/lib/msun/tests/Makefile
index 0479cfb..7888c3c 100644
--- a/lib/msun/tests/Makefile
+++ b/lib/msun/tests/Makefile
@@ -1,11 +1,7 @@
# $FreeBSD$
-OBJTOP= ${.OBJDIR:H:H:H}
-SRCTOP= ${.CURDIR:H:H:H}
TESTSRC= ${SRCTOP}/contrib/netbsd-tests/lib/libm
-TESTSDIR= ${TESTSBASE}/lib/msun
-
# All architectures on FreeBSD have fenv.h
CFLAGS+= -DHAVE_FENV_H
diff --git a/lib/tests/Makefile b/lib/tests/Makefile
index 935fd70..a0e63e5 100644
--- a/lib/tests/Makefile
+++ b/lib/tests/Makefile
@@ -2,9 +2,7 @@
.include <bsd.own.mk>
-TESTSDIR= ${TESTSBASE}/lib
-
-.PATH: ${.CURDIR:H:H}/tests
+.PATH: ${SRCTOP}/tests
KYUAFILE= yes
.include <bsd.test.mk>
diff --git a/libexec/atf/atf-check/tests/Makefile b/libexec/atf/atf-check/tests/Makefile
index 43a7498..87b26cb 100644
--- a/libexec/atf/atf-check/tests/Makefile
+++ b/libexec/atf/atf-check/tests/Makefile
@@ -2,9 +2,7 @@
.include <bsd.init.mk>
-TESTSDIR= ${TESTSBASE}/libexec/atf/atf-check
-
-ATF= ${.CURDIR:H:H:H:H}/contrib/atf
+ATF= ${SRCTOP}/contrib/atf
.PATH: ${ATF}/atf-sh
ATF_TESTS_SH= atf-check_test
diff --git a/libexec/atf/atf-sh/tests/Makefile b/libexec/atf/atf-sh/tests/Makefile
index 3360b97..9ccd6a7 100644
--- a/libexec/atf/atf-sh/tests/Makefile
+++ b/libexec/atf/atf-sh/tests/Makefile
@@ -2,9 +2,7 @@
.include <bsd.init.mk>
-TESTSDIR= ${TESTSBASE}/libexec/atf/atf-sh
-
-ATF= ${.CURDIR:H:H:H:H}/contrib/atf
+ATF= ${SRCTOP}/contrib/atf
.PATH: ${ATF}/atf-sh
ATF_TESTS_SH+= atf_check_test
diff --git a/libexec/atf/tests/Makefile b/libexec/atf/tests/Makefile
index 7aa9601..a0e63e5 100644
--- a/libexec/atf/tests/Makefile
+++ b/libexec/atf/tests/Makefile
@@ -2,9 +2,7 @@
.include <bsd.own.mk>
-TESTSDIR= ${TESTSBASE}/libexec/atf
-
-.PATH: ${.CURDIR:H:H:H}/tests
+.PATH: ${SRCTOP}/tests
KYUAFILE= yes
.include <bsd.test.mk>
diff --git a/libexec/rtld-elf/tests/Makefile b/libexec/rtld-elf/tests/Makefile
index f384218..7d3be68 100644
--- a/libexec/rtld-elf/tests/Makefile
+++ b/libexec/rtld-elf/tests/Makefile
@@ -2,7 +2,6 @@
.include <bsd.own.mk>
-TESTSDIR= ${TESTSBASE}/libexec/rtld-elf
SUBDIR+= libpythagoras target
ATF_TESTS_C= ld_library_pathfds
diff --git a/libexec/tests/Makefile b/libexec/tests/Makefile
index 665efab..a0e63e5 100644
--- a/libexec/tests/Makefile
+++ b/libexec/tests/Makefile
@@ -2,9 +2,7 @@
.include <bsd.own.mk>
-TESTSDIR= ${TESTSBASE}/libexec
-
-.PATH: ${.CURDIR:H:H}/tests
+.PATH: ${SRCTOP}/tests
KYUAFILE= yes
.include <bsd.test.mk>
diff --git a/sbin/devd/tests/Makefile b/sbin/devd/tests/Makefile
index ee679ce..e06928c 100644
--- a/sbin/devd/tests/Makefile
+++ b/sbin/devd/tests/Makefile
@@ -1,7 +1,5 @@
# $FreeBSD$
-TESTSDIR= ${TESTSBASE}/sbin/devd
-
ATF_TESTS_C= client_test
TEST_METADATA.client_test= required_programs="devd"
TEST_METADATA.client_test+= required_user="root"
diff --git a/sbin/dhclient/tests/Makefile b/sbin/dhclient/tests/Makefile
index a460f7f..45cc8c2 100644
--- a/sbin/dhclient/tests/Makefile
+++ b/sbin/dhclient/tests/Makefile
@@ -1,7 +1,5 @@
# $FreeBSD$
-TESTSDIR= ${TESTSBASE}/sbin/dhclient
-
.PATH: ${.CURDIR}/..
PLAIN_TESTS_C= option-domain-search_test
diff --git a/sbin/growfs/tests/Makefile b/sbin/growfs/tests/Makefile
index 7a6a831..6a3208d 100644
--- a/sbin/growfs/tests/Makefile
+++ b/sbin/growfs/tests/Makefile
@@ -1,7 +1,5 @@
# $FreeBSD$
-TESTSDIR= ${TESTSBASE}/sbin/growfs
-
TAP_TESTS_PERL= legacy_test
.include <bsd.test.mk>
diff --git a/sbin/ifconfig/tests/Makefile b/sbin/ifconfig/tests/Makefile
index 044e979..93967c7 100644
--- a/sbin/ifconfig/tests/Makefile
+++ b/sbin/ifconfig/tests/Makefile
@@ -1,11 +1,5 @@
# $FreeBSD$
-OBJTOP= ${.OBJDIR}/../../..
-SRCTOP= ${.CURDIR}/../../..
-TESTSRC= ${SRCTOP}/contrib/netbsd-tests/sbin/ifconfig
-
-TESTSDIR= ${TESTSBASE}/sbin/ifconfig
-
NETBSD_ATF_TESTS_SH= nonexistent_test
.include <netbsd-tests.test.mk>
diff --git a/sbin/mdconfig/tests/Makefile b/sbin/mdconfig/tests/Makefile
index 08a9e47..6c179fc 100644
--- a/sbin/mdconfig/tests/Makefile
+++ b/sbin/mdconfig/tests/Makefile
@@ -1,10 +1,7 @@
# $FreeBSD$
-TESTSDIR= ${TESTSBASE}/sbin/mdconfig
-
ATF_TESTS_SH= mdconfig_test
-
TEST_METADATA.mdconfig_test+= required_user="root"
.include <bsd.test.mk>
diff --git a/sbin/tests/Makefile b/sbin/tests/Makefile
index a298f87..a0e63e5 100644
--- a/sbin/tests/Makefile
+++ b/sbin/tests/Makefile
@@ -2,9 +2,7 @@
.include <bsd.own.mk>
-TESTSDIR= ${TESTSBASE}/sbin
-
-.PATH: ${.CURDIR:H:H}/tests
+.PATH: ${SRCTOP}/tests
KYUAFILE= yes
.include <bsd.test.mk>
diff --git a/secure/lib/tests/Makefile b/secure/lib/tests/Makefile
index cd6bcff..a0e63e5 100644
--- a/secure/lib/tests/Makefile
+++ b/secure/lib/tests/Makefile
@@ -2,9 +2,7 @@
.include <bsd.own.mk>
-TESTSDIR= ${TESTSBASE}/secure/lib
-
-.PATH: ${.CURDIR:H:H:H}/tests
+.PATH: ${SRCTOP}/tests
KYUAFILE= yes
.include <bsd.test.mk>
diff --git a/secure/libexec/tests/Makefile b/secure/libexec/tests/Makefile
index 6debef8..a0e63e5 100644
--- a/secure/libexec/tests/Makefile
+++ b/secure/libexec/tests/Makefile
@@ -2,9 +2,7 @@
.include <bsd.own.mk>
-TESTSDIR= ${TESTSBASE}/secure/libexec
-
-.PATH: ${.CURDIR:H:H:H}/tests
+.PATH: ${SRCTOP}/tests
KYUAFILE= yes
.include <bsd.test.mk>
diff --git a/secure/tests/Makefile b/secure/tests/Makefile
index 2e6dbc4..a0e63e5 100644
--- a/secure/tests/Makefile
+++ b/secure/tests/Makefile
@@ -2,9 +2,7 @@
.include <bsd.own.mk>
-TESTSDIR= ${TESTSBASE}/secure
-
-.PATH: ${.CURDIR:H:H}/tests
+.PATH: ${SRCTOP}/tests
KYUAFILE= yes
.include <bsd.test.mk>
diff --git a/secure/usr.bin/tests/Makefile b/secure/usr.bin/tests/Makefile
index 1c06699..a0e63e5 100644
--- a/secure/usr.bin/tests/Makefile
+++ b/secure/usr.bin/tests/Makefile
@@ -2,9 +2,7 @@
.include <bsd.own.mk>
-TESTSDIR= ${TESTSBASE}/secure/usr.bin
-
-.PATH: ${.CURDIR:H:H:H}/tests
+.PATH: ${SRCTOP}/tests
KYUAFILE= yes
.include <bsd.test.mk>
diff --git a/secure/usr.sbin/tests/Makefile b/secure/usr.sbin/tests/Makefile
index 25e95f0..a0e63e5 100644
--- a/secure/usr.sbin/tests/Makefile
+++ b/secure/usr.sbin/tests/Makefile
@@ -2,9 +2,7 @@
.include <bsd.own.mk>
-TESTSDIR= ${TESTSBASE}/secure/usr.sbin
-
-.PATH: ${.CURDIR:H:H:H}/tests
+.PATH: ${SRCTOP}/tests
KYUAFILE= yes
.include <bsd.test.mk>
diff --git a/share/examples/tests/Makefile b/share/examples/tests/Makefile
index 387b806..a091b2d 100644
--- a/share/examples/tests/Makefile
+++ b/share/examples/tests/Makefile
@@ -2,11 +2,9 @@
.include <bsd.own.mk>
-TESTSDIR= ${TESTSBASE}/share/examples
-
SUBDIR= tests
+.PATH: ${SRCTOP}/tests
KYUAFILE= yes
-.PATH: ${.CURDIR:H:H:H}/tests
.include <bsd.test.mk>
diff --git a/share/tests/Makefile b/share/tests/Makefile
index 2c63621..e070571 100644
--- a/share/tests/Makefile
+++ b/share/tests/Makefile
@@ -4,7 +4,7 @@
TESTSDIR= ${TESTSBASE}/share
-.PATH: ${.CURDIR:H:H}/tests
+.PATH: ${SRCTOP}/tests
KYUAFILE= yes
.include <bsd.test.mk>
diff --git a/tests/etc/Makefile b/tests/etc/Makefile
index 9aad25c..1e49666 100644
--- a/tests/etc/Makefile
+++ b/tests/etc/Makefile
@@ -4,7 +4,7 @@
TESTSDIR= ${TESTSBASE}/etc
-.PATH: ${.CURDIR:H}
+.PATH: ${SRCTOP}/tests
KYUAFILE= yes
SUBDIR+= rc.d
diff --git a/tests/sys/mqueue/Makefile b/tests/sys/mqueue/Makefile
index 5af8b25..63741d2 100644
--- a/tests/sys/mqueue/Makefile
+++ b/tests/sys/mqueue/Makefile
@@ -6,7 +6,7 @@ ATF_TESTS_SH= mqueue_test
BINDIR= ${TESTSDIR}
-CFLAGS+= -I${.CURDIR:H:H}
+CFLAGS+= -I${SRCTOP}/tests
PROGS+= mqtest1
PROGS+= mqtest2
diff --git a/tests/sys/pjdfstest/tests/Makefile b/tests/sys/pjdfstest/tests/Makefile
index 248b209..95b4bbe 100644
--- a/tests/sys/pjdfstest/tests/Makefile
+++ b/tests/sys/pjdfstest/tests/Makefile
@@ -1,6 +1,6 @@
# $FreeBSD$
-PJDFSTEST_SRCDIR= ${.CURDIR:H:H:H:H}/contrib/pjdfstest
+PJDFSTEST_SRCDIR= ${SRCTOP}/contrib/pjdfstest
TESTSDIR= ${TESTSBASE}/sys/pjdfstest
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
diff --git a/usr.sbin/etcupdate/tests/Makefile b/usr.sbin/etcupdate/tests/Makefile
index da83397..45b12b7 100644
--- a/usr.sbin/etcupdate/tests/Makefile
+++ b/usr.sbin/etcupdate/tests/Makefile
@@ -1,7 +1,5 @@
# $FreeBSD$
-TESTSDIR= ${TESTSBASE}/usr.sbin/etcupdate
-
PLAIN_TESTS_SH=
.for test in always_test \
conflicts_test \
diff --git a/usr.sbin/fstyp/tests/Makefile b/usr.sbin/fstyp/tests/Makefile
index db686b59..01c9869 100644
--- a/usr.sbin/fstyp/tests/Makefile
+++ b/usr.sbin/fstyp/tests/Makefile
@@ -1,7 +1,5 @@
# $FreeBSD$
-TESTSDIR= ${TESTSBASE}/usr.sbin/fstyp
-
ATF_TESTS_SH= fstyp_test
FILES= ext2.img.bz2
diff --git a/usr.sbin/newsyslog/tests/Makefile b/usr.sbin/newsyslog/tests/Makefile
index f8ad273..802a44c 100644
--- a/usr.sbin/newsyslog/tests/Makefile
+++ b/usr.sbin/newsyslog/tests/Makefile
@@ -1,7 +1,5 @@
# $FreeBSD$
-TESTSDIR= ${TESTSBASE}/usr.sbin/newsyslog
-
TAP_TESTS_SH= legacy_test
.include <bsd.test.mk>
diff --git a/usr.sbin/nmtree/tests/Makefile b/usr.sbin/nmtree/tests/Makefile
index 1df81d0..0b63127 100644
--- a/usr.sbin/nmtree/tests/Makefile
+++ b/usr.sbin/nmtree/tests/Makefile
@@ -1,10 +1,8 @@
# $FreeBSD$
-TESTSRC= ${.CURDIR}/../../../contrib/netbsd-tests/usr.sbin/mtree
+TESTSRC= ${SRCTOP}/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
diff --git a/usr.sbin/pw/tests/Makefile b/usr.sbin/pw/tests/Makefile
index a1605aa..27f0ac4 100644
--- a/usr.sbin/pw/tests/Makefile
+++ b/usr.sbin/pw/tests/Makefile
@@ -1,7 +1,5 @@
# $FreeBSD$
-TESTSDIR= ${TESTSBASE}/usr.sbin/pw
-
ATF_TESTS_SH= pw_etcdir \
pw_lock \
pw_config \
diff --git a/usr.sbin/sa/tests/Makefile b/usr.sbin/sa/tests/Makefile
index 204b510..3c74ba9 100644
--- a/usr.sbin/sa/tests/Makefile
+++ b/usr.sbin/sa/tests/Makefile
@@ -1,7 +1,5 @@
# $FreeBSD$
-TESTSDIR= ${TESTSBASE}/usr.sbin/sa
-
TAP_TESTS_SH= legacy_test
FILESDIR= ${TESTSDIR}
diff --git a/usr.sbin/tests/Makefile b/usr.sbin/tests/Makefile
index a7e9c71..a0e63e5 100644
--- a/usr.sbin/tests/Makefile
+++ b/usr.sbin/tests/Makefile
@@ -2,9 +2,7 @@
.include <bsd.own.mk>
-TESTSDIR= ${TESTSBASE}/usr.sbin
-
-.PATH: ${.CURDIR:H:H}/tests
+.PATH: ${SRCTOP}/tests
KYUAFILE= yes
.include <bsd.test.mk>
OpenPOWER on IntegriCloud