summaryrefslogtreecommitdiff
path: root/share
diff options
context:
space:
mode:
authorArtur Grabowski <art@cvs.openbsd.org>2002-01-03 00:28:29 +0000
committerArtur Grabowski <art@cvs.openbsd.org>2002-01-03 00:28:29 +0000
commit81db65b5e42027ea2afba92a3af1247d6bffd089 (patch)
tree79639209b43be2003768c8b1c776e7d1482fa95a /share
parentae50540f96654b5614ece541f78b190837ddb3bc (diff)
Support for a new variable REGRESSMAXTIME that sets the cpu time
ulimit for tests. Needed for libc_r tests. With some help from marc@
Diffstat (limited to 'share')
-rw-r--r--share/mk/bsd.regress.mk15
1 files changed, 13 insertions, 2 deletions
diff --git a/share/mk/bsd.regress.mk b/share/mk/bsd.regress.mk
index d65bed8b2fc..8186e6a69f1 100644
--- a/share/mk/bsd.regress.mk
+++ b/share/mk/bsd.regress.mk
@@ -17,7 +17,7 @@ REGRESSLOG?=/dev/null
REGRESSNAME=${.CURDIR:S/${BSDSRCDIR}\/regress\///}
.if defined(PROG) && !empty(PROG)
-run-regress-${PROG}: ./${PROG}
+run-regress-${PROG}: ${PROG}
./${PROG}
.endif
@@ -35,12 +35,23 @@ regress:
. if ${REGRESSSKIPTARGETS:M${RT}}
@echo -n "SKIP " >> ${REGRESSLOG}
. else
+# XXX - we need a better method to see if a test fails due to timeout or just
+# normal failure.
+. if !defined(REGRESSMAXTIME)
@if cd ${.CURDIR} && ${MAKE} ${RT}; then \
echo -n "SUCCESS " >> ${REGRESSLOG} ; \
- else \
+ else \
echo -n "FAIL " >> ${REGRESSLOG} ; \
echo FAILED ; \
fi
+. else
+ @if cd ${.CURDIR} && (ulimit -t ${REGRESSMAXTIME} ; ${MAKE} ${RT}); then \
+ echo -n "SUCCESS " >> ${REGRESSLOG} ; \
+ else \
+ echo -n "FAIL (timeout) " >> ${REGRESSLOG} ; \
+ echo FAILED ; \
+ fi
+. endif
. endif
@echo ${REGRESSNAME}/${RT:S/^run-regress-//} >> ${REGRESSLOG}
.endfor