Annotation of src/share/mk/bsd.regress.mk, Revision 1.5
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:
1.4 art 31: REGRESSSKIPSLOW?=no
32:
33: .if (${REGRESSSKIPSLOW} == "yes") && defined(REGRESSSLOWTARGETS)
34: REGRESSSKIPTARGETS+=${REGRESSSLOWTARGETS}
35: .endif
36:
1.1 art 37: REGRESSSKIPTARGETS?=
38:
39: regress:
40: .for RT in ${REGRESSTARGETS}
41: . if ${REGRESSSKIPTARGETS:M${RT}}
42: @echo -n "SKIP " >> ${REGRESSLOG}
43: . else
1.3 art 44: # XXX - we need a better method to see if a test fails due to timeout or just
45: # normal failure.
46: . if !defined(REGRESSMAXTIME)
1.1 art 47: @if cd ${.CURDIR} && ${MAKE} ${RT}; then \
48: echo -n "SUCCESS " >> ${REGRESSLOG} ; \
1.3 art 49: else \
1.1 art 50: echo -n "FAIL " >> ${REGRESSLOG} ; \
51: echo FAILED ; \
52: fi
1.3 art 53: . else
54: @if cd ${.CURDIR} && (ulimit -t ${REGRESSMAXTIME} ; ${MAKE} ${RT}); then \
55: echo -n "SUCCESS " >> ${REGRESSLOG} ; \
56: else \
1.5 ! art 57: echo -n "FAIL (possible timeout) " >> ${REGRESSLOG} ; \
1.3 art 58: echo FAILED ; \
59: fi
60: . endif
1.1 art 61: . endif
62: @echo ${REGRESSNAME}/${RT:S/^run-regress-//} >> ${REGRESSLOG}
63: .endfor
64:
65: .PHONY: regress