xref: /freebsd/lib/libc/tests/gen/Makefile (revision be27b3116288a0ff98ddce9c853b6f4fe55e85ee)
1# $FreeBSD$
2
3.include <bsd.own.mk>
4
5ATF_TESTS_C+=		arc4random_test
6ATF_TESTS_C+=		fmtcheck2_test
7ATF_TESTS_C+=		fmtmsg_test
8ATF_TESTS_C+=		fnmatch2_test
9ATF_TESTS_C+=		fpclassify2_test
10ATF_TESTS_C+=		ftw_test
11ATF_TESTS_C+=		glob2_test
12ATF_TESTS_C+=		popen_test
13ATF_TESTS_C+=		posix_spawn_test
14ATF_TESTS_C+=		wordexp_test
15ATF_TESTS_C+=		dlopen_empty_test
16
17# TODO: t_closefrom, t_cpuset, t_fmtcheck, t_randomid,
18# TODO: t_siginfo (fixes require further inspection)
19# TODO: t_sethostname_test (consistently screws up the hostname)
20
21CFLAGS+=	-DTEST_LONG_DOUBLE
22
23# Not sure why this isn't defined for all architectures, since most
24# have long double.
25.if ${MACHINE_CPUARCH} == "aarch64" || \
26    ${MACHINE_CPUARCH} == "amd64" || \
27    ${MACHINE_CPUARCH} == "i386"
28CFLAGS+=	-D__HAVE_LONG_DOUBLE
29.endif
30
31NETBSD_ATF_TESTS_C=	alarm_test
32NETBSD_ATF_TESTS_C+=	assert_test
33NETBSD_ATF_TESTS_C+=	basedirname_test
34NETBSD_ATF_TESTS_C+=	dir_test
35NETBSD_ATF_TESTS_C+=	floatunditf_test
36NETBSD_ATF_TESTS_C+=	fnmatch_test
37NETBSD_ATF_TESTS_C+=	fpclassify_test
38NETBSD_ATF_TESTS_C+=	fpsetmask_test
39NETBSD_ATF_TESTS_C+=	fpsetround_test
40NETBSD_ATF_TESTS_C+=	ftok_test
41NETBSD_ATF_TESTS_C+=	getcwd_test
42NETBSD_ATF_TESTS_C+=	getgrent_test
43NETBSD_ATF_TESTS_C+=	glob_test
44NETBSD_ATF_TESTS_C+=	humanize_number_test
45NETBSD_ATF_TESTS_C+=	isnan_test
46NETBSD_ATF_TESTS_C+=	nice_test
47NETBSD_ATF_TESTS_C+=	pause_test
48NETBSD_ATF_TESTS_C+=	raise_test
49NETBSD_ATF_TESTS_C+=	realpath_test
50NETBSD_ATF_TESTS_C+=	setdomainname_test
51NETBSD_ATF_TESTS_C+=	sethostname_test
52NETBSD_ATF_TESTS_C+=	sleep_test
53NETBSD_ATF_TESTS_C+=	syslog_test
54NETBSD_ATF_TESTS_C+=	time_test
55NETBSD_ATF_TESTS_C+=	ttyname_test
56NETBSD_ATF_TESTS_C+=	vis_test
57
58.include "../Makefile.netbsd-tests"
59
60LIBADD.humanize_number_test+=	util
61
62LIBADD.fpclassify_test+=m
63LIBADD.fpsetround_test+=m
64LIBADD.siginfo_test+=	m
65
66LIBADD.nice_test+=	pthread
67LIBADD.syslog_test+=	pthread
68
69CFLAGS+=		-I${.CURDIR}
70
71SRCS.fmtcheck2_test=	fmtcheck_test.c
72SRCS.fnmatch2_test=	fnmatch_test.c
73
74TESTS_SUBDIRS=	execve
75TESTS_SUBDIRS+=	posix_spawn
76
77# The old testcase name
78TEST_FNMATCH=	test-fnmatch
79CLEANFILES+=		${GEN_SH_CASE_TESTCASES}
80sh-tests: .PHONY
81.for target in clean obj depend all
82	@cd ${.CURDIR} && ${MAKE} PROG=${TEST_FNMATCH} \
83	    -DNO_SUBDIR ${target}
84.endfor
85	@cd ${.OBJDIR} && ./${TEST_FNMATCH} -s 1 > \
86	    ${SRCTOP}/bin/sh/tests/builtins/case2.0
87	@cd ${.OBJDIR} && ./${TEST_FNMATCH} -s 2 > \
88	    ${SRCTOP}/bin/sh/tests/builtins/case3.0
89
90.include <bsd.test.mk>
91