xref: /freebsd/share/examples/tests/README (revision 8ddb146abcdf061be9f2c0db7e391697dafad85c)
1$FreeBSD$
2
3This directory contains sample test programs along the Makefile and
4Kyuafile logic to get them build and installed.
5
6The goal of these test programs is to illustrate, via simple and
7heaviliy-commented code, how to construct test programs using all the
8supported interfaces in the system.
9
10If you use any files in here as templates for your own code, please
11remove all comments while doing so and then write your own if necessary.
12
13The subdirectories here contain:
14
15* tests/: Regular directory containing the tests code.  Note that the
16  apparently-redundant tests/tests/ path component here is expected for
17  consistency reasons and required to get the right layout under
18  /usr/tests/.
19
20* tests/atf/: Tests that use the ATF libraries, including atf-c, atf-c++
21  and atf-sh.  See kyua-atf-interface(1) for details.
22
23* tests/plain/: Tests that do not use any testing framework.  See
24  kyua-plain-interface(1) for details.
25
26To inspect the available sample test cases from an installed system:
27
28    $ kyua list -k /usr/tests/share/examples/tests/Kyuafile
29
30To run the full suite of sample test cases:
31
32    $ kyua test -k /usr/tests/share/examples/tests/Kyuafile
33
34And to debug a specific failing test case, if any:
35
36    $ kyua debug -k /usr/tests/share/examples/tests/Kyuafile \
37      atf/cp_test:simple
38