summaryrefslogtreecommitdiff
path: root/regress/lib/libc/sleep/Makefile
blob: 3700b1662a14459ad772cb7a7a0a71ee0e705fbe (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
#	$OpenBSD: Makefile,v 1.1 2009/12/14 05:08:19 guenther Exp $

NOMAN=
PROG=sleep_test
CPPFLAGS+=-I${.CURDIR}/../../../../lib/libc

run-regress-${PROG}: ${PROG}
	[ x$$(./${PROG} 1) = x0 ] || exit 1
	file=$$(mktemp -t sleep.XXXXXXXXXX); ./${PROG} 4 >$$file & pid=$$!; \
		sleep 1; kill $$pid; sleep 1; v=$$(cat $$file); rm -f $$file; \
		{ [ $$v -gt 0 ] && [ $$v -lt 4 ] ; } || exit 2

.include <bsd.regress.mk>