summaryrefslogtreecommitdiffstats
path: root/lib/libc/tests
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 /lib/libc/tests
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
Diffstat (limited to 'lib/libc/tests')
-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
26 files changed, 9 insertions, 60 deletions
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
OpenPOWER on IntegriCloud