diff options
author | Tomek Mrugalski <tomasz@isc.org> | 2012-08-08 00:23:01 +0200 |
---|---|---|
committer | Tomek Mrugalski <tomasz@isc.org> | 2012-08-08 00:23:01 +0200 |
commit | f9effb95d4f758fa5c586ea2c4ed7fa1b908eb4a (patch) | |
tree | 217a9ee0e42c1f8912e8dcbcbc86604681ffd32d | |
parent | e04feb1f05af5aee300ea14c6a8c1e4cab366555 (diff) | |
download | isc-dhcp-f9effb95d4f758fa5c586ea2c4ed7fa1b908eb4a.tar.gz |
[rt25901_atf] Atffile/compilation cleanup, ATF description updated
-rw-r--r-- | common/tests/Atffile | 4 | ||||
-rw-r--r-- | doc/devel/atf.dox | 22 | ||||
-rw-r--r-- | server/dhcpd.c | 5 |
3 files changed, 25 insertions, 6 deletions
diff --git a/common/tests/Atffile b/common/tests/Atffile index 14b1055b..10402ce7 100644 --- a/common/tests/Atffile +++ b/common/tests/Atffile @@ -2,6 +2,4 @@ Content-Type: application/X-atf-atffile; version="1" prop: test-suite = dhcp4 -tp-glob: test_alloc -tp-glob: hash_unittest - +tp-glob: *_unittest diff --git a/doc/devel/atf.dox b/doc/devel/atf.dox index 3a1bace2..b9b305a5 100644 --- a/doc/devel/atf.dox +++ b/doc/devel/atf.dox @@ -6,14 +6,32 @@ @section testsAtf ATF unit-tests ATF stands for Automated Test Framework, and is the framework used for -all unit-tests.n ISC DHCP. To build the unit-tests, use the following: +unit-tests in ISC DHCP and BIND9. ATF can be downloaded from +http://code.google.com/p/kyua/wiki/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. Such upgrade should be done in coordination with BIND. The +latest tested version of ATF that DHCP's unittests were run against is +0.15. + +To build the unit-tests, use the following: @verbatim -./configure --enable-atf +./configure --with-atf make make check @endverbatim +The following syntax is supported as well: +@verbatim +./configure --with-atf=/path/to/your/atf/install +@endverbatim + +but it seems to have troubles detecting ATF installation, at least +with ATF 0.14 and Mac OS X 10.6.8. + Each code directory (e.g. server/) that has unit-tests has a sub-directory named tests (e.g. server/tests). You can execute "make check" in that directory to run specific subset of tests. diff --git a/server/dhcpd.c b/server/dhcpd.c index 3239459f..95d474b9 100644 --- a/server/dhcpd.c +++ b/server/dhcpd.c @@ -58,7 +58,9 @@ static const char url [] = # undef group #endif /* PARANOIA */ +#ifndef UNIT_TEST static void usage(void); +#endif struct iaddr server_identifier; int server_identifier_matched; @@ -1201,7 +1203,7 @@ void postdb_startup (void) } /* Print usage message. */ - +#ifndef UNIT_TEST static void usage(void) { log_info("%s %s", message, PACKAGE_VERSION); @@ -1225,6 +1227,7 @@ usage(void) { " [-pf pid-file] [--no-pid] [-s server]\n" " [if0 [...ifN]]"); } +#endif void lease_pinged (from, packet, length) struct iaddr from; |