1 .\" $Id: regress.pl.1,v 1.1 2017/02/08 03:02:13 schwarze Exp $
3 .\" Copyright (c) 2017 Ingo Schwarze <schwarze@openbsd.org>
5 .\" Permission to use, copy, modify, and distribute this software for any
6 .\" purpose with or without fee is hereby granted, provided that the above
7 .\" copyright notice and this permission notice appear in all copies.
9 .\" THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
10 .\" WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
11 .\" MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
12 .\" ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
13 .\" WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
14 .\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
15 .\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
17 .Dd $Mdocdate: February 8 2017 $
22 .Nd portable steering script for mandoc regression tests
26 .Ar directory Ns Op Pf : Ar test
32 steering script allows running the
34 regression suite on arbitrary operating systems,
35 even though the suite was designed for OpenBSD only.
37 When run without an argument,
39 runs the complete regression suite.
41 When run with one argument, that argument can be:
44 A single dot to run the complete suite.
46 One of the top level directories, for example
48 to run the test suite for a complete language or feature group.
50 A subdirectory, for example
52 to run the tests for a specific macro or an individual feature.
54 A subdirectory with a test name appended with a colon, for example
55 .Pa char/unicode : Ns Pa named ,
56 to run the tests for one particular input file.
59 Any additional arguments modify the way the tests are run.
62 The following modifiers are available:
63 .Bl -tag -width verbose
65 Run all kinds of subtests.
66 This implies all other modifiers except
75 Remove all output files created by running the tests.
83 warning and error output.
93 Display approximate indications of what is being done.
96 The amount of summary lines shown can be modified by giving an
97 argument consisting of a single digit:
98 .Bl -tag -width verbose
100 Show all summary lines for all directories entered.
103 this generates more than hundred lines of output when running the
104 complete regression suite.
107 It shows the summary lines for the
109 given on the command line and its immediate children.
112 the output usually fits on one screen.
114 Only show a single summary line for the whole run.
116 Do not show any summary lines.
117 No output means success.
118 Success or failure can also be seen from the exit status.
121 All failed tests are always reported, even when the
127 The recommended invocation for casual users:
133 .Dl ./regress.pl \&. verbose
135 Complete check, but keep the tree clean:
137 .Dl ./regress.pl \&. all clean
141 but don't print the usual 65 lines of output:
143 .Dl ./regress.pl mdoc 1
145 Investigate a specific failure:
147 .Dl ./regress.pl mdoc/Bd:broken man verbose
151 script appeared in release 1.14.1 of the portable
155 .An Ingo Schwarze Aq Mt schwarze@openbsd.org
157 This script is not optimized for elegance.
158 Regression suites for other software should not copy the design.
160 The problem it solves is that the
162 regression suite is tightly integrated into the regression
163 testing system of the OpenBSD base system, which requires
166 working neither with POSIX make nor with GNU make, and which
167 also requires the OpenBSD-specific Makefile fragments in
169 The workaround of parsing the Makefiles by hand and constructing
170 the required command lines by hand is unavoidably messy; it's
171 the classic no-no of parsing a language with an ad-hoc incomplete
173 But the problem of providing this regression suite for other
174 operating systems stood unsolved for many years, and no cleaner
175 solution was found that could be implemented with reasonable effort.
176 So maybe this is better than nothing.
178 The top-level Makefiles for running this regression suite on
179 OpenBSD are not included in the portable distribution.
180 They are too OpenBSD-specific to be useful elsewhere,
181 and on OpenBSD itself, the suite ought be run natively from
182 .Pa /usr/src/regress/usr.bin/mandoc
183 and not from the portable distribution.
187 subdirectory of the regression suite is not included.
188 It uses a Makefile structure that differs vastly from the