2 .\" $NetBSD: tests.kyua.7,v 1.2 2013/07/20 21:39:59 wiz Exp $
4 .\" Copyright (c) 2010 The NetBSD Foundation, Inc.
5 .\" All rights reserved.
7 .\" Redistribution and use in source and binary forms, with or without
8 .\" modification, are permitted provided that the following conditions
10 .\" 1. Redistributions of source code must retain the above copyright
11 .\" notice, this list of conditions and the following disclaimer.
12 .\" 2. Redistributions in binary form must reproduce the above copyright
13 .\" notice, this list of conditions and the following disclaimer in the
14 .\" documentation and/or other materials provided with the distribution.
16 .\" THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND
17 .\" CONTRIBUTORS ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES,
18 .\" INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
19 .\" MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
20 .\" IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS BE LIABLE FOR ANY
21 .\" DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
22 .\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE
23 .\" GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
24 .\" INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER
25 .\" IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
26 .\" OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN
27 .\" IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
34 .Nd introduction to the FreeBSD test suite
38 test suite provides a collection of automated tests for two major purposes.
39 On the one hand, the test suite aids
41 in catching bugs and regressions in the code when they performing modifications
43 On the other hand, the test suite allows
45 (and, in particular, system administrators) to verify that fresh installations
48 operating system behave correctly in their hardware platform and also to ensure
49 that the system does not suffer from regressions during regular system
50 operation and maintenance.
54 test suite is installed under the
58 This manual page describes how to execute the test suite and how to configure
59 some of its optional features.
60 .Ss When to run the tests?
61 Before diving into the details of how to run the test suite, here are some
62 scenarios in which you should be running them:
63 .Bl -bullet -offset indent
65 After a fresh installation of
67 to ensure that the system works correctly on your hardware platform.
71 to a different version to ensure that the new code works well on your
72 hardware platform and that the upgrade did not introduce regressions in your
75 After performing changes to the source tree to catch any bugs and/or regressions
76 introduced by the modifications.
78 Periodically, maybe from a
80 job, to ensure that any changes to the system (such as the installation of
81 third-party packages or manual modifications to configuration files) do not
82 introduce unexpected failures.
85 First of all, you will need to install the
89 Use the following command to run the whole test suite:
90 .Bd -literal -offset indent
91 $ kyua test -k /usr/tests/Kyuafile
94 The above will go through all test programs in
96 recursively, execute them, store their results and debugging data in Kyua
97 database (by default in
98 .Pa ~/.kyua/store.db ) ,
99 and print a summary of the results.
100 This summary includes a brief count of all total tests run and how many of
103 It is possible to restrict which tests to run by providing their names in
105 For example, this would execute the tests for the
110 .Bd -literal -offset indent
111 $ kyua test -k /usr/tests/Kyuafile bin/cp usr.bin/cut
113 .Ss Obtaining reports of the tests execution
114 Additional information of the results of the execution can be later extracted
115 from the database by using the various reporting commands of Kyua.
116 For example, the following would extract a plain-text report of the executed
117 tests and show which ones failed:
118 .Bd -literal -offset indent
122 This other example would generate an HTML report ready to be published on a
124 .Bd -literal -offset indent
125 $ kyua report-html --output ~/public_html/tests
128 For further details on the command-line interface of Kyua, please refer
131 .\".Ss Configuring the tests
132 .\"Some test cases in the
134 .\"test suite require the administrator to manually set up some configuration
135 .\"properties before they can run.
136 .\"Unless these properties are defined, the tests that require them will be marked
137 .\"as skipped and thus they will not be really executed.
139 .\"Test suites are configured by defining the values to their configuration
141 .\".Pa /usr/local/etc/kyua/kyua.conf .
142 .\"The format of this file is detailed in
145 .\"The following configuration variables are available in the
149 .\".It NONE REGISTERED YET
151 .Ss What to do if something fails?
154 during the execution of the test suite, please considering reporting it to the
156 developers so that the failure can be analyzed and fixed.
157 To do so, either send a message to the appropriate mailing list or file a
159 For more details please refer to:
160 .Bl -bullet -offset indent -compact
162 .Lk http://lists.freebsd.org/ "FreeBSD Mailing Lists"
164 .Lk http://www.freebsd.org/send-pr.html "Submit a FreeBSD Problem Report"
167 .Bl -tag -compact -width usrXlocalXetcXkyuaXkyuaXconfXX
168 .It Pa /usr/local/etc/kyua/kyua.conf
169 System-wide configuration file for
171 .It Pa ~/.kyua/kyua.conf
172 User-specific configuration file for
174 overrides the system file.
175 .It Pa ~/.kyua/store.db
176 Default database used by Kyua to maintain the data of the executed tests.
181 .It Pa /usr/tests/Kyuafile
182 Top-level test suite definition file.
187 The collection of test programs in
194 manual page first appeared in
196 and was later ported to
199 .An Julio Merino Aq Mt jmmv@google.com