~ubuntu-branches/ubuntu/raring/bind9/raring

« back to all changes in this revision

Viewing changes to unit/atf-src/doc/atf-test-program.1

  • Committer: Package Import Robot
  • Author(s): LaMont Jones
  • Date: 2012-01-19 12:30:31 UTC
  • mfrom: (1.9.1) (26.1.6 sid)
  • Revision ID: package-import@ubuntu.com-20120119123031-0j2wlg66ll5ogpz2
Tags: 1:9.8.1.dfsg.P1-1~build1
preciseĀ upload

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
.\"
 
2
.\" Automated Testing Framework (atf)
 
3
.\"
 
4
.\" Copyright (c) 2007, 2008, 2010 The NetBSD Foundation, Inc.
 
5
.\" All rights reserved.
 
6
.\"
 
7
.\" Redistribution and use in source and binary forms, with or without
 
8
.\" modification, are permitted provided that the following conditions
 
9
.\" are met:
 
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.
 
15
.\"
 
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.
 
28
.\"
 
29
.Dd June 18, 2010
 
30
.Dt ATF-TEST-PROGRAM 1
 
31
.Os
 
32
.Sh NAME
 
33
.Nm atf-test-program
 
34
.Nd common interface to ATF test programs
 
35
.Sh SYNOPSIS
 
36
.Nm
 
37
.Op Fl r Ar resfile
 
38
.Op Fl s Ar srcdir
 
39
.Op Fl v Ar var1=value1 Op .. Fl v Ar varN=valueN
 
40
.Ar test_case
 
41
.Nm
 
42
.Fl l
 
43
.Sh DESCRIPTION
 
44
Test programs written using the ATF libraries all share a common user
 
45
interface, which is what this manual page describes.
 
46
.Pp
 
47
In the first synopsis form, the test program will execute the provided
 
48
test case and print its results to the standard output, unless otherwise
 
49
stated by the
 
50
.Fl r
 
51
flag.
 
52
Optionally, the test case name can be suffixed by
 
53
.Sq :cleanup ,
 
54
in which case the cleanup routine of the test case will be executed
 
55
instead of the test case body; see
 
56
.Xr atf-test-case 4 .
 
57
Note that the test case is
 
58
.Em executed without isolation ,
 
59
so it can and probably will create and modify files in the current directory.
 
60
To execute test cases in a controller manner, refer to
 
61
.Xr atf-run 1 ,
 
62
which is the preferred way to run test cases.
 
63
You should only execute test cases by hand for debugging purposes.
 
64
.Pp
 
65
In the second synopsis form, the test program will list all available
 
66
test cases alongside their meta-data properties in a format that is
 
67
machine parseable.
 
68
This list is processed by
 
69
.Xr atf-run 1
 
70
to know how to execute the test cases of a given test program.
 
71
.Pp
 
72
The following options are available:
 
73
.Bl -tag -width XvXvarXvalueXX
 
74
.It Fl l
 
75
Lists available test cases alongside a brief description for each of them.
 
76
.It Fl r Ar resfile
 
77
Specifies the file that will receive the test case result.
 
78
If not specified, the test case prints its results to stdout.
 
79
If the result of a test case needs to be parsed by another program, you must
 
80
use this option to redirect the result to a file and then read the resulting
 
81
file from the other program.
 
82
Note:
 
83
.Em do not try to process the stdout of the test case
 
84
because your program may break in the future.
 
85
.It Fl s Ar srcdir
 
86
The path to the directory where the test program is located.
 
87
This is needed in all cases, except when the test program is being executed
 
88
from the current directory.
 
89
The test program will use this path to locate any helper data files or
 
90
utilities.
 
91
.It Fl v Ar var=value
 
92
Sets the configuration variable
 
93
.Ar var
 
94
to the value
 
95
.Ar value .
 
96
.El
 
97
.Sh SEE ALSO
 
98
.Xr atf-run 1 ,
 
99
.Xr atf 7