From 9e6d3386faaf7a6f063e10c47f9b7020e78509e2 Mon Sep 17 00:00:00 2001 From: ngie Date: Thu, 9 Feb 2017 22:49:48 +0000 Subject: [PATCH] MFC r289172,r290254: r289172: 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 r290254: Remove unused variable (SRCDIR) git-svn-id: svn://svn.freebsd.org/base/stable/10@313488 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f --- bin/cat/tests/Makefile | 6 ------ bin/date/tests/Makefile | 2 -- bin/expr/tests/Makefile | 6 ------ bin/ls/tests/Makefile | 2 -- bin/mv/tests/Makefile | 2 -- bin/pax/tests/Makefile | 2 -- bin/pkill/tests/Makefile | 2 -- bin/sh/tests/Makefile | 2 -- bin/sleep/tests/Makefile | 7 +------ bin/test/tests/Makefile | 2 -- bin/tests/Makefile | 4 +--- cddl/lib/tests/Makefile | 4 +--- cddl/sbin/tests/Makefile | 4 +--- cddl/tests/Makefile | 4 +--- cddl/usr.bin/tests/Makefile | 4 +--- cddl/usr.sbin/dtrace/tests/Makefile | 3 +-- cddl/usr.sbin/tests/Makefile | 4 +--- gnu/lib/tests/Makefile | 4 +--- gnu/tests/Makefile | 4 +--- gnu/usr.bin/diff/tests/Makefile | 11 ++++------- gnu/usr.bin/tests/Makefile | 4 +--- lib/atf/libatf-c++/tests/Makefile | 3 +-- lib/atf/libatf-c++/tests/detail/Makefile | 2 +- lib/atf/libatf-c/tests/Makefile | 3 +-- lib/atf/libatf-c/tests/detail/Makefile | 2 +- lib/atf/tests/Makefile | 2 +- lib/atf/tests/test-programs/Makefile | 2 +- lib/libc/tests/Makefile | 2 -- lib/libc/tests/Makefile.netbsd-tests | 6 +++--- lib/libc/tests/c063/Makefile | 2 -- lib/libc/tests/db/Makefile | 2 -- lib/libc/tests/gen/Makefile | 2 -- lib/libc/tests/gen/execve/Makefile | 6 ------ lib/libc/tests/gen/posix_spawn/Makefile | 6 ------ lib/libc/tests/hash/Makefile | 6 ++---- lib/libc/tests/inet/Makefile | 2 -- lib/libc/tests/locale/Makefile | 2 -- lib/libc/tests/net/Makefile | 2 -- lib/libc/tests/net/getaddrinfo/Makefile | 4 ---- lib/libc/tests/regex/Makefile | 2 -- lib/libc/tests/rpc/Makefile | 1 - lib/libc/tests/setjmp/Makefile | 4 ++-- lib/libc/tests/ssp/Makefile | 2 -- lib/libc/tests/stdio/Makefile | 2 -- lib/libc/tests/stdlib/Makefile | 2 -- lib/libc/tests/string/Makefile | 2 -- lib/libc/tests/sys/Makefile | 2 -- lib/libc/tests/termios/Makefile | 2 -- lib/libc/tests/time/Makefile | 2 -- lib/libc/tests/tls/Makefile | 1 - lib/libc/tests/tls/dso/Makefile | 1 - lib/libc/tests/ttyio/Makefile | 2 -- lib/libcrypt/tests/Makefile | 2 -- lib/libmp/tests/Makefile | 2 -- lib/libnv/tests/Makefile | 2 -- lib/libpam/libpam/tests/Makefile | 2 +- lib/librt/tests/Makefile | 6 ------ lib/libthr/tests/Makefile | 4 ---- lib/libthr/tests/dlopen/Makefile | 2 -- lib/libthr/tests/dlopen/dso/Makefile | 2 -- lib/libutil/tests/Makefile | 2 -- lib/msun/tests/Makefile | 4 ---- lib/tests/Makefile | 4 +--- libexec/atf/atf-check/tests/Makefile | 4 +--- libexec/atf/atf-sh/tests/Makefile | 4 +--- libexec/atf/tests/Makefile | 4 +--- libexec/tests/Makefile | 4 +--- sbin/devd/tests/Makefile | 2 -- sbin/dhclient/tests/Makefile | 2 -- sbin/growfs/tests/Makefile | 2 -- sbin/mdconfig/tests/Makefile | 3 --- sbin/tests/Makefile | 4 +--- secure/lib/tests/Makefile | 4 +--- secure/libexec/tests/Makefile | 4 +--- secure/tests/Makefile | 4 +--- secure/usr.bin/tests/Makefile | 4 +--- secure/usr.sbin/tests/Makefile | 4 +--- share/examples/tests/Makefile | 4 +--- share/tests/Makefile | 2 +- tests/etc/Makefile | 2 +- tests/sys/mqueue/Makefile | 2 +- tests/sys/pjdfstest/tests/Makefile | 2 +- usr.bin/apply/tests/Makefile | 2 -- usr.bin/basename/tests/Makefile | 9 ++------- usr.bin/calendar/tests/Makefile | 2 -- usr.bin/cmp/tests/Makefile | 9 +++------ usr.bin/col/tests/Makefile | 2 -- usr.bin/comm/tests/Makefile | 2 -- usr.bin/cut/tests/Makefile | 9 +++------ usr.bin/dirname/tests/Makefile | 9 +++------ usr.bin/file2c/tests/Makefile | 2 -- usr.bin/grep/tests/Makefile | 10 +++------- usr.bin/gzip/tests/Makefile | 9 +++------ usr.bin/join/tests/Makefile | 2 -- usr.bin/jot/tests/Makefile | 2 -- usr.bin/lastcomm/tests/Makefile | 2 -- usr.bin/m4/tests/Makefile | 2 -- usr.bin/ncal/tests/Makefile | 2 -- usr.bin/printf/tests/Makefile | 2 -- usr.bin/sed/tests/Makefile | 2 -- usr.bin/tests/Makefile | 4 +--- usr.bin/truncate/tests/Makefile | 3 +-- usr.bin/uudecode/tests/Makefile | 2 -- usr.bin/uuencode/tests/Makefile | 2 -- usr.bin/xargs/tests/Makefile | 2 -- usr.bin/yacc/tests/Makefile | 4 +--- usr.sbin/etcupdate/tests/Makefile | 2 -- usr.sbin/fstyp/tests/Makefile | 2 -- usr.sbin/newsyslog/tests/Makefile | 2 -- usr.sbin/nmtree/tests/Makefile | 4 +--- usr.sbin/pw/tests/Makefile | 2 -- usr.sbin/sa/tests/Makefile | 2 -- usr.sbin/tests/Makefile | 4 +--- 113 files changed, 67 insertions(+), 304 deletions(-) diff --git a/bin/cat/tests/Makefile b/bin/cat/tests/Makefile index 73f82e125..f68513ce6 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 d023195b3..ecce803e2 100644 --- a/bin/date/tests/Makefile +++ b/bin/date/tests/Makefile @@ -2,8 +2,6 @@ .include -TESTSDIR= ${TESTSBASE}/bin/date - ATF_TESTS_SH= format_string_test .include diff --git a/bin/expr/tests/Makefile b/bin/expr/tests/Makefile index 80c130c3d..21b0e993f 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 ba8038c1c..89a2e8cf1 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 3d437ef91..229d96e57 100644 --- a/bin/mv/tests/Makefile +++ b/bin/mv/tests/Makefile @@ -2,8 +2,6 @@ .include -TESTSDIR= ${TESTSBASE}/bin/mv - TAP_TESTS_SH= legacy_test .include diff --git a/bin/pax/tests/Makefile b/bin/pax/tests/Makefile index 1f27c1841..8334fea3c 100644 --- a/bin/pax/tests/Makefile +++ b/bin/pax/tests/Makefile @@ -2,8 +2,6 @@ .include -TESTSDIR= ${TESTSBASE}/bin/pax - TAP_TESTS_PERL= legacy_test .include diff --git a/bin/pkill/tests/Makefile b/bin/pkill/tests/Makefile index a4a2c9151..be4670746 100644 --- a/bin/pkill/tests/Makefile +++ b/bin/pkill/tests/Makefile @@ -2,8 +2,6 @@ .include -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 d10156cdc..a9abc8031 100644 --- a/bin/sh/tests/Makefile +++ b/bin/sh/tests/Makefile @@ -2,8 +2,6 @@ .include -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 9b286e6ba..6fc95f39c 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 -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 diff --git a/bin/test/tests/Makefile b/bin/test/tests/Makefile index 5ee337a21..a1a5d4f02 100644 --- a/bin/test/tests/Makefile +++ b/bin/test/tests/Makefile @@ -2,8 +2,6 @@ .include -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 7a59b1029..a0e63e5da 100644 --- a/bin/tests/Makefile +++ b/bin/tests/Makefile @@ -2,9 +2,7 @@ .include -TESTSDIR= ${TESTSBASE}/bin - -.PATH: ${.CURDIR:H:H}/tests +.PATH: ${SRCTOP}/tests KYUAFILE= yes .include diff --git a/cddl/lib/tests/Makefile b/cddl/lib/tests/Makefile index 4a49d9fee..a0e63e5da 100644 --- a/cddl/lib/tests/Makefile +++ b/cddl/lib/tests/Makefile @@ -2,9 +2,7 @@ .include -TESTSDIR= ${TESTSBASE}/cddl/lib - -.PATH: ${.CURDIR:H:H:H}/tests +.PATH: ${SRCTOP}/tests KYUAFILE= yes .include diff --git a/cddl/sbin/tests/Makefile b/cddl/sbin/tests/Makefile index 91bbaee27..a0e63e5da 100644 --- a/cddl/sbin/tests/Makefile +++ b/cddl/sbin/tests/Makefile @@ -2,9 +2,7 @@ .include -TESTSDIR= ${TESTSBASE}/cddl/sbin - -.PATH: ${.CURDIR:H:H:H}/tests +.PATH: ${SRCTOP}/tests KYUAFILE= yes .include diff --git a/cddl/tests/Makefile b/cddl/tests/Makefile index 34a27ea63..a0e63e5da 100644 --- a/cddl/tests/Makefile +++ b/cddl/tests/Makefile @@ -2,9 +2,7 @@ .include -TESTSDIR= ${TESTSBASE}/cddl - -.PATH: ${.CURDIR:H:H}/tests +.PATH: ${SRCTOP}/tests KYUAFILE= yes .include diff --git a/cddl/usr.bin/tests/Makefile b/cddl/usr.bin/tests/Makefile index c94d5910a..a0e63e5da 100644 --- a/cddl/usr.bin/tests/Makefile +++ b/cddl/usr.bin/tests/Makefile @@ -2,9 +2,7 @@ .include -TESTSDIR= ${TESTSBASE}/cddl/usr.bin - -.PATH: ${.CURDIR:H:H:H}/tests +.PATH: ${SRCTOP}/tests KYUAFILE= yes .include diff --git a/cddl/usr.sbin/dtrace/tests/Makefile b/cddl/usr.sbin/dtrace/tests/Makefile index dfd2b54e1..7db6f2fc0 100644 --- a/cddl/usr.sbin/dtrace/tests/Makefile +++ b/cddl/usr.sbin/dtrace/tests/Makefile @@ -2,10 +2,9 @@ .include -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 0305aeef1..a0e63e5da 100644 --- a/cddl/usr.sbin/tests/Makefile +++ b/cddl/usr.sbin/tests/Makefile @@ -2,9 +2,7 @@ .include -TESTSDIR= ${TESTSBASE}/cddl/usr.sbin - -.PATH: ${.CURDIR:H:H:H}/tests +.PATH: ${SRCTOP}/tests KYUAFILE= yes .include diff --git a/gnu/lib/tests/Makefile b/gnu/lib/tests/Makefile index 256e24512..a0e63e5da 100644 --- a/gnu/lib/tests/Makefile +++ b/gnu/lib/tests/Makefile @@ -2,9 +2,7 @@ .include -TESTSDIR= ${TESTSBASE}/gnu/lib - -.PATH: ${.CURDIR:H:H:H}/tests +.PATH: ${SRCTOP}/tests KYUAFILE= yes .include diff --git a/gnu/tests/Makefile b/gnu/tests/Makefile index de42fae1e..a0e63e5da 100644 --- a/gnu/tests/Makefile +++ b/gnu/tests/Makefile @@ -2,9 +2,7 @@ .include -TESTSDIR= ${TESTSBASE}/gnu - -.PATH: ${.CURDIR:H:H}/tests +.PATH: ${SRCTOP}/tests KYUAFILE= yes .include diff --git a/gnu/usr.bin/diff/tests/Makefile b/gnu/usr.bin/diff/tests/Makefile index aa1629d33..16439b3b6 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 - -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 + .include diff --git a/gnu/usr.bin/tests/Makefile b/gnu/usr.bin/tests/Makefile index eebbff675..a0e63e5da 100644 --- a/gnu/usr.bin/tests/Makefile +++ b/gnu/usr.bin/tests/Makefile @@ -2,9 +2,7 @@ .include -TESTSDIR= ${TESTSBASE}/gnu/usr.bin - -.PATH: ${.CURDIR:H:H:H}/tests +.PATH: ${SRCTOP}/tests KYUAFILE= yes .include diff --git a/lib/atf/libatf-c++/tests/Makefile b/lib/atf/libatf-c++/tests/Makefile index 5f5a57515..a069bb19d 100644 --- a/lib/atf/libatf-c++/tests/Makefile +++ b/lib/atf/libatf-c++/tests/Makefile @@ -2,10 +2,9 @@ .include -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 69c3e7bac..f7d672e79 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 d5b6dc075..e864c2e8b 100644 --- a/lib/atf/libatf-c/tests/Makefile +++ b/lib/atf/libatf-c/tests/Makefile @@ -2,10 +2,9 @@ .include -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 02c1f2b44..e47fd566e 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 7bc96c94b..dc79bb349 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 b0c1c2376..aa308268a 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 9b89152c9..677f6979f 100644 --- a/lib/libc/tests/Makefile +++ b/lib/libc/tests/Makefile @@ -2,8 +2,6 @@ .include -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 56472fb18..18b0276b7 100644 --- a/lib/libc/tests/Makefile.netbsd-tests +++ b/lib/libc/tests/Makefile.netbsd-tests @@ -1,8 +1,8 @@ # $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/} WARNS?= 2 diff --git a/lib/libc/tests/c063/Makefile b/lib/libc/tests/c063/Makefile index 27c44dccd..c890eda57 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_test diff --git a/lib/libc/tests/db/Makefile b/lib/libc/tests/db/Makefile index ed1d6caad..eb0ce395e 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 91097ef3a..476b5b7d8 100644 --- a/lib/libc/tests/gen/Makefile +++ b/lib/libc/tests/gen/Makefile @@ -2,8 +2,6 @@ .include -TESTSDIR= ${TESTSBASE}/lib/libc/gen - ATF_TESTS_C+= arc4random_test ATF_TESTS_C+= fmtcheck2_test ATF_TESTS_C+= fmtmsg_test diff --git a/lib/libc/tests/gen/execve/Makefile b/lib/libc/tests/gen/execve/Makefile index 2106a1582..5e8bc6fb7 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 -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 f20bbd7c3..9bb2cf1cb 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 -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 4c64c7012..1a71eaae5 100644 --- a/lib/libc/tests/hash/Makefile +++ b/lib/libc/tests/hash/Makefile @@ -2,8 +2,6 @@ .include -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 a15b96ae3..ee6f98e2f 100644 --- a/lib/libc/tests/inet/Makefile +++ b/lib/libc/tests/inet/Makefile @@ -2,8 +2,6 @@ .include -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 d15fd5e7f..e05cbae3a 100644 --- a/lib/libc/tests/locale/Makefile +++ b/lib/libc/tests/locale/Makefile @@ -2,8 +2,6 @@ .include -TESTSDIR= ${TESTSBASE}/lib/libc/locale - ATF_TESTS_C+= btowc_test ATF_TESTS_C+= c16rtomb_test ATF_TESTS_C+= iswctype_test diff --git a/lib/libc/tests/net/Makefile b/lib/libc/tests/net/Makefile index fb76f26ad..bee179f5a 100644 --- a/lib/libc/tests/net/Makefile +++ b/lib/libc/tests/net/Makefile @@ -1,7 +1,5 @@ # $FreeBSD$ -TESTSDIR= ${TESTSBASE}/lib/libc/net - ATF_TESTS_C+= ether_test ATF_TESTS_C+= eui64_aton_test ATF_TESTS_C+= eui64_ntoa_test diff --git a/lib/libc/tests/net/getaddrinfo/Makefile b/lib/libc/tests/net/getaddrinfo/Makefile index a6b9eb197..d21d33655 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 -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 37b3277e5..fa60f6ec4 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 153626b77..f9819d3f8 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} \ h_testbits.h diff --git a/lib/libc/tests/setjmp/Makefile b/lib/libc/tests/setjmp/Makefile index e303726e0..ac962c2d8 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= setjmp_test NETBSD_ATF_TESTS_C+= threadjmp_test @@ -10,4 +8,6 @@ LDADD.threadjmp_test+= -lpthread WARNS?= 4 +.include "../Makefile.netbsd-tests" + .include diff --git a/lib/libc/tests/ssp/Makefile b/lib/libc/tests/ssp/Makefile index 7bc866035..ec7a82a48 100644 --- a/lib/libc/tests/ssp/Makefile +++ b/lib/libc/tests/ssp/Makefile @@ -2,8 +2,6 @@ .include -TESTSDIR= ${TESTSBASE}/lib/libc/ssp - NO_WERROR= WARNS?= 2 diff --git a/lib/libc/tests/stdio/Makefile b/lib/libc/tests/stdio/Makefile index 06ceb4606..789642210 100644 --- a/lib/libc/tests/stdio/Makefile +++ b/lib/libc/tests/stdio/Makefile @@ -2,8 +2,6 @@ .include -TESTSDIR= ${TESTSBASE}/lib/libc/stdio - ATF_TESTS_C+= fdopen_test ATF_TESTS_C+= fmemopen2_test ATF_TESTS_C+= fopen2_test diff --git a/lib/libc/tests/stdlib/Makefile b/lib/libc/tests/stdlib/Makefile index 15d8cbc8c..99d17e2fe 100644 --- a/lib/libc/tests/stdlib/Makefile +++ b/lib/libc/tests/stdlib/Makefile @@ -10,8 +10,6 @@ ATF_TESTS_CXX+= cxa_thread_atexit_test ATF_TESTS_CXX+= cxa_thread_atexit_nothr_test .endif -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 3f97edcd8..14044f44e 100644 --- a/lib/libc/tests/string/Makefile +++ b/lib/libc/tests/string/Makefile @@ -5,8 +5,6 @@ ATF_TESTS_C+= strerror2_test ATF_TESTS_C+= wcscasecmp_test ATF_TESTS_C+= wcsnlen_test -TESTSDIR= ${TESTSBASE}/lib/libc/string - # TODO: popcount, stresep NETBSD_ATF_TESTS_C+= memchr_test diff --git a/lib/libc/tests/sys/Makefile b/lib/libc/tests/sys/Makefile index 39aec1fae..816b96279 100644 --- a/lib/libc/tests/sys/Makefile +++ b/lib/libc/tests/sys/Makefile @@ -2,8 +2,6 @@ .include -TESTSDIR= ${TESTSBASE}/lib/libc/sys - ATF_TESTS_C+= queue_test # TODO: clone, lwp_create, lwp_ctl, posix_fadvise, recvmmsg, diff --git a/lib/libc/tests/termios/Makefile b/lib/libc/tests/termios/Makefile index 9a3fd66a5..0495d684b 100644 --- a/lib/libc/tests/termios/Makefile +++ b/lib/libc/tests/termios/Makefile @@ -2,8 +2,6 @@ .include -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 c2a55df15..feb543dad 100644 --- a/lib/libc/tests/time/Makefile +++ b/lib/libc/tests/time/Makefile @@ -2,8 +2,6 @@ .include -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 e2248959a..b6b671914 100644 --- a/lib/libc/tests/tls/Makefile +++ b/lib/libc/tests/tls/Makefile @@ -2,7 +2,6 @@ .include -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 466f95006..9b698cd5f 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/ttyio/Makefile b/lib/libc/tests/ttyio/Makefile index a1f320d6f..242f33258 100644 --- a/lib/libc/tests/ttyio/Makefile +++ b/lib/libc/tests/ttyio/Makefile @@ -2,8 +2,6 @@ .include -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 65ebd6627..8e3fc2ea8 100644 --- a/lib/libcrypt/tests/Makefile +++ b/lib/libcrypt/tests/Makefile @@ -4,8 +4,6 @@ SRCTOP= ${.CURDIR:H:H:H} OBJTOP= ${.OBJDIR:H:H:H} TESTSRC= ${SRCTOP}/contrib/netbsd-tests/lib/libcrypt -TESTSDIR= ${TESTSBASE}/lib/libcrypt - NETBSD_ATF_TESTS_C+= crypt_test CFLAGS+= -I${.CURDIR:H} diff --git a/lib/libmp/tests/Makefile b/lib/libmp/tests/Makefile index 0f591eb3e..d556347b7 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 DPADD+= ${LIBCRYPTO} ${LIBMP} diff --git a/lib/libnv/tests/Makefile b/lib/libnv/tests/Makefile index d8e090474..870b7df6c 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_tests \ diff --git a/lib/libpam/libpam/tests/Makefile b/lib/libpam/libpam/tests/Makefile index 2ad64e289..a581392e4 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/librt/tests/Makefile b/lib/librt/tests/Makefile index 224f52ea8..3d3f98c23 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 - DPADD+= ${LIBRT} LDADD+= -lrt diff --git a/lib/libthr/tests/Makefile b/lib/libthr/tests/Makefile index 50f07f07e..b0725dc06 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 0764bfa15..08931924f 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 diff --git a/lib/libthr/tests/dlopen/dso/Makefile b/lib/libthr/tests/dlopen/dso/Makefile index 080dec941..dce7d38e9 100644 --- a/lib/libthr/tests/dlopen/dso/Makefile +++ b/lib/libthr/tests/dlopen/dso/Makefile @@ -1,7 +1,5 @@ # $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 31b6c5406..92540c9e8 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 a82f29f71..e96426b34 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 935fd709d..a0e63e5da 100644 --- a/lib/tests/Makefile +++ b/lib/tests/Makefile @@ -2,9 +2,7 @@ .include -TESTSDIR= ${TESTSBASE}/lib - -.PATH: ${.CURDIR:H:H}/tests +.PATH: ${SRCTOP}/tests KYUAFILE= yes .include diff --git a/libexec/atf/atf-check/tests/Makefile b/libexec/atf/atf-check/tests/Makefile index 43a74988a..87b26cb4a 100644 --- a/libexec/atf/atf-check/tests/Makefile +++ b/libexec/atf/atf-check/tests/Makefile @@ -2,9 +2,7 @@ .include -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 3360b974f..9ccd6a7a4 100644 --- a/libexec/atf/atf-sh/tests/Makefile +++ b/libexec/atf/atf-sh/tests/Makefile @@ -2,9 +2,7 @@ .include -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 7aa960193..a0e63e5da 100644 --- a/libexec/atf/tests/Makefile +++ b/libexec/atf/tests/Makefile @@ -2,9 +2,7 @@ .include -TESTSDIR= ${TESTSBASE}/libexec/atf - -.PATH: ${.CURDIR:H:H:H}/tests +.PATH: ${SRCTOP}/tests KYUAFILE= yes .include diff --git a/libexec/tests/Makefile b/libexec/tests/Makefile index 665efab42..a0e63e5da 100644 --- a/libexec/tests/Makefile +++ b/libexec/tests/Makefile @@ -2,9 +2,7 @@ .include -TESTSDIR= ${TESTSBASE}/libexec - -.PATH: ${.CURDIR:H:H}/tests +.PATH: ${SRCTOP}/tests KYUAFILE= yes .include diff --git a/sbin/devd/tests/Makefile b/sbin/devd/tests/Makefile index ee679ce72..e06928c55 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 a460f7f9b..45cc8c28d 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 7a6a831f2..6a3208d9c 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 diff --git a/sbin/mdconfig/tests/Makefile b/sbin/mdconfig/tests/Makefile index 08a9e47e9..6c179fcf5 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 diff --git a/sbin/tests/Makefile b/sbin/tests/Makefile index a298f87ab..a0e63e5da 100644 --- a/sbin/tests/Makefile +++ b/sbin/tests/Makefile @@ -2,9 +2,7 @@ .include -TESTSDIR= ${TESTSBASE}/sbin - -.PATH: ${.CURDIR:H:H}/tests +.PATH: ${SRCTOP}/tests KYUAFILE= yes .include diff --git a/secure/lib/tests/Makefile b/secure/lib/tests/Makefile index cd6bcff5f..a0e63e5da 100644 --- a/secure/lib/tests/Makefile +++ b/secure/lib/tests/Makefile @@ -2,9 +2,7 @@ .include -TESTSDIR= ${TESTSBASE}/secure/lib - -.PATH: ${.CURDIR:H:H:H}/tests +.PATH: ${SRCTOP}/tests KYUAFILE= yes .include diff --git a/secure/libexec/tests/Makefile b/secure/libexec/tests/Makefile index 6debef892..a0e63e5da 100644 --- a/secure/libexec/tests/Makefile +++ b/secure/libexec/tests/Makefile @@ -2,9 +2,7 @@ .include -TESTSDIR= ${TESTSBASE}/secure/libexec - -.PATH: ${.CURDIR:H:H:H}/tests +.PATH: ${SRCTOP}/tests KYUAFILE= yes .include diff --git a/secure/tests/Makefile b/secure/tests/Makefile index 2e6dbc487..a0e63e5da 100644 --- a/secure/tests/Makefile +++ b/secure/tests/Makefile @@ -2,9 +2,7 @@ .include -TESTSDIR= ${TESTSBASE}/secure - -.PATH: ${.CURDIR:H:H}/tests +.PATH: ${SRCTOP}/tests KYUAFILE= yes .include diff --git a/secure/usr.bin/tests/Makefile b/secure/usr.bin/tests/Makefile index 1c06699c5..a0e63e5da 100644 --- a/secure/usr.bin/tests/Makefile +++ b/secure/usr.bin/tests/Makefile @@ -2,9 +2,7 @@ .include -TESTSDIR= ${TESTSBASE}/secure/usr.bin - -.PATH: ${.CURDIR:H:H:H}/tests +.PATH: ${SRCTOP}/tests KYUAFILE= yes .include diff --git a/secure/usr.sbin/tests/Makefile b/secure/usr.sbin/tests/Makefile index 25e95f03c..a0e63e5da 100644 --- a/secure/usr.sbin/tests/Makefile +++ b/secure/usr.sbin/tests/Makefile @@ -2,9 +2,7 @@ .include -TESTSDIR= ${TESTSBASE}/secure/usr.sbin - -.PATH: ${.CURDIR:H:H:H}/tests +.PATH: ${SRCTOP}/tests KYUAFILE= yes .include diff --git a/share/examples/tests/Makefile b/share/examples/tests/Makefile index 387b8068b..a091b2d2f 100644 --- a/share/examples/tests/Makefile +++ b/share/examples/tests/Makefile @@ -2,11 +2,9 @@ .include -TESTSDIR= ${TESTSBASE}/share/examples - SUBDIR= tests +.PATH: ${SRCTOP}/tests KYUAFILE= yes -.PATH: ${.CURDIR:H:H:H}/tests .include diff --git a/share/tests/Makefile b/share/tests/Makefile index 2c6362193..e070571ec 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 diff --git a/tests/etc/Makefile b/tests/etc/Makefile index 9aad25c06..1e4966676 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 5af8b2546..63741d26b 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 917b01a45..61b15dd12 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 332bf7db1..5ff6c28e9 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 32dedabc5..bad7b2890 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 - -TESTSDIR= ${TESTSBASE}/usr.bin/basename -ATF_TESTS_SH= basename_test -ATF_TESTS_SH_SRC_basename_test= t_basename.sh +.include .include diff --git a/usr.bin/calendar/tests/Makefile b/usr.bin/calendar/tests/Makefile index f3d592e42..b9b0607f2 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 1c054c688..bfae46c8a 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 -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 .include diff --git a/usr.bin/col/tests/Makefile b/usr.bin/col/tests/Makefile index 43838e9c5..cf02083d7 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 172943d12..065b3b4f6 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 b324a7804..7d8707d0e 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 -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 + .include diff --git a/usr.bin/dirname/tests/Makefile b/usr.bin/dirname/tests/Makefile index 5b84c5709..6688e0d18 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 -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 .include diff --git a/usr.bin/file2c/tests/Makefile b/usr.bin/file2c/tests/Makefile index 8854eb4da..50267f0fa 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 59b948c98..7744fcbd2 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 -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 + .include diff --git a/usr.bin/gzip/tests/Makefile b/usr.bin/gzip/tests/Makefile index 155d739f1..03a5852b3 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 -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 .include diff --git a/usr.bin/join/tests/Makefile b/usr.bin/join/tests/Makefile index 2d5580ff7..16f522fa4 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 ef20eb24c..63f76313a 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 d3576487a..71e83957a 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 TEST_METADATA.legacy_test+= allowed_architectures="amd64 i386 sparc64" diff --git a/usr.bin/m4/tests/Makefile b/usr.bin/m4/tests/Makefile index 2eebc0789..6a4867789 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/ncal/tests/Makefile b/usr.bin/ncal/tests/Makefile index 170caacf8..23b235fc7 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 da3f53309..5ed5c0005 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 02d2b8940..a23d4a9b8 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/tests/Makefile b/usr.bin/tests/Makefile index af7a8bf95..08b47bca0 100644 --- a/usr.bin/tests/Makefile +++ b/usr.bin/tests/Makefile @@ -2,9 +2,7 @@ .include -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 bfa15db11..82cd606e6 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 diff --git a/usr.bin/uudecode/tests/Makefile b/usr.bin/uudecode/tests/Makefile index 5fda16bc4..efd3f9277 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 ca7088e34..a36ef6c9b 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 cd14813ae..c8ef2c951 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 2e157ec61..ad3abaac2 100644 --- a/usr.bin/yacc/tests/Makefile +++ b/usr.bin/yacc/tests/Makefile @@ -2,12 +2,10 @@ .include -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 da83397e6..45b12b7bb 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 db686b59c..01c98699e 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 f8ad2739c..802a44c01 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 diff --git a/usr.sbin/nmtree/tests/Makefile b/usr.sbin/nmtree/tests/Makefile index 1df81d0f0..0b6312723 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 07a806954..613d8b540 100644 --- a/usr.sbin/pw/tests/Makefile +++ b/usr.sbin/pw/tests/Makefile @@ -1,7 +1,5 @@ # $FreeBSD$ -TESTSDIR= ${TESTSBASE}/usr.sbin/pw - BINDIR= ${TESTSDIR} PROGS+= crypt diff --git a/usr.sbin/sa/tests/Makefile b/usr.sbin/sa/tests/Makefile index 2fdbbea43..399d7d145 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 TEST_METADATA.legacy_test+= allowed_architectures="amd64 i386 sparc64" diff --git a/usr.sbin/tests/Makefile b/usr.sbin/tests/Makefile index a7e9c7140..a0e63e5da 100644 --- a/usr.sbin/tests/Makefile +++ b/usr.sbin/tests/Makefile @@ -2,9 +2,7 @@ .include -TESTSDIR= ${TESTSBASE}/usr.sbin - -.PATH: ${.CURDIR:H:H}/tests +.PATH: ${SRCTOP}/tests KYUAFILE= yes .include -- 2.42.0