]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
Remove the traces of ATF from documentation
authorOndřej Surý <ondrej@sury.org>
Thu, 15 Nov 2018 09:06:45 +0000 (10:06 +0100)
committerOndřej Surý <ondrej@sury.org>
Thu, 15 Nov 2018 15:29:51 +0000 (16:29 +0100)
README
README.md
doc/dev/dev.md
unit/README

diff --git a/README b/README
index 31b58aa1a81f8097563f544e4ebe53d4745206b9..8ea021026a3fe1b988f58a9860da4c0e4c768a12 100644 (file)
--- a/README
+++ b/README
@@ -289,8 +289,9 @@ and will be skipped if these are not available. Some tests require Python
 and the 'dnspython' module and will be skipped if these are not available.
 See bin/tests/system/README for further details.
 
-Unit tests are implemented using Automated Testing Framework (ATF). To run
-them, use configure --with-atf, then run make test or make unit.
+Unit tests are implemented using cmocka unit testing framework.
+To run them, use configure --with-cmocka, then run make test or
+make unit.
 
 Documentation
 
index 272e5a7e0bda32c9365b587df8550aaee1fc9464..ea95a9d6c60215e68428d8366a5ccf8dfb38da31 100644 (file)
--- a/README.md
+++ b/README.md
@@ -307,8 +307,8 @@ and will be skipped if these are not available. Some tests require Python
 and the 'dnspython' module and will be skipped if these are not available.
 See bin/tests/system/README for further details.
 
-Unit tests are implemented using Automated Testing Framework (ATF).
-To run them, use `configure --with-atf`, then run `make test` or
+Unit tests are implemented using cmocka unit testing framework.
+To run them, use `configure --with-cmocka`, then run `make test` or
 `make unit`.
 
 ### <a name="doc"/> Documentation
index e7e4b897af448e84606db3af96b127c7a0f687ee..b9c37aa7a3f816e0bbc293ab763beb5d9e5afa59 100644 (file)
@@ -197,27 +197,10 @@ points to `rndc`, `SIGNZONE` to `dnssec-signzone`, etc.
 
 #### <a name="unittest"></a> Building unit tests
 
-BIND uses the Automated Testing Framework (ATF), originally from the NetBSD
-project, as its unit testing framework.  (Note: ATF has been supplanted by
-a newer version called Kyua, but BIND is still using the older system.)
+BIND uses the cmocka, unit testing framework.
 
-To build BIND with unit tests, run `configure` with the `--with-atf`
-option.  This causes the ATF source code in the `unit/atf-src`
-subdirectory to be built.  
-
-To save time on repeated builds, you can build and install ATF
-in another directory, and configure BIND to use the pre-built
-version.  (Be sure to disable shared libraries in the ATF build,
-and to build the ATF tools; libraries alone are not sufficient).
-
-        $ cd atf-src
-        $ configure --prefix=<prefix> --enable-tools --disable-shared
-        $ make
-        $ make install
-
-After this has been done, specify the ATF prefix when building BIND:
-
-        $ configure --with-atf=<prefix>
+To build BIND with unit tests, run `configure` with the `--with-cmocka`
+option.  This requires cmocka >= 1.0.0 to be installed in the system.
 
 #### Running unit tests
 
@@ -249,53 +232,11 @@ redirected:
 
 #### Writing unit tests
 
-Information on writing ATF tests can be found at the
-[NetBSD site](http://wiki.netbsd.org/tutorials/atf/).
-
-New unit tests should be added whenever significant new API
-functionality is added to libdns or libisc.
-
-Each unit test file contains at least one unit test case, and
-a list of test cases to execute when the test is run.  These
-will look like the following:
-
-        ATF_TC(test_case);
-        ATF_TC_HEAD(test_case, tc) {
-                atf_tc_set_md_var(tc, "descr",
-                                  "Describe the test case here.");
-        }
-        ATF_TC_BODY(serialize_align, tc) {
-                UNUSED(tc);
-
-                result = isc_test_begin(NULL, true);
-                ATF_REQUIRE_EQ(result, ISC_R_SUCCESS);
-
-                ATF_CHECK_EQ(value1, value2);
-                ATF_CHECK(value1 + value2 < 100);
-
-                isc_test_end();
-        }
-
-        /*
-         * Main
-         */
-        ATF_TP_ADD_TCS(tp) {
-                ATF_TP_ADD_TC(tp, test_case);
-        
-                return (atf_no_error());
-        }
-
-If the conditions specified in `ATF_CHECK` and `ATF_CHECK_EQ`
-directives are found to be false, then the test case will fail, but it
-will continue running to see if there are any more failures.
-
-If the conditions specified in `ATF_REQUIRE` and `ATF_REQUIRE_EQ` are
-found to be false, the test case cannot continue running and will stop
+Information on writing cmocka tests can be found at the
+[cmocka website](https://cmocka.org).
 
-`isc_test_begin()` and `isc_test_end()` set up necessary preconditions
-for checking libisc functions, such as starting a task manger and
-creating a memory context.  Similar functions `dns_test_begin()` and
-`dns_test_end()` are available for testing libdns functions.
+New unit tests should be added whenever new API functionality is added to the
+libraries.
 
 ### <a name="arch"></a> BIND system architecture
 
index 0f0c209df05a7678138bf347ec53344e34f9ce45..5775ef87eff0b5b83b512a0fec94dc0ac82b13aa 100644 (file)
@@ -1,9 +1,7 @@
-Unit tests for BIND 9 are based on NetBSD Automated Test Framework, cmocka and
-test execution engine Kyua.
+Unit tests for BIND 9 are based on cmocka and test execution engine Kyua.
 
-If your distribution of choice doesn't include packages for atf, kyua and
-cmocka, the sources can be found here:
+If your distribution of choice doesn't include packages for kyua or cmocka, the
+sources can be found here:
 
- * ATF 0.20 - https://github.com/jmmv/atf/releases
  * Kyua 0.13 - https://github.com/jmmv/kyua/releases
  * CMocka 1.0 - https://cmocka.org/files/