1.\" $OpenBSD: bsd.regress.mk.5,v 1.5 2007/05/31 19:19:58 jmc Exp $ 2.\" 3.\" Copyright (c) 2002 Anil Madhavapeddy 4.\" Copyright (c) 2000 Marc Espie 5.\" 6.\" All rights reserved. 7.\" 8.\" Redistribution and use in source and binary forms, with or without 9.\" modification, are permitted provided that the following conditions 10.\" are met: 11.\" 1. Redistributions of source code must retain the above copyright 12.\" notice, this list of conditions and the following disclaimer. 13.\" 2. Redistributions in binary form must reproduce the above copyright 14.\" notice, this list of conditions and the following disclaimer in the 15.\" documentation and/or other materials provided with the distribution. 16.\" 17.\" THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY EXPRESS OR 18.\" IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES 19.\" OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 20.\" IN NO EVENT SHALL THE DEVELOPERS BE LIABLE FOR ANY DIRECT, INDIRECT, 21.\" INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 22.\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 23.\" DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 24.\" THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 25.\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF 26.\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 27.\" 28.Dd $Mdocdate: May 31 2007 $ 29.Dt BSD.REGRESS.MK 5 30.Os 31.Sh NAME 32.Nm bsd.regress.mk 33.Nd regression test master Makefile fragment 34.Sh SYNOPSIS 35.Fd .include <bsd.regress.mk> 36.Sh DESCRIPTION 37.Nm 38holds the standard routines used by the source regression tests. 39Some variables and targets are for its internal use only. 40The rest are documented here. 41.Pp 42Since this file also includes 43.Nm bsd.prog.mk , 44all of the usual 45.Ox 46Makefile variables may be used to build the regression 47test programs. 48.Sh TARGETS 49.Bl -tag -width regress 50.It Ar depend 51Build any dependencies required to carry out the current set 52of regression tests. 53.It Ar regress 54Executes all of the regression targets defined in the Makefile. 55.It Ar run-regress-* 56Runs an individual regression test. 57If the exit status of the program indicates an error or timeout, 58then a failure is logged, otherwise the test is marked as a success. 59.El 60.Sh VARIABLES 61.Bl -tag -width REGRESS_LOG 62.It Ev REGRESS_LOG 63Points to the fully-qualified path of a file to which regression 64results are appended. 65Defaults to 66.Pa /dev/null . 67.It Ev REGRESS_MAXTIME 68Maximum limit of CPU seconds to spend on the regression test. 69Exceeding this time will result in a failure being logged. 70.It Ev REGRESS_ROOT_TARGETS 71Targets for which root access is required to run the test. 72The 73.Ev SUDO 74variable is invoked for these targets. 75See also 76.Ev SUDO . 77.It Ev REGRESS_SKIP_SLOW 78If this variable is not empty, skip over all the regression 79tests which have been marked as being 'slow' using the 80.Ev REGRESS_SLOW_TARGETS 81variable. 82.It Ev REGRESS_SLOW_TARGETS 83Targets which are defined as 'slow'. 84All of these tests can be skipped by setting the 85.Ev REGRESS_SKIP_SLOW 86variable. 87.It Ev REGRESS_TARGETS 88Targets which are invoked to run the set of regression tests 89for this Makefile. 90Defaults to 91.Ar run-regress-${PROG} . 92.It Ev SUDO 93Location of the sudo command, used to switch to root for certain 94test targets which require it. 95.El 96.Sh SEE ALSO 97.Xr bsd.port.mk 5 98.Sh HISTORY 99The regression system originally came from 100.Nx , 101with many tests added by 102.Ox 103since. 104The current Makefile framework was written by Artur Grabowski 105and Marc Espie for 106.Ox 3.1 . 107.Sh BUGS AND LIMITATIONS 108The build system is unable to distinguish between timeouts due to 109.Ev REGRESS_MAXTIME 110being exceeded, or a genuine failure occurring. 111