1 .\" $Id: regress.pl.1,v 1.5 2020/03/13 15:32:31 schwarze Exp $
3 .\" Copyright (c) 2017, 2019, 2020 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: March 13 2020 $
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 originally designed for OpenBSD only.
37 When run without an argument,
39 runs the complete regression suite.
41 The first argument is a Perl regular expression to match test names,
42 automatically anchored at the beginning of the names.
43 Test names are names of test input files without the file name extension
46 .Pa char/unicode/named .
48 Any additional arguments modify the way the tests are run.
51 The following modifiers are available:
52 .Bl -tag -width markdown
54 Run all kinds of subtests.
55 This implies all other modifiers except
64 Remove all output files created by running the tests.
72 warning and error output.
82 Run subtests for automatic and manual tagging.
88 Display approximate indications of what is being done.
93 The recommended invocation for casual users:
99 .Dl ./regress.pl \&. verbose
101 Complete check, but keep the tree clean:
103 .Dl ./regress.pl \&. all clean
105 Investigate a specific failure:
107 .Dl ./regress.pl mdoc/Bd/broken man verbose
111 script appeared in release 1.14.1 of the portable
115 .An Ingo Schwarze Aq Mt schwarze@openbsd.org
117 This script is not optimized for elegance.
118 Regression suites for other software should not copy the design.
120 The problem it solves is that the
122 regression suite is tightly integrated into the regression
123 testing system of the OpenBSD base system, which requires
126 working neither with POSIX make nor with GNU make, and which
127 also requires the OpenBSD-specific Makefile fragments in
129 The workaround of parsing the Makefiles by hand and constructing
130 the required command lines by hand is unavoidably messy; it's
131 the classic no-no of parsing a language with an ad-hoc incomplete
133 But the problem of providing this regression suite for other
134 operating systems stood unsolved for many years, and no cleaner
135 solution was found that could be implemented with reasonable effort.
136 So maybe this is better than nothing.
138 The top-level Makefiles for running this regression suite on
139 OpenBSD are not included in the portable distribution.
140 They are too OpenBSD-specific to be useful elsewhere,
141 and on OpenBSD itself, the suite ought be run natively from
142 .Pa /usr/src/regress/usr.bin/mandoc
143 and not from the portable distribution.
147 subdirectory of the regression suite is not included.
148 It uses a Makefile structure that differs vastly from the
151 The C library function
153 is known to be buggy on Solaris, which may cause failures in the
154 regression suite, usually because output lines containing affected
155 Unicode characters wrap too early.
157 The regression suite does not work at all on Solaris 10 or earlier
158 because the Perl interpreter provided with those systems is too old.