From 9a111ee8039a9e1f3b22e8b649e3976490a9d5ac Mon Sep 17 00:00:00 2001 From: Thomas Markwalder Date: Sat, 14 Feb 2015 09:22:11 -0500 Subject: [master] ATF usage and documentation cleaned up Merges in rt38619 --- doc/devel/atf.dox | 26 ++++++++++++++++++++++---- 1 file changed, 22 insertions(+), 4 deletions(-) (limited to 'doc') diff --git a/doc/devel/atf.dox b/doc/devel/atf.dox index 1f3d7912..dd596841 100644 --- a/doc/devel/atf.dox +++ b/doc/devel/atf.dox @@ -30,18 +30,28 @@ Test Framework) as a framework to run our unittests. ATF stands for Automated Test Framework, and is the framework used for unit tests in ISC DHCP and BIND9. ATF sources can be downloaded from -http://code.google.com/p/kyua/wiki/ATF . ATF itself must be configured, compiled +https://github.com/jmmv/kyua . ATF itself must be configured, compiled and then installed to be available during the DHCP configure procedure. Please follow INSTALL file supplied with ATF sources (it's essentially the typical ./configure && make && make install procedure). +Beginning with ATF version 0.16, it is necessary to include the following +options --enable-tools and --disable-shared when configuring ATF: + +@verbatim + configure --prefix= --enable-tools --disable-shared +@endverbatim + +ISC DHCP unittests will run with ATF releases upto 0.19. Beginning with +ATF 0.20, the tools, atf-run and atf-report required by ISC DHCP, were +deprecated and are no longer included with ATF. + The ATF successor, called Kyua, is being developed. As of August 2012, the latest available release of Kyua is 0.5. It claims to offer feature parity with ATF. Migration to Kyua may be planned some time in the future, but DHCP uses ATF -for now. Such an upgrade should be done in coordination with BIND. The latest -tested version of ATF that DHCP's unittests were run against is 0.15. +for now. Such an upgrade should be done in coordination with BIND. -To build the unit-tests, use the following: +To build and run the unit-tests, use the following: @verbatim $ ./configure --with-atf @@ -49,6 +59,11 @@ $ make $ make check @endverbatim +This will traverse the source tree running the unit tests in each unit test +subdirectory. Note that if one or more tests in a unit test subdirectory fail +the make process will stop. To run all of the tests regardless of outcome, +use "make -k check" + The following syntax is supported as well: @verbatim $ ./configure --with-atf=/path/to/your/atf/install @@ -66,6 +81,9 @@ executable. The typical way to run tests is: @verbatim $ atf-run | atf-report +(This assumes atf-run and atf-report are in your path) +or +$ sh ../../tests/unittests.sh @endverbatim atf-run will read the Atffile in the current directory and execute all the tests -- cgit v1.2.1