From dac41968a98f1e5103154c144ad19691509fcf1c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Petr=20=C5=A0pa=C4=8Dek?= Date: Tue, 5 Jan 2021 13:46:16 +0100 Subject: [PATCH 1/3] Fix command to run all unit tests in doc/dev/dev.md Fixup for build system rewrite 978c7b2e89aa37a7ddfe2f6b6ba12ce73dd04528, MR !985. --- doc/dev/dev.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/doc/dev/dev.md b/doc/dev/dev.md index 886cbe8a85..1c4e6e6d1e 100644 --- a/doc/dev/dev.md +++ b/doc/dev/dev.md @@ -221,9 +221,9 @@ in `rbt.c`. (There are exceptions to this rule, though; for instance, different files in `lib/isc`.) When BIND is built with unit tests, they will be run as part of -`make` `check`. But if you want to run *only* the ATF unit tests: +`make` `check`. But if you want to run *only* the unit tests: - $ sh unit/unittest.sh + $ make unit You can also run the unit tests for only one library: From 631ee5801007dbc5d5265281039b335ff2de1a67 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Petr=20=C5=A0pa=C4=8Dek?= Date: Tue, 5 Jan 2021 15:32:33 +0100 Subject: [PATCH 2/3] Document new system test output format after build system rewrite Fixup to MR !985. --- doc/dev/dev.md | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/doc/dev/dev.md b/doc/dev/dev.md index 1c4e6e6d1e..9da3b9f1a4 100644 --- a/doc/dev/dev.md +++ b/doc/dev/dev.md @@ -143,7 +143,7 @@ To run the tests, build BIND (be sure to use --with-atf to run unit tests), then run `make` `check`. An easy way to check the results: $ make check 2>&1 | tee /tmp/check.out - $ grep '^R:' /tmp/check.out | sort | uniq -c + $ grep -A 10 'Testsuite summary' /tmp/check.out This will show all of the test results. One or two "R:SKIPPED" is okay; if there are a lot of them, then you probably forgot to create the loopback @@ -153,6 +153,10 @@ unit tests, so you can't rely on it to catch everything.) To run only the system tests, omitting unit tests: + $ make test + +Or: + $ cd bin/tests/system $ sh runall.sh From 69d0fe9e72d488e4b5fb940781bb6d927d5f706f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Petr=20=C5=A0pa=C4=8Dek?= Date: Tue, 5 Jan 2021 14:04:50 +0100 Subject: [PATCH 3/3] Replace obsolete references to ATF with Cmocka Fixup for MR!886. --- doc/dev/dev.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/doc/dev/dev.md b/doc/dev/dev.md index 9da3b9f1a4..f66284873b 100644 --- a/doc/dev/dev.md +++ b/doc/dev/dev.md @@ -83,7 +83,7 @@ comments; they must be clearly written and consistent with existing style. * Read the diff * Read accompanying notes in the ticket * Apply the diff to the appropriate branch -* Run `configure` (using at least `--enable-developer --with-atf`) +* Run `configure` (using at least `--enable-developer`) * Build * Read the documentation, if any * Read the tests @@ -139,7 +139,7 @@ interfaces (as root): $ sudo sh ifconfig.sh up $ cd ../../.. -To run the tests, build BIND (be sure to use --with-atf to run unit +To run the tests, build BIND (be sure to use --with-cmocka to run unit tests), then run `make` `check`. An easy way to check the results: $ make check 2>&1 | tee /tmp/check.out