summaryrefslogtreecommitdiff
path: root/lib/libc_r/TEST/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'lib/libc_r/TEST/Makefile')
-rw-r--r--lib/libc_r/TEST/Makefile22
1 files changed, 15 insertions, 7 deletions
diff --git a/lib/libc_r/TEST/Makefile b/lib/libc_r/TEST/Makefile
index 5b47a0121d8..9b95619ccdf 100644
--- a/lib/libc_r/TEST/Makefile
+++ b/lib/libc_r/TEST/Makefile
@@ -10,32 +10,39 @@
LIBC_R?= /usr/lib/libc_r.a
-CFLAGS += -pthread
+CPPFLAGS += -pthread
+LDFLAGS += -pthread
CFLAGS += -ggdb -Wall # -Werror
CFLAGS += -DSRCDIR='"${.CURDIR}"'
LDLIBS += -lm
DPADD += ${LIBC_R}
+MKDEP = -p
# This list used to include test_select, but that test doesn't terminate.
TESTS = test_create test_pthread_join test_switch test_sleep test_readdir \
- test_fork test_execve test_preemption test_preemption_float \
+ test_fork test_execve test_preemption \
test_sock_1 test_sock_2 test_stdio_1 test_pthread_mutex \
test_pthread_cond_timedwait test_netdb test_pw test_cwd \
test_sock_2a
+SRCS = ${TESTS:=.c}
+CLEANFILES += ${TESTS}
+SKIP_TESTS += test_sock_2a
+
# This list used to include p_bench_semaphore, but the semaphore support isn't
# defined for all targets (or used for any).
+
BENCHMARKS = p_bench_read p_bench_mutex p_bench_yield \
p_bench_getpid p_bench_pthread_create
-CLEANFILES += ${TESTS} ${BENCHMARKS}
+SRCS += ${BENCHMARKS:=.c}
+CLEANFILES += ${BENCHMARKS}
-SKIP_TESTS = test_sock_2a
all : tests # benchmarks
tests : ${TESTS}
- @faillist= ; ulimit -t 600; \
+ @faillist= ; ulimit -t 5; \
for i in ${.ALLSRC} ; do \
case " ${SKIP_TESTS} " in \
*" $$i "*) \
@@ -51,11 +58,12 @@ tests : ${TESTS}
esac; \
done; \
if test -n "$$faillist"; then \
- echo; echo "*** FAILED TESTS:$$faillist"; exit 1; \
+ echo; echo "*** tests that failed:$$faillist"; exit 1; \
else \
- exit 0; \
+ echo; echo "All tests passed OK."; exit 0; \
fi
benchmarks: ${BENCHMARKS}
.include <bsd.prog.mk>
+.include <bsd.dep.mk>