Annotation of src/share/mk/bsd.regress.mk, Revision 1.3
1.1 art 1: # No man pages for regression tests.
2: NOMAN=
3:
4: # No installation.
5: install:
6:
1.2 art 7: # If REGRESSTARGETS is defined and PROG is not defined, set NOPROG
1.1 art 8: .if defined(REGRESSTARGETS) && !defined(PROG)
1.2 art 9: NOPROG=
1.1 art 10: .endif
11:
12: .include <bsd.prog.mk>
13:
14: # XXX - Need full path to REGRESSLOG, otherwise there will be much pain.
15:
16: REGRESSLOG?=/dev/null
17: REGRESSNAME=${.CURDIR:S/${BSDSRCDIR}\/regress\///}
18:
19: .if defined(PROG) && !empty(PROG)
1.3 ! art 20: run-regress-${PROG}: ${PROG}
1.1 art 21: ./${PROG}
22: .endif
23:
24: .if !defined(REGRESSTARGETS)
25: REGRESSTARGETS=run-regress-${PROG}
26: . if defined(REGRESSSKIP)
27: REGRESSSKIPTARGETS=run-regress-${PROG}
28: . endif
29: .endif
30:
31: REGRESSSKIPTARGETS?=
32:
33: regress:
34: .for RT in ${REGRESSTARGETS}
35: . if ${REGRESSSKIPTARGETS:M${RT}}
36: @echo -n "SKIP " >> ${REGRESSLOG}
37: . else
1.3 ! art 38: # XXX - we need a better method to see if a test fails due to timeout or just
! 39: # normal failure.
! 40: . if !defined(REGRESSMAXTIME)
1.1 art 41: @if cd ${.CURDIR} && ${MAKE} ${RT}; then \
42: echo -n "SUCCESS " >> ${REGRESSLOG} ; \
1.3 ! art 43: else \
1.1 art 44: echo -n "FAIL " >> ${REGRESSLOG} ; \
45: echo FAILED ; \
46: fi
1.3 ! art 47: . else
! 48: @if cd ${.CURDIR} && (ulimit -t ${REGRESSMAXTIME} ; ${MAKE} ${RT}); then \
! 49: echo -n "SUCCESS " >> ${REGRESSLOG} ; \
! 50: else \
! 51: echo -n "FAIL (timeout) " >> ${REGRESSLOG} ; \
! 52: echo FAILED ; \
! 53: fi
! 54: . endif
1.1 art 55: . endif
56: @echo ${REGRESSNAME}/${RT:S/^run-regress-//} >> ${REGRESSLOG}
57: .endfor
58:
59: .PHONY: regress