aboutsummaryrefslogtreecommitdiff
path: root/crypto/openssh/regress/bsd.regress.mk
diff options
context:
space:
mode:
authorDag-Erling Smørgrav <des@FreeBSD.org>2002-06-27 22:31:32 +0000
committerDag-Erling Smørgrav <des@FreeBSD.org>2002-06-27 22:31:32 +0000
commit83d2307d00b1f24dddf918c6651fb440d6863bf9 (patch)
treed93e4bc5fc0a9a5e99878bd93a4d51c873c1a43e /crypto/openssh/regress/bsd.regress.mk
parent545d5eca429a5967b3300cb527d49cae8184e79f (diff)
Vendor import of OpenSSH 3.3p1.
Notes
Notes: svn path=/vendor-crypto/openssh/dist/; revision=98937
Diffstat (limited to 'crypto/openssh/regress/bsd.regress.mk')
-rw-r--r--crypto/openssh/regress/bsd.regress.mk79
1 files changed, 79 insertions, 0 deletions
diff --git a/crypto/openssh/regress/bsd.regress.mk b/crypto/openssh/regress/bsd.regress.mk
new file mode 100644
index 000000000000..9b8011a01af6
--- /dev/null
+++ b/crypto/openssh/regress/bsd.regress.mk
@@ -0,0 +1,79 @@
+# $OpenBSD: bsd.regress.mk,v 1.9 2002/02/17 01:10:15 marc Exp $
+# No man pages for regression tests.
+NOMAN=
+
+# No installation.
+install:
+
+# If REGRESSTARGETS is defined and PROG is not defined, set NOPROG
+.if defined(REGRESSTARGETS) && !defined(PROG)
+NOPROG=
+.endif
+
+.include <bsd.prog.mk>
+
+.MAIN: all
+all: regress
+
+# XXX - Need full path to REGRESSLOG, otherwise there will be much pain.
+
+REGRESSLOG?=/dev/null
+REGRESSNAME=${.CURDIR:S/${BSDSRCDIR}\/regress\///}
+
+.if defined(PROG) && !empty(PROG)
+run-regress-${PROG}: ${PROG}
+ ./${PROG}
+.endif
+
+.if !defined(REGRESSTARGETS)
+REGRESSTARGETS=run-regress-${PROG}
+. if defined(REGRESSSKIP)
+REGRESSSKIPTARGETS=run-regress-${PROG}
+. endif
+.endif
+
+REGRESSSKIPSLOW?=no
+
+#.if (${REGRESSSKIPSLOW:L} == "yes") && defined(REGRESSSLOWTARGETS)
+
+.if (${REGRESSSKIPSLOW} == "yes") && defined(REGRESSSLOWTARGETS)
+REGRESSSKIPTARGETS+=${REGRESSSLOWTARGETS}
+.endif
+
+.if defined(REGRESSROOTTARGETS)
+ROOTUSER!=id -g
+SUDO?=
+. if (${ROOTUSER} != 0) && empty(SUDO)
+REGRESSSKIPTARGETS+=${REGRESSROOTTARGETS}
+. endif
+.endif
+
+REGRESSSKIPTARGETS?=
+
+regress:
+.for RT in ${REGRESSTARGETS}
+. 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 \
+ 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 (possible timeout) " >> ${REGRESSLOG} ; \
+ echo FAILED ; \
+ fi
+. endif
+. endif
+ @echo ${REGRESSNAME}/${RT:S/^run-regress-//} >> ${REGRESSLOG}
+.endfor
+
+.PHONY: regress