1ATF-TEST-PROGRAM(1) BSD General Commands Manual ATF-TEST-PROGRAM(1)
2
4 atf-test-program — common interface to ATF test programs
5
7 atf-test-program [-r resfile] [-s srcdir]
8 [-v var1=value1 [.. -v varN=valueN]] test_case
9 atf-test-program -l
10
12 Test programs written using the ATF libraries all share a common user
13 interface, which is what this manual page describes. NOTE: There is no
14 binary known as atf-test-program; what is described in this manual page
15 is the command-line interface exposed by the atf-c, atf-c++ and atf-sh
16 bindings.
17
18 In the first synopsis form, the test program will execute the provided
19 test case and print its results to the standard output, unless otherwise
20 stated by the -r flag. Optionally, the test case name can be suffixed by
21 ‘:cleanup’, in which case the cleanup routine of the test case will be
22 executed instead of the test case body; see atf-test-case(4). Note that
23 the test case is executed without isolation, so it can and probably will
24 create and modify files in the current directory. To execute test cases
25 in a controller manner, refer to atf-run(1), which is the preferred way
26 to run test cases. You should only execute test cases by hand for debug‐
27 ging purposes.
28
29 In the second synopsis form, the test program will list all available
30 test cases alongside their meta-data properties in a format that is
31 machine parseable. This list is processed by atf-run(1) to know how to
32 execute the test cases of a given test program.
33
34 The following options are available:
35
36 -l Lists available test cases alongside a brief description
37 for each of them.
38
39 -r resfile Specifies the file that will receive the test case
40 result. If not specified, the test case prints its
41 results to stdout. If the result of a test case needs to
42 be parsed by another program, you must use this option to
43 redirect the result to a file and then read the resulting
44 file from the other program. Note: do not try to process
45 the stdout of the test case because your program may
46 break in the future.
47
48 -s srcdir The path to the directory where the test program is
49 located. This is needed in all cases, except when the
50 test program is being executed from the current direc‐
51 tory. The test program will use this path to locate any
52 helper data files or utilities.
53
54 -v var=value Sets the configuration variable var to the value value.
55
57 atf-run(1), atf(7)
58
59BSD February 6, 2011 BSD