Remove building with NOCRYPTO option
[minix3.git] / external / bsd / kyua-cli / dist / doc / kyua.1.in
blob5898dd7cff72fd71fbb96d552a2d2723ce265a60
1 .\" Copyright 2011 Google Inc.
2 .\" All rights reserved.
3 .\"
4 .\" Redistribution and use in source and binary forms, with or without
5 .\" modification, are permitted provided that the following conditions are
6 .\" met:
7 .\"
8 .\" * Redistributions of source code must retain the above copyright
9 .\"   notice, this list of conditions and the following disclaimer.
10 .\" * Redistributions in binary form must reproduce the above copyright
11 .\"   notice, this list of conditions and the following disclaimer in the
12 .\"   documentation and/or other materials provided with the distribution.
13 .\" * Neither the name of Google Inc. nor the names of its contributors
14 .\"   may be used to endorse or promote products derived from this software
15 .\"   without specific prior written permission.
16 .\"
17 .\" THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
18 .\" "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
19 .\" LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
20 .\" A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
21 .\" OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
22 .\" SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
23 .\" LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
24 .\" DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
25 .\" THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
26 .\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
27 .\" OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
28 .Dd February 7, 2013
29 .Dt KYUA 1
30 .Os
31 .Sh NAME
32 .Nm kyua
33 .Nd Command-line interface to Kyua quality assurance toolkit
34 .Sh SYNOPSIS
35 .Nm
36 .Op Fl -config Ar file
37 .Op Fl -logfile Ar file
38 .Op Fl -loglevel Ar level
39 .Op Fl -variable Ar name=value
40 .Ar command
41 .Op Ar command_options
42 .Op Ar command_arguments
43 .Sh DESCRIPTION
44 Kyua is a quality assurance toolkit: a package that provides libraries to
45 aid in the creation of test cases, and tools to execute such test cases and
46 generate reports of their results.
47 .Pp
48 This manual page describes
49 .Nm
50 (note the lowercase), which is the command-line interface to the Kyua
51 package.
52 .Pp
53 If you are here because all you want to know is how to run the tests in
54 .Pa __TESTSDIR__ ,
55 you most likely want to read the
56 .Xr tests 7
57 manual page instead if your system provides one.
58 .Pp
59 As can be observed in the synopsis, the interface of
60 .Nm
61 implements a common subcommand-based interface.  The arguments to the tool
62 specify, in this order: a set of common options that all the commands
63 accept, a required
64 .Ar command
65 name that specifies what
66 .Nm
67 should do, and
68 a set of possibly-optional
69 .Ar command_options
70 and
71 .Ar command_arguments
72 that are specific to the chosen command.
73 .Ss Options supported by all commands
74 The following options are recognized by all the commands.
75 Keep in mind that these must always be specified before the command name.
76 .Bl -tag -width XX
77 .It Fl -config Ar path , Fl c Ar path
78 Specifies the configuration file to process, which must be in the format
79 described in
80 .Xr kyua.conf 5 .
81 The special value
82 .Sq none
83 explicitly disables the loading of any configuration file.
84 .Pp
85 Defaults to
86 .Pa ~/.kyua/kyua.conf
87 if it exists, otherwise to
88 .Pa __CONFDIR__/kyua.conf
89 if it exists,
90 or else to
91 .Sq none .
92 .It Fl -logfile Ar path
93 Specifies the location of the file to which
94 .Nm
95 will log run time events useful for postmortem debugging.
96 .Pp
97 The default depends on different environment variables as described in
98 .Sx Logging ,
99 but typically the file will be stored within the user's home directory.
100 .It Fl -loglevel Ar level
101 Specifies the maximum logging level to record in the log file.
103 .Sx Logging
104 for more details.
106 The default is
107 .Sq info .
108 .It Fl -variable Ar name=value , Fl v Ar name=value
109 Sets the
110 .Ar name
111 configuration variable to
112 .Ar value .
113 The values set through this option have preference over the values set in the
114 configuration file.
116 The specified variable can either be a builtin variable or a test-suite
117 specific variable.  See
118 .Xr kyua.conf 5
119 for more details.
121 .Ss Available commands
122 The following commands are generic and do not have any relation to the execution
123 of tests or the inspection of their results:
124 .Bl -tag -width reportXhtmlXX -offset indent
125 .It Ar about
126 Shows general program information.
128 .Xr kyua-about 1 .
129 .It Ar config
130 Inspects the values of the configuration variables.
132 .Xr kyua-config 1 .
133 .It Ar db-exec
134 Executes an arbitrary SQL statement in the store database and prints the
135 resulting table.
137 .Xr kyua-db-exec 1 .
138 .It Ar help
139 Shows usage information.
141 .Xr kyua-help 1 .
144 The following commands are used to generate reports based on the data previously
145 stored in the database:
146 .Bl -tag -width reportXhtmlXX -offset indent
147 .It Ar report
148 Generates a plain-text report.
150 .Xr kyua-report 1 .
151 .It Ar report-html
152 Generates an HTML report.
154 .Xr kyua-report-html 1 .
157 The following commands are used to interact with a test suite:
158 .Bl -tag -width reportXhtmlXX -offset indent
159 .It Ar debug
160 Executes a single test case in a controlled environment for debugging purposes.
162 .Xr kyua-debug 1 .
163 .It Ar list
164 Lists test cases and their metadata.
166 .Xr kyua-list 1 .
167 .It Ar test
168 Runs tests.
170 .Xr kyua-test 1 .
172 .Ss Logging
174 has a logging facility that collects all kinds of events at run time.
175 These events are always logged to a file so that the log is available when
176 it is most needed: right after a non-reproducible problem happens.
177 The only way to disable logging is by sending the log to
178 .Pa /dev/null .
180 The location of the log file can be manually specified with the
181 .Fl -logfile
182 option, which applies to all commands.  If no file is explicitly specified, the
183 location of the log files is chosen in this order:
184 .Bl -enum -offset indent
186 .Pa ${HOME}/.kyua/logs/
188 .Va HOME
189 is defined.
191 .Pa ${TMPDIR}/
193 .Va TMPDIR
194 is defined.
196 .Pa /tmp/ .
199 And the default naming scheme of the log files is:
200 .Sq <progname>.<timestamp>.log .
202 The messages stored in the log file have a level (or severity) attached to
203 them.  These are:
204 .Bl -tag -width warningXX -offset indent
205 .It error
206 Fatal error messages.  The program generally terminates after these, either
207 in a clean manner or by crashing.
208 .It warning
209 Non-fatal error messages.  These generally report a condition that must be
210 addressed but the application can continue to run.
211 .It info
212 Informational messages.  These tell the user what the program was doing at
213 a general level of operation.
214 .It debug
215 Detailed informational messages.  These are often useful when debugging
216 problems in the application, as they contain lots of internal details.
219 The default log level is
220 .Sq info
221 unless expicitly overriden with
222 .Fl -loglevel .
224 The log file is a plain text file containing one line per log record.  The
225 format of each line is as follows:
226 .Bd -literal -offset indent
227 timestamp entry_type pid file:line: message
230 .Ar entry_type
231 can be one of:
232 .Sq E
233 for an error,
234 .Sq W
235 for a warning,
236 .Sq I
237 for an informational message and
238 .Sq D
239 for a debug message.
240 .Ss Bug reporting
241 If you think you have encountered a bug in
242 .Nm ,
243 please take the time to let the developers know about it.  This will ensure
244 that the bug is addressed and potentially fixed in the next Kyua release.
246 The first step in reporting a bug is to check if there already is a similar
247 bug in the database.  You can check what issues are currently in the
248 database by going to:
249 .Bd -literal -offset indent
250 http://code.google.com/p/kyua/issues/list
253 If there is no existing issue that describes an issue similar to the
254 one you are experiencing, you can open a new one by visiting:
255 .Bd -literal -offset indent
256 http://code.google.com/p/kyua/issues/entry
259 When doing so, please include as much detail as possible.  Among other
260 things, explain what operating system and platform you are running
262 on, what were you trying to do, what exact messages you saw on the screen,
263 how did you expect the program to behave, and any other details that you
264 may find relevant.
266 Also, please include a copy of the log file corresponding to the problem
267 you are experiencing.  Unless you have changed the location of the log
268 files, you can most likely find them in
269 .Pa ~/.kyua/logs/ .
270 If the problem is reproducible, it is good idea to regenerate the log file
271 with an increased log level so as to provide more information.  For
272 example:
273 .Bd -literal -offset indent
274 $ kyua --logfile=problem.log --loglevel=debug \\
275     [rest of the command line]
277 .Sh ENVIRONMENT
278 The following variables are recognized and can be freely tuned by the end user:
279 .Bl -tag -width COLUMNSXX
280 .It Va COLUMNS
281 The width of the screen, in number of characters.
283 uses this to wrap long lines.
284 If not present, the width of the screen is determined from the terminal
285 stdout is connected to, and, if the guessing fails, this defaults to infinity.
286 .It Va HOME
287 Path to the user's home directory.
289 uses this location to determine paths to configuration files and default log
290 files.
291 .It Va TMPDIR
292 Path to the system-wide temporary directory.
294 uses this location to place the work directory of test cases, among other
295 things.
297 The default value of this variable depends on the operating system.  In
298 general, it is
299 .Pa /tmp .
302 The following variables are also recognized, but you should not need to set them
303 during normal operation.
304 They are only provided to override the value of built-in values, which is useful
305 when testing
307 itself:
308 .Bl -tag -width KYUAXCONFDIRXX
309 .It Va KYUA_CONFDIR
310 Path to the system-wide configuration files for
311 .Nm .
313 Defaults to
314 .Pa __CONFDIR__ .
315 .It Va KYUA_DOCDIR
316 Path to the location of installed documentation.
318 Defaults to
319 .Pa __DOCDIR__ .
320 .It Va KYUA_MISCDIR
321 Path to the location of the installed miscellaneous scripts and data
322 files provided by
323 .Nm .
325 Defaults to
326 .Pa __MISCDIR__ .
327 .It Va KYUA_STOREDIR
328 Path to the location of the installed store support files; e.g. the
329 directory containing the SQL database schema.
331 Defaults to
332 .Pa __STOREDIR__ .
333 .It Va KYUA_TESTERSDIR
334 Path to the location of the installed testers; e.g. the directory containing
335 programs like
336 .Pa plain_tester .
337 Defaults to
338 .Pa __TESTERSDIR__ .
340 .Sh FILES
341 .Bl -tag -width XXXX
342 .It Pa ~/.kyua/kyua.conf
343 User-specific configuration file.
344 .It Pa ~/.kyua/logs/
345 Default location for the collected log files.
346 .It Pa __CONFDIR__/kyua.conf
347 System-wide configuration file.
349 .Sh EXIT STATUS
351 returns 0 on success, 1 on a controlled error condition in the given
352 subcommand, 2 on a general unexpected error and 3 on a usage error.
354 The documentation of the subcommands in the corresponding manual pages only
355 details the difference between a successful exit (0) and the detection of a
356 controlled error (1).  Even though when those manual pages do not describe
357 any other exit statuses, codes above 1 can be returned.
358 .Sh SEE ALSO
359 .Xr atf 7 ,
360 .Xr tests 7
361 .Sh AUTHORS
362 For more details on the people that made
364 possible and the license terms, run:
365 .Bd -literal -offset indent
366 $ kyua about