xref: /freebsd/lib/libc/tests/stdlib/Makefile (revision e32fecd0c2c3ee37c47ee100f169e7eb0282a873)
1# $FreeBSD$
2
3.include <src.opts.mk>
4
5ATF_TESTS_C+=		clearenv_test
6ATF_TESTS_C+=		dynthr_test
7ATF_TESTS_C+=		heapsort_test
8ATF_TESTS_C+=		mergesort_test
9ATF_TESTS_C+=		qsort_test
10.if ${COMPILER_TYPE} == "clang"
11ATF_TESTS_C+=		qsort_b_test
12.endif
13ATF_TESTS_C+=		qsort_r_compat_test
14ATF_TESTS_C+=		qsort_r_test
15ATF_TESTS_C+=		qsort_s_test
16ATF_TESTS_C+=		set_constraint_handler_s_test
17ATF_TESTS_C+=		strfmon_test
18ATF_TESTS_C+=		tsearch_test
19ATF_TESTS_CXX+=		cxa_thread_atexit_test
20ATF_TESTS_CXX+=		cxa_thread_atexit_nothr_test
21
22# All architectures on FreeBSD have fenv.h
23CFLAGS+=	-D__HAVE_FENV
24
25# Define __HAVE_LONG_DOUBLE for architectures whose long double has greater
26# precision than their double.
27.if ${MACHINE_CPUARCH} == "aarch64" || \
28    ${MACHINE_CPUARCH} == "amd64" || \
29    ${MACHINE_CPUARCH} == "i386" || \
30    ${MACHINE_CPUARCH} == "riscv"
31CFLAGS+=	-D__HAVE_LONG_DOUBLE
32.endif
33
34# TODO: t_getenv_thread, t_mi_vector_hash, t_strtoi
35NETBSD_ATF_TESTS_C+=	abs_test
36NETBSD_ATF_TESTS_C+=	atoi_test
37NETBSD_ATF_TESTS_C+=	div_test
38NETBSD_ATF_TESTS_C+=	getenv_test
39NETBSD_ATF_TESTS_C+=	exit_test
40NETBSD_ATF_TESTS_C+=	hsearch_test
41NETBSD_ATF_TESTS_C+=	posix_memalign_test
42NETBSD_ATF_TESTS_C+=	random_test
43NETBSD_ATF_TESTS_C+=	strtod_test
44NETBSD_ATF_TESTS_C+=	strtol_test
45NETBSD_ATF_TESTS_C+=	system_test
46
47# TODO: need to come up with a correct explanation of what the patch pho does
48# with h_atexit
49#ATF_TESTS_SH=	atexit_test
50NETBSD_ATF_TESTS_SH=	getopt_test
51
52.include "../Makefile.netbsd-tests"
53
54BINDIR=		${TESTSDIR}
55
56# TODO: see comment above
57#PROGS+=		h_atexit
58PROGS+=		h_getopt h_getopt_long
59
60CFLAGS+=	-I${.CURDIR}
61
62CXXSTD.cxa_thread_atexit_test=	c++11
63CXXSTD.cxa_thread_atexit_nothr_test=	c++11
64LIBADD.cxa_thread_atexit_test+=		pthread
65
66# Tests that requires Blocks feature
67.for t in qsort_b_test
68CFLAGS.${t}.c+=		-fblocks
69LIBADD.${t}+=		BlocksRuntime
70.endfor
71
72.for t in h_getopt h_getopt_long
73CFLAGS.$t+=	-I${LIBNETBSD_SRCDIR} -I${SRCTOP}/contrib/netbsd-tests
74LDFLAGS.$t+=	-L${LIBNETBSD_OBJDIR}
75
76LIBADD.${t}+=	netbsd util
77.endfor
78
79LIBADD.strtod_test+=		m
80
81SUBDIR+=	dynthr_mod
82
83.include <bsd.test.mk>
84