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