freebsd-nq/lib/msun/tests/Makefile
Enji Cooper 430f7286a5 Merge ^/user/ngie/release-pkg-fix-tests to unbreak how test files are installed
after r298107

Summary of changes:

- Replace all instances of FILES/TESTS with ${PACKAGE}FILES. This ensures that
  namespacing is kept with FILES appropriately, and that this shouldn't need
  to be repeated if the namespace changes -- only the definition of PACKAGE
  needs to be changed
- Allow PACKAGE to be overridden by callers instead of forcing it to always be
  `tests`. In the event we get to the point where things can be split up
  enough in the base system, it would make more sense to group the tests
  with the blocks they're a part of, e.g. byacc with byacc-tests, etc
- Remove PACKAGE definitions where possible, i.e. where FILES wasn't used
  previously.
- Remove unnecessary TESTSPACKAGE definitions; this has been elided into
  bsd.tests.mk
- Remove unnecessary BINDIRs used previously with ${PACKAGE}FILES;
  ${PACKAGE}FILESDIR is now automatically defined in bsd.test.mk.
- Fix installation of files under data/ subdirectories in lib/libc/tests/hash
  and lib/libc/tests/net/getaddrinfo
- Remove unnecessary .include <bsd.own.mk>s (some opportunistic cleanup)

Document the proposed changes in share/examples/tests/tests/... via examples
so it's clear that ${PACKAGES}FILES is the suggested way forward in terms of
replacing FILES. share/mk/bsd.README didn't seem like the appropriate method
of communicating that info.

MFC after: never probably
X-MFC with: r298107
PR: 209114
Relnotes: yes
Tested with: buildworld, installworld, checkworld; buildworld, packageworld
Sponsored by: EMC / Isilon Storage Division
2016-05-04 23:20:53 +00:00

104 lines
2.6 KiB
Makefile

# $FreeBSD$
.include <bsd.own.mk>
TESTSRC= ${SRCTOP}/contrib/netbsd-tests/lib/libm
# All architectures on FreeBSD have fenv.h
CFLAGS+= -DHAVE_FENV_H
# Not sure why this isn't defined for all architectures, since most
# have long double.
.if ${MACHINE_CPUARCH} == "aarch64" || \
${MACHINE_CPUARCH} == "amd64" || \
${MACHINE_CPUARCH} == "i386"
CFLAGS+= -D__HAVE_LONG_DOUBLE
.endif
NETBSD_ATF_TESTS_C= acos_test
NETBSD_ATF_TESTS_C+= asin_test
NETBSD_ATF_TESTS_C+= atan_test
NETBSD_ATF_TESTS_C+= cbrt_test
NETBSD_ATF_TESTS_C+= ceil_test
NETBSD_ATF_TESTS_C+= cos_test
NETBSD_ATF_TESTS_C+= cosh_test
NETBSD_ATF_TESTS_C+= erf_test
NETBSD_ATF_TESTS_C+= exp_test
NETBSD_ATF_TESTS_C+= fmod_test
NETBSD_ATF_TESTS_C+= infinity_test
NETBSD_ATF_TESTS_C+= ldexp_test
NETBSD_ATF_TESTS_C+= log_test
NETBSD_ATF_TESTS_C+= pow_test
NETBSD_ATF_TESTS_C+= precision_test
NETBSD_ATF_TESTS_C+= round_test
NETBSD_ATF_TESTS_C+= scalbn_test
NETBSD_ATF_TESTS_C+= sin_test
NETBSD_ATF_TESTS_C+= sinh_test
NETBSD_ATF_TESTS_C+= sqrt_test
NETBSD_ATF_TESTS_C+= tan_test
NETBSD_ATF_TESTS_C+= tanh_test
TAP_TESTS_C+= cexp_test
TAP_TESTS_C+= conj_test
.if ${MACHINE_CPUARCH} != "aarch64"
# Hits an assert in llvm when building for arm64:
# https://llvm.org/bugs/show_bug.cgi?id=26081
TAP_TESTS_C+= csqrt_test
.endif
TAP_TESTS_C+= ctrig_test
TAP_TESTS_C+= exponential_test
TAP_TESTS_C+= fenv_test
TAP_TESTS_C+= fma_test
# clang 3.8.0 fails always fails this test. See: bug 208703
#
# XXX: depending on this compiler version check doesn't work at
# buildworld/installworld time, which results in jenkins failures (bug 208963)
# because the build is run on a 10.x instance, which has an older clang
# compiler.
#
#.if ! (${COMPILER_TYPE} == "clang" && ${COMPILER_VERSION} == 30800)
#TAP_TESTS_C+= fmaxmin_test
#.endif
TAP_TESTS_C+= ilogb_test
TAP_TESTS_C+= invtrig_test
TAP_TESTS_C+= invctrig_test
TAP_TESTS_C+= logarithm_test
TAP_TESTS_C+= lrint_test
# XXX: the testcase crashes on all platforms, but only on head
# (bug 205451)
#TAP_TESTS_C+= lround_test
TAP_TESTS_C+= nan_test
TAP_TESTS_C+= nearbyint_test
TAP_TESTS_C+= next_test
TAP_TESTS_C+= rem_test
TAP_TESTS_C+= trig_test
.if !empty(PROG) && !empty(TAP_TESTS_C:M${PROG})
CFLAGS+= -O0
.endif
CSTD= c99
#COPTS+= -Wfloat-equal
IGNORE_PRAGMA=
LIBADD+= m
# Copied from lib/msun/Makefile
.if ${MACHINE_CPUARCH} == "i386"
ARCH_SUBDIR= i387
.else
ARCH_SUBDIR= ${MACHINE_CPUARCH}
.endif
.include "../${ARCH_SUBDIR}/Makefile.inc"
# XXX: for some odd reason float.h doesn't tell the full story about what the
# precision is.
CFLAGS+= -DLDBL_PREC=${LDBL_PREC}
.include <netbsd-tests.test.mk>
.include <bsd.test.mk>