[BACK]Return to bsd.regress.mk CVS log [TXT][DIR] Up to [local] / src / share / mk

Annotation of src/share/mk/bsd.regress.mk, Revision 1.9

1.9     ! marc        1: #      $OpenBSD: bsd.regress.mk,v 1.8 2002/01/03 16:54:38 brad Exp $
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>
1.7       art        14:
                     15: .MAIN: all
                     16: all: regress
1.1       art        17:
                     18: # XXX - Need full path to REGRESSLOG, otherwise there will be much pain.
                     19:
                     20: REGRESSLOG?=/dev/null
                     21: REGRESSNAME=${.CURDIR:S/${BSDSRCDIR}\/regress\///}
                     22:
                     23: .if defined(PROG) && !empty(PROG)
1.3       art        24: run-regress-${PROG}: ${PROG}
1.1       art        25:        ./${PROG}
                     26: .endif
                     27:
                     28: .if !defined(REGRESSTARGETS)
                     29: REGRESSTARGETS=run-regress-${PROG}
                     30: .  if defined(REGRESSSKIP)
                     31: REGRESSSKIPTARGETS=run-regress-${PROG}
                     32: .  endif
                     33: .endif
                     34:
1.4       art        35: REGRESSSKIPSLOW?=no
                     36:
1.8       brad       37: .if (${REGRESSSKIPSLOW:L} == "yes") && defined(REGRESSSLOWTARGETS)
1.4       art        38: REGRESSSKIPTARGETS+=${REGRESSSLOWTARGETS}
1.9     ! marc       39: .endif
        !            40:
        !            41: .if defined(REGRESSROOTTARGETS)
        !            42: ROOTUSER!=id -g
        !            43: SUDO?=
        !            44: . if (${ROOTUSER} != 0) && empty(SUDO)
        !            45: REGRESSSKIPTARGETS+=${REGRESSROOTTARGETS}
        !            46: . endif
1.4       art        47: .endif
                     48:
1.1       art        49: REGRESSSKIPTARGETS?=
                     50:
                     51: regress:
                     52: .for RT in ${REGRESSTARGETS}
                     53: .  if ${REGRESSSKIPTARGETS:M${RT}}
                     54:        @echo -n "SKIP " >> ${REGRESSLOG}
                     55: .  else
1.3       art        56: # XXX - we need a better method to see if a test fails due to timeout or just
                     57: #       normal failure.
                     58: .   if !defined(REGRESSMAXTIME)
1.1       art        59:        @if cd ${.CURDIR} && ${MAKE} ${RT}; then \
                     60:            echo -n "SUCCESS " >> ${REGRESSLOG} ; \
1.3       art        61:        else \
1.1       art        62:            echo -n "FAIL " >> ${REGRESSLOG} ; \
                     63:            echo FAILED ; \
                     64:        fi
1.3       art        65: .   else
                     66:        @if cd ${.CURDIR} && (ulimit -t ${REGRESSMAXTIME} ; ${MAKE} ${RT}); then \
                     67:            echo -n "SUCCESS " >> ${REGRESSLOG} ; \
                     68:        else \
1.5       art        69:            echo -n "FAIL (possible timeout) " >> ${REGRESSLOG} ; \
1.3       art        70:            echo FAILED ; \
                     71:        fi
                     72: .   endif
1.1       art        73: .  endif
                     74:        @echo ${REGRESSNAME}/${RT:S/^run-regress-//} >> ${REGRESSLOG}
                     75: .endfor
                     76:
                     77: .PHONY: regress