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