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