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