diff options
author | ngie <ngie@FreeBSD.org> | 2017-02-09 22:49:48 +0000 |
---|---|---|
committer | ngie <ngie@FreeBSD.org> | 2017-02-09 22:49:48 +0000 |
commit | 6b3722162f25f17568ac341320ee8e7ede42bc7e (patch) | |
tree | b94a04c0147f408897b87a9704b40d0c5fd8067f /lib/libc | |
parent | 72ef9ff5b96eef28f0024f16157bf47833200e6d (diff) | |
download | FreeBSD-src-6b3722162f25f17568ac341320ee8e7ede42bc7e.zip FreeBSD-src-6b3722162f25f17568ac341320ee8e7ede42bc7e.tar.gz |
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)
Diffstat (limited to 'lib/libc')
25 files changed, 7 insertions, 60 deletions
diff --git a/lib/libc/tests/Makefile b/lib/libc/tests/Makefile index 9b89152..677f697 100644 --- a/lib/libc/tests/Makefile +++ b/lib/libc/tests/Makefile @@ -2,8 +2,6 @@ .include <bsd.own.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 56472fb..18b0276 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 27c44dc..c890eda 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 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 91097ef..476b5b7 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+= fmtcheck2_test ATF_TESTS_C+= fmtmsg_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 4c64c70..1a71eaa 100644 --- a/lib/libc/tests/hash/Makefile +++ b/lib/libc/tests/hash/Makefile @@ -2,8 +2,6 @@ .include <bsd.own.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 d15fd5e..e05cbae 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 - 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 fb76f26..bee179f 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 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 153626b..f9819d3 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 e303726..ac962c2 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 <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 06ceb46..7896422 100644 --- a/lib/libc/tests/stdio/Makefile +++ b/lib/libc/tests/stdio/Makefile @@ -2,8 +2,6 @@ .include <bsd.own.mk> -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 15d8cbc..99d17e2 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 3f97edc..14044f4 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 39aec1f..816b962 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 - 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 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/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 |