summaryrefslogtreecommitdiff
path: root/regress/Makefile
diff options
context:
space:
mode:
authorAnil Madhavapeddy <avsm@cvs.openbsd.org>2002-09-02 19:56:56 +0000
committerAnil Madhavapeddy <avsm@cvs.openbsd.org>2002-09-02 19:56:56 +0000
commit70193690e3923fa6112b8081bdb745c3d4cbf025 (patch)
tree1698f113eccd6c769bb561f6228bacc0cf3a50aa /regress/Makefile
parent271b56cac31ac1bca5bb463a045e9afa2209dda9 (diff)
- Precede internal bsd.regress.mk variables with a _
- Rename old variables to be easier to read, and deprecate old variables. The old variables will still work, but emit warnings. - REGRESS_SKIP_SLOW only needs to be non-empty now, not explicitly set to 'yes' - REGRESS_LOG can contain more than one file to append results to - ERRORS variable can be set in Makefile to emit warnings or indicate fatal errors. - Add REGRESS_MAIL variable which can be set to an email address to send results to. Currently this only works for a full regression run, since art doesnt want partial run results - sync bsd.regress.mk(5) with these changes ok art@ , also looked over by miod@
Diffstat (limited to 'regress/Makefile')
-rw-r--r--regress/Makefile47
1 files changed, 44 insertions, 3 deletions
diff --git a/regress/Makefile b/regress/Makefile
index f88df9c48e4..7690c3940ca 100644
--- a/regress/Makefile
+++ b/regress/Makefile
@@ -1,4 +1,4 @@
-# $OpenBSD: Makefile,v 1.12 2002/02/23 01:25:10 art Exp $
+# $OpenBSD: Makefile,v 1.13 2002/09/02 19:56:55 avsm Exp $
#
# To run full regression tests you just need two steps:
@@ -9,12 +9,53 @@
# as "regress" (possibly with more bugs). This allows us to include
# compilation as a part of the regression test.
#
-# To get a log of test results set the REGRESSLOG make variable to
+# To get a log of test results set the REGRESS_LOG make variable to
# a log file, use an absolute path.
-# To skip the really slow tests, set the REGRESSSKIPSLOW variable.
+# To mail the test results set the REGRESS_MAIL make variable to an
+# email address, preferably 'regress@openbsd.org'.
+# To skip the really slow tests, set the REGRESS_SKIP_SLOW variable.
SUBDIR+= etc bin include lib libexec sbin sys share usr.bin
install:
+REGRESS_MAIL?=
+
+.if !empty(REGRESS_MAIL)
+_REGRESS_TMP!=/usr/bin/mktemp
+.endif
+
+.if empty(REGRESS_MAIL) || empty(_REGRESS_TMP)
+_REGRESS_TMP=
+_REGRESS_CLEAN=exit 0
+.else
+_REGRESS_CLEAN=rm -f ${_REGRESS_TMP}
+.endif
+.MAKEFLAGS+= _REGRESS_TMP=${_REGRESS_TMP}
+
+.INTERRUPT:
+ ${_REGRESS_CLEAN}
+
+.END: .SILENT
+.if ${.TARGETS:Mall} || ${.TARGETS:Mregress}
+ echo ====================================================================
+.if empty(REGRESS_MAIL) || empty(_REGRESS_TMP)
+ echo Please mail a copy of these regression tests to regress@openbsd.org
+ echo to help with future development.
+ echo
+ echo You can do this automatically by setting the REGRESS_MAIL variable
+ echo $$ make REGRESS_MAIL=regress@openbsd.org regress
+ echo
+ echo You can also set REGRESS_LOG to point to a file and mail it manually.
+ echo $$ make REGRESS_LOG=/var/log/regress-tests regress
+.else
+ echo Mailing regress results to ${REGRESS_MAIL} ...
+ echo If you want them to be also logged locally, you can set the
+ echo REGRESS_LOG make variable to the full path of a log file.
+ (sysctl -n kern.version && cat ${_REGRESS_TMP}) | /usr/bin/mail -s "Regress: `uname -a`" ${REGRESS_MAIL}
+.endif
+ echo ====================================================================
+ ${_REGRESS_CLEAN}
+.endif
+
.include <bsd.subdir.mk>