freebsd-skq/lib/libc/tests/gen/Makefile
ngie 92100036c8 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

80 lines
2.1 KiB
Makefile

# $FreeBSD$
.include <bsd.own.mk>
ATF_TESTS_C+= arc4random_test
ATF_TESTS_C+= fmtcheck2_test
ATF_TESTS_C+= fmtmsg_test
ATF_TESTS_C+= fnmatch2_test
ATF_TESTS_C+= fpclassify2_test
ATF_TESTS_C+= ftw_test
ATF_TESTS_C+= popen_test
ATF_TESTS_C+= posix_spawn_test
ATF_TESTS_C+= wordexp_test
ATF_TESTS_C+= dlopen_empty_test
# TODO: t_closefrom, t_cpuset, t_fmtcheck, t_randomid, t_sleep
# TODO: t_siginfo (fixes require further inspection)
# TODO: t_sethostname_test (consistently screws up the hostname)
NETBSD_ATF_TESTS_C= alarm_test
NETBSD_ATF_TESTS_C+= assert_test
NETBSD_ATF_TESTS_C+= basedirname_test
NETBSD_ATF_TESTS_C+= dir_test
NETBSD_ATF_TESTS_C+= floatunditf_test
NETBSD_ATF_TESTS_C+= fnmatch_test
NETBSD_ATF_TESTS_C+= fpclassify_test
NETBSD_ATF_TESTS_C+= fpsetmask_test
NETBSD_ATF_TESTS_C+= fpsetround_test
NETBSD_ATF_TESTS_C+= ftok_test
NETBSD_ATF_TESTS_C+= getcwd_test
NETBSD_ATF_TESTS_C+= getgrent_test
NETBSD_ATF_TESTS_C+= glob_test
NETBSD_ATF_TESTS_C+= humanize_number_test
NETBSD_ATF_TESTS_C+= isnan_test
NETBSD_ATF_TESTS_C+= nice_test
NETBSD_ATF_TESTS_C+= pause_test
NETBSD_ATF_TESTS_C+= raise_test
NETBSD_ATF_TESTS_C+= realpath_test
NETBSD_ATF_TESTS_C+= setdomainname_test
NETBSD_ATF_TESTS_C+= sethostname_test
NETBSD_ATF_TESTS_C+= sleep_test
NETBSD_ATF_TESTS_C+= syslog_test
NETBSD_ATF_TESTS_C+= time_test
NETBSD_ATF_TESTS_C+= ttyname_test
NETBSD_ATF_TESTS_C+= vis_test
.include "../Makefile.netbsd-tests"
LIBADD.humanize_number_test+= util
LIBADD.fpclassify_test+=m
LIBADD.fpsetround_test+=m
LIBADD.siginfo_test+= m
LIBADD.nice_test+= pthread
LIBADD.syslog_test+= pthread
CFLAGS+= -I${.CURDIR}
SRCS.fmtcheck2_test= fmtcheck_test.c
SRCS.fnmatch2_test= fnmatch_test.c
TESTS_SUBDIRS= execve
TESTS_SUBDIRS+= posix_spawn
# The old testcase name
TEST_FNMATCH= test-fnmatch
CLEANFILES+= ${GEN_SH_CASE_TESTCASES}
sh-tests: .PHONY
.for target in clean obj depend all
@cd ${.CURDIR} && ${MAKE} PROG=${TEST_FNMATCH} \
-DNO_SUBDIR ${target}
.endfor
@cd ${.OBJDIR} && ./${TEST_FNMATCH} -s 1 > \
${SRCTOP}/bin/sh/tests/builtins/case2.0
@cd ${.OBJDIR} && ./${TEST_FNMATCH} -s 2 > \
${SRCTOP}/bin/sh/tests/builtins/case3.0
.include <bsd.test.mk>