1ATF-TEST-PROGRAM(1)       BSD General Commands Manual      ATF-TEST-PROGRAM(1)
2

NAME

4     atf-test-program — common interface to ATF test programs
5

SYNOPSIS

7     atf-test-program [-r resfile] [-s srcdir]
8                      [-v var1=value1 [.. -v varN=valueN]] test_case
9     atf-test-program -l
10

DESCRIPTION

12     Test programs written using the ATF libraries all share a common user in‐
13     terface, 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, you need a runtime engine that understands the
26     ATF interface.  The recommended runtime engine is kyua(1).  You should
27     only execute test cases by hand for debugging 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 ma‐
31     chine parseable.  This list is processed by kyua(1) to know how to exe‐
32     cute 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 re‐
40                     sult.  If not specified, the test case prints its results
41                     to stdout.  If the result of a test case needs to be
42                     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 lo‐
49                     cated.  This is needed in all cases, except when the test
50                     program is being executed from the current directory.
51                     The test program will use this path to locate any helper
52                     data files or utilities.
53
54     -v var=value    Sets the configuration variable var to the value value.
55

SEE ALSO

57     kyua(1)
58
59BSD                              March 2, 2014                             BSD
Impressum