freebsd-dev/share/examples/tests
Julio Merino f5fd950e35 Make bsd.test.mk the only public mk fragment for the building of tests.
Change {atf,plain,tap}.test.mk to be internal implementation details of
bsd.test.mk.  Makefiles that build tests should now only include bsd.test.mk
and declaratively specify what they want to build, without worrying about
the internal implementation of the mk files.

The reason for this change is to permit building test programs of different
interfaces from a single directory, which is something I had a need for
while porting tests over from src/tools/regression/.

Additionally, this change makes it possible to perform some other requested
changes to bsd.test.mk in an easier manner.  Coming soon.
2014-03-14 08:56:19 +00:00
..
tests Make bsd.test.mk the only public mk fragment for the building of tests. 2014-03-14 08:56:19 +00:00
Makefile
README

$FreeBSD$

This directory contains sample test programs along the Makefile and
Kyuafile logic to get them build and installed.

The goal of these test programs is to illustrate, via simple and
heaviliy-commented code, how to construct test programs using all the
supported interfaces in the system.

If you use any files in here as templates for your own code, please
remove all comments while doing so and then write your own if necessary.

The subdirectories here contain:

* tests/: Regular directory containing the tests code.  Note that the
  apparently-redundant tests/tests/ path component here is expected for
  consistency reasons and required to get the right layout under
  /usr/tests/.

* tests/atf/: Tests that use the ATF libraries, including atf-c, atf-c++
  and atf-sh.  See kyua-atf-interface(1) for details.

* tests/plain/: Tests that do not use any testing framework.  See
  kyua-plain-interface(1) for details.

To inspect the available sample test cases from an installed system:

    $ kyua list -k /usr/tests/share/examples/tests/Kyuafile

To run the full suite of sample test cases:

    $ kyua test -k /usr/tests/share/examples/tests/Kyuafile

And to debug a specific failing test case, if any:

    $ kyua debug -k /usr/tests/share/examples/tests/Kyuafile \
      atf/cp_test:simple